Post survey responses to Slack with Shopify Flow

Shopify Flow can post a Slack message for each finished survey, or for each question a customer answers or skips. Zenith starts the workflow, and Flow's Send Slack message action posts it through the Slack workspace you connect. Zenith never sees that workspace.

Before you start

  • A Flow workflow that starts on Zenith's trigger. If you have not made one yet, follow steps 1 to 3 of setting up Shopify Flow for Zenith, then come back here for step 4.
  • The Slack workspace and the channel you want responses posted in.

Add the Slack action

  1. Connect Slack

    Click + and choose Action. The list opens filtered to Installed apps, so Slack is missing until you click × on that filter. Search for Send Slack message and choose the one marked Slack (another app has an action with the same name). Flow says the app is not installed: click Install and sign in to your Slack workspace. Close the sign-in window and refresh the page.

  2. Invite Flowbot to the channel

    Flow can only post in a channel Flowbot has joined. In Slack, open the channel you want responses posted in and send /invite @Flowbot.

  3. Write the message

    Back in Flow, if the Send Slack message step is still in your workflow, select it. Otherwise click +, choose Action and choose it again. If it is greyed out, refresh the page. In Channel, or member id, type the channel you invited Flowbot to, with its #. Then paste the message below for your trigger into Message.

  4. Turn it on

    To give it a name, click More actions, then Rename. Then click Turn on workflow, and Turn on to confirm.

One message per order

Choose Survey completed as the trigger in step 3, and each finished survey posts one message with every answer in it. A customer who stops partway posts nothing. Paste this into the message box:

Survey completed on order {{orderId}}
{{summary | replace: "&", "&amp;" | replace: "<", "&lt;" | replace: ">", "&gt;"}}

One message per answer

Choose Survey response received as the trigger in step 3, and every answer posts a message, including answers from customers who do not finish. Paste this into the message box:

Survey answer on order {{orderId}}
{{question}}: {{answer | replace: "&", "&amp;" | replace: "<", "&lt;" | replace: ">", "&gt;"}}
Comment: {{comment | replace: "&", "&amp;" | replace: "<", "&lt;" | replace: ">", "&gt;"}}

A field with nothing in it arrives as n/a, so an answer without a comment ends in Comment: n/a.

Why the extra filters

The extra filters on answer and comment stop a customer's text from turning into Slack mentions like @channel. The summary carries the same filter for the same reason. Every other field is in the variables tables, and any of them can go in the message the same way; give any field a customer types the same filter.

What to know

  • One message per answer means one message per question. On Survey response received, a customer who answers three questions posts three messages. Skipped questions post one too, with Status set to skipped; add a condition on Status if you only want answers.
  • Zenith cannot see your workflows. If messages stop arriving, check the workflow in Flow itself.

Install Zenith from the Shopify App Store