Collect Response from a Slack Modal
This is a 'Workflow' template which means that it is a single standalone workflow.
Some workflow templates can be modified to work with other workflow templates - e.g. to convert a data sync between two services from uni-directional to bi-directional
OverviewCopy
The workflow is triggered by a Webhook trigger.
Once you have created a /slash-command in Slack, the workflow serves as the initial integration point that generates a Modal when the /slash-command is fired. This Modal is essentially a form that collects responses on submission.
These responses can then be stored in any database of your choice. In this template, we are using Google Sheets as a generic placeholder for any other database of your choice.
Refer to our Create Salesforce accts / opps with Slack modal template to learn how to use the information gathered through a Slack modal to perform specific actions in a service of your choice.
Connectors UsedCopy
The following connectors are used in this template. This is provided for reference only - there is no need to read through the linked connector pages, as all you need to know for this template is explained here:
End ResultCopy
The below image shows the Modal generated using the /slack-slash-command
. It also shows the collected records stored in a Google sheets and a final message received on Slack on the Submit action of the Modal/Form.
PrerequisitesCopy
This workflow assumes the following:
You have a Slack App created.
You have authentications created for Slack and a database of your choice.
Getting LiveCopy
To configure the workflow for your own use:
Workflow LogicCopy
The overall logic of the workflow is:
The workflow is triggered by two different Slack events. A separate branch in the workflow handles each event.
The boolean condition checks which type of interaction triggered the workflow.
If the workflow is triggered with the
/slack-slash-command
, the true branch is executed, and it launches a form/modal on Slack for the user to configure their inputs.Once the inputs are configured and submitted, the submit event triggers the workflow again, and the false branch is executed. The response collected from the form/modal responses can then be stored in any database of your choice. In this template, we are using Google Sheets as a generic placeholder for any other database of your choice.