Creating a Zap in Zapier for New Query Results
You can connect Redash to Zapier and trigger an action every time a new line is added to your query results - for example, a Slack bot that announces every time a new order came in. The best way is to have a scheduled query that refreshes frequently so the notification you get is in real-time.
Here’s a short example of connecting Redash to Zapier and creating a new Zap:
- Use this invitation link for the beta Redash trigger app (create an account if needed) and click “Make a Zap” right next to your account area at the top of the page.
- Choose a trigger app - in this case, Redash (it won’t be available to you unless you have received and opened the invitation).
- Choose a trigger - for now, we have only “New Query Results” in there, this means the Zap will get triggered everytime a new line is added to the results set of your query. The free Zapier account supports checking for new results every 15 minutes so you should schedule the query to refresh according to the frequency in Zapier.
- Connect your Redash account to Zapier:
- Full domain of your Redash account (Something like:
https://app.redash.io/myorg/
orhttps://redash.myorg.com/
(note the slash at the end)) - Your User ID - go to Redash settings and hover over your username on the
Users tab. The number in the URL just after /users/ is your User ID,
i.e.
https://app.redash.io/myorg/users/{user id}
.You must be a member of the admin group to see the users list. - API key - also in your user settings, select the API KEY tab and copy it from there
- Test your connection!
- Full domain of your Redash account (Something like:
- Select the query you want to get the Zap for by entering the query ID
(
https://app.redash.io/myorg/queries/{query id}
) - Select the app you want to perform an action when a new query result is added to your query - Slack is a good option.
- Select an action - for this example, we’ll use “Send Channel Message”. You’ll need to connect your Slack account to Zapier as well if you are logged-in in your browser it’ll be pretty instant.
- Enter the channel, message text (you can select different column values from your query), bot/your user in slack, bot name, bot icon emoji or icon url, auto expend links and mentions settings. Bots are cool so you should definitely send the zap as a bot.
Test your connection and turn your zap on!