A Query is a way to request additional data that your Applet's Trigger doesn’t provide. Queries run immediately after Triggers, but before filter code.
Some examples of Queries are Google Calendar - List Events For a Date and Facebook - List Album Photos.
How can I use a Query?
Queries can be used alongside Triggers to build more powerful Applets. Data from both can be used in your Actions or combined with filter code to create more advanced automations.
There are two ways to add a Query to your Applet:
Use IFTTT Chat: Describe what you want your Applet to do in a prompt, such as “When my Button Widget is pressed, send me the current weather as a push notification.” Then click Start building and IFTTT Chat will create the Applet and add the Query for you.
Use the classic Composer: First, add a Trigger to your Applet. Then click the plus button ( + ) and select Add to the right of Query:
Queries, along with filter code, unlock Applets to go beyond if this to if this and this.
For example, the Applet described in this article triggers whenever you arrive home and uses filter code to check whether it’s after sunset. If it is, the Applet sends an SMS to let someone know you’ve safely arrived home.
- Trigger: Location - You Enter an Area
- Query: Weather Underground - Current weather
- filter code: Skip the Action if the current time is after sunrise and before sunset (when the sun is up)
- Action: Android SMS - Send an SMS
Do I need to use filter code to use a Query?
Filter code is not required to use Queries.
The following Applet uses a Google Calendar Query to send an email each day with all of your calendar events for the upcoming day:
- Trigger: Date & Time - Every day at
- Query: Google Calendar - List Events For a Date
- Action: Email - Send me an email