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. The data from the two can be used in your actions, or can combine with filter code to create all kinds of automations.
To add a query to your Applet, you'll first need to add a trigger, after which you can click on the plus button ( + ) and select Add query:
Queries, along with filter code, unlock Applets to go beyond if this to if this and this.
For example, the below Applet uses a query and some filter code to notify you when the ISS passes overhead, but only if it's nighttime:
- Trigger: Space - ISS passes over a specific location
- 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: Notifications - Send a notification from the IFTTT app
Do I need to use filter code to use a query?
Filter code is not required to use queries.
For example, the following Applet uses a Google Calendar query to send an email every day containing all 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