Route function calls to Slack or Teams

Recipe ToolsBotsArtificial IntelligenceSales Enablement

What it does

When a function call arrives, this automation routes it to Slack or Teams based on the destination parameter. It retrieves user information, posts a message, and updates the status so the originating system knows the outcome.

Who it's for

Operations teams who integrate external systems with Slack or Teams without building custom connectors.

How teams use this

Notify Slack from external systems

An external system calls the function with Slack as the destination. The automation retrieves someone, posts a message, and returns success or error status to the caller so the system knows the notification was delivered.

Send alerts to Teams instead

Reuse the same function by passing Teams as the destination. The automation handles user lookup and posting for Teams without changing the core logic.

Add approval buttons to messages

Extend the automation to include approval buttons in the posted message. Add a condition to check the response and update a downstream system based on approval or rejection.

How it works

  1. Receive a function call. A function call arrives with a destination parameter that specifies Slack or Teams as the target channel.
  2. Route to Slack and post. If the destination contains Slack, retrieve someone by email or ID in Slack, post a message as the bot, and update the Slack status variable.
  3. Route to Teams and post. If the destination contains Teams, retrieve someone by principal name or ID in Teams and post a message to complete the routing.
  4. Return status to caller. Update variables with the final Slack and Teams status so the function call response includes whether each step succeeded or failed.