Skip to main content

Hi all,

I'm trying to forward Slack alerts to Gmail using Zapier. We centralize alerts from various sources like Redash and GCP into Slack. Then, using Zapier, I forward the alert to a Gmail distribution list.

The setup works well except for alerts sent by the Redash bot. While most messages appear in the text or raw text field, Redash alerts have no content in those fields.

When inspecting the Slack message data in Zapier, I see that the Redash alert body is actually stored inside attachments[0].text.

However, Zapier doesn’t seem to expose this field as selectable input, even in Code or Formatter steps. So I can’t extract or use the alert content in the email body.

Is there any way to access message content inside Slack attachments[].text from a Zap triggered by “New Message Posted to Channel”?

Thanks in advance for any advice!

You could try custom pills:

 

If that doesn’t work, you might have to split your Zap into paths. One for Redash and another for everything else. In the Redash branch, send a raw, empty webhook to second Zap set to trigger when it receives the webhook. You can analyze the json body received in the second zap and that text will probably be exposed either in its own field or just in the raw json body that you then need to parse out.


Thank you for your suggestion. Unfortunately, your approach didn’t work in my case. However, the solution turned out to be quite a basic one…

After a few attempts, I noticed that the Redash bot message finally appeared in the test data of the Slack "New Message Posted to Channel" step. Once I selected that Redash bot message as test data, the attachments field also became available in the Gmail step when inserting data.

I’m not entirely sure what triggered the Redash message to appear in the test data — previously, even searching for it didn’t show anything — but eventually it worked.

Thanks again for your help!


That’s awesome ​@Mayas! We’re glad to hear that the issue is now resolved!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 🤗