Route Slack messages and transform text with code
CollaborationSales EnablementDeveloper ToolAPI IntegrationRecipe ToolsMarketing
What it does
When a new event arrives in Slack, this automation checks the message text and routes it based on conditions. It transforms the message with custom code, posts results via HTTP, and edits the message in Slack so the channel sees the outcome.
Who it's for
Engineering teams who need to process Slack messages with custom logic and update them in real time.
How teams use this
Detect keywords and route messages
Check if a message contains specific text and route it to different endpoints based on the match. The automation runs on every new message and only processes those that meet the condition.
Enrich messages with external data
Transform message text with custom code, call an external API via HTTP request, and post the enriched result back to Slack. The flow stays the same and only the code logic changes.
Add conditional branches for different teams
Include additional conditions to check for team names or keywords so messages are routed to different HTTP endpoints or Slack channels. Set up separate branches for each team's workflow.
How it works
- Listen for new Slack events. A new message arrives in a Slack channel, group, or direct message and triggers this automation to begin processing the text.
- Transform message with custom code. Execute custom code to parse and transform the message text, such as creating emoji data or reformatting content for downstream use.
- Post results via HTTP request. Send the transformed data to an external service or HTTP endpoint so other systems receive the processed message content.
- Update the message in Slack. Edit the original message in Slack with the results so the channel sees the transformation applied to the text.