Connect Cotonity to Slack, send formatted channel messages with Block Kit, and build approval flows where a workflow pauses until a team member clicks Approve or Reject.
Setting Up the Slack Connection
Before you can send Slack messages from a Cotonity workflow, you need to authorize the Slack integration. Navigate to Connections → Add Connection → Slack and click the 'Connect with Slack' button. You will be redirected to Slack's OAuth consent screen, where you choose the workspace to connect and review the permissions Cotonity requests. The default permission scopes cover sending messages to public and private channels, posting as a bot user, and uploading files. Once authorized, the connection appears in your Connections list with a green status indicator. The bot user 'Cotonity' is automatically added to your workspace — you do not need to invite it to channels manually, but it must be invited to private channels before it can post there.
Sending a Basic Channel Message
Add a Slack: Post Message step to your workflow and select your Slack connection from the dropdown. Enter the channel name (with the '#' prefix) or a channel ID, then compose your message in the text field. The message field supports Slack's mrkdwn formatting: use asterisks for bold, underscores for italic, backticks for inline code, and angle brackets for links. Dynamic data from your workflow context can be injected using Cotonity's template syntax — for example, 'New lead *{{trigger.body.first_name}} {{trigger.body.last_name}}* signed up from {{trigger.body.company}}.' Use the test panel to fire a sample payload and confirm the message arrives in Slack with the correct formatting before activating the workflow in production.
Rich Messages with Block Kit
For more visually structured messages, use Slack's Block Kit layout system. Instead of a plain text message, switch the Slack step to 'Blocks' mode and provide a JSON array of block objects. Common blocks include section (for text and accessory elements), divider (a horizontal rule), and fields (a two-column grid of key-value pairs). Cotonity provides a Block Kit template library with pre-built patterns for alert cards, approval requests, and metric summaries. Click 'Use Template', choose a pattern, and replace the placeholder values with dynamic expressions from your data context. If you are comfortable building custom layouts, the Slack Block Kit Builder website is a helpful visual editor — paste the JSON output directly into Cotonity's Blocks editor.
Interactive Approvals and Button Actions
Cotonity supports a lightweight approval flow built on Slack's interactive components. Add a Slack: Request Approval step to your workflow, configure the approver's Slack user ID or email address, and define the message they will receive along with Approve and Reject buttons. The workflow pauses at this step until the approver clicks one of the buttons. The response ('approved' or 'rejected') and the approver's identity are returned to the workflow context, allowing subsequent steps to take different actions based on the decision. Approval steps have a configurable timeout — if no response is received within the specified duration, the step resolves with a 'timed_out' status so the workflow can handle the absence of a response gracefully.