Post survey responses to Slack with Shopify Flow

Shopify Flow can post a Slack message 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. Choose the channel you invited Flowbot to, then paste the message below into the message box.

  4. Turn it on

    Click New Workflow to give it a name, then click Turn on workflow.

The message to paste

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

The extra filters on answer and comment stop a customer's text from turning into Slack mentions like @channel.

A field with nothing in it arrives as n/a, so an answer without a comment ends in Comment: n/a. Every other field is in the variables table, and any of them can go in the message the same way.

What to know

  • One message per question. 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