Voice commands are becoming more common as a method of interacting with devices and apps. You can use voice commands to run Actions for any Service on IFTTT.
Siri is the voice-activated assistant from Apple. Siri can be used on your iOS or iPadOS device, HomePod, or Apple Watch to kick off an Apple Shortcut that triggers an IFTTT Applet.
Create your Applet
Your applet will use Webhooks as the trigger. It can use any action you choose, and if you’re subscribed to IFTTT Pro, you can trigger multiple actions and also include queries and filters. We’ll cover those advanced use cases in a separate article.
- Select Create to create a new Applet
- Add Webhooks as the If This trigger
- When prompted, enter your Event Name. You’ll use this information in a few minutes to set up the Siri portion of your setup. For this example, I’ll use turn_off_lights.
- Add the Then portion of your applet -- this is the action service -- authenticate if necessary, and select any required settings. For this example, I’ll select Yeelight.
- Click Continue
- When prompted, edit the Applet Title if you want to customize it
- Click Finish to save your new Applet
Create the Siri Shortcut
- While still on IFTTT, click (or tap on mobile) on the Webhooks
icon to view the Service detail page
- Click (or tap on mobile) the Documentation button to view your private key and the URL you can use with this service. Don’t share this secret key with anyone or they’ll be able to use it to run your Applets.
- On the Webhooks documentation page, in the {event} field, enter the Event Name you set in step 3 above. Mine is turn_off_lights. Keep this documentation page handy -- you’ll need to copy items from it in the next few steps.
- On your iPhone, open the Apple Shortcuts app
- Tap + to add a new shortcut
- Tap + to add action. Search for and add the “Text” item.
- Copy the private key from your IFTTT Webhooks screen and paste it into the Text area in the new shortcut
- Tap + to add a second action. Search for and add a second “Text” item.
- Enter the Event Name you set up earlier in IFTTT. Mine is turn_off_lights.
- Tap + to add a third action. Search for and add a “URL” item.
- Copy the entire URL you see on your IFTTT Webhooks screen and paste it into the URL area in the new shortcut. Make sure it includes your event name.
https://maker.ifttt.com/trigger/turn_off_lights/with/key/xLDzNMtSYfBnQmVqVLxqKQT3_NJ_R3DvISBVsx4Jh_xxf1a2rgUrrnrWrLnwxXN
Your shortcut should look like this (with your own values in the text and URL fields). - Tap + to add a fourth and final action. Search for and add a “Get contents of URL” item.
- Tap Show More in the new action you added and confirm Method is set to “GET”
- Tap Next, give your new shortcut a name (this is what you’ll use to tell Siri to run), and save it. I named mine “Turn off the lights”.
Tell Siri
To run your new Applet, all you need to do is tell Siri. In my example, I just say, “Hey Siri turn off the lights.” It’ll work on any Siri-enabled Apple device logged into the same Apple ID you used when you created your shortcut.
Remember, you can always set any Applet to notify you when it runs (it will do so using the IFTTT app notifications) and you can also check your Activity logs in the IFTTT app and on IFTTT.com to see information about each Applet event.
Enjoy!