Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active May 3, 2026 23:15
Show Gist options
  • Select an option

  • Save magnetikonline/4aed7afbccd3b3ad661a3032c064e358 to your computer and use it in GitHub Desktop.

Select an option

Save magnetikonline/4aed7afbccd3b3ad661a3032c064e358 to your computer and use it in GitHub Desktop.
Sending AWS SNS message subscription into Slack workflow.

Sending AWS SNS message subscription into Slack workflow

Inspired by: https://stackoverflow.com/a/72574950

A no-code solution to push messages sent to an AWS SNS topic into Slack via a workflow webhook.

  • Create a new Slack Workflow, using From a webhook as the triggering event.
  • Include the following Data variables:
    Message
    Token
    
  • Next, add a Slack Workflow step to Send a message to... a nominated channel with Message and Token values included.
  • Publish the Slack Workflow and obtain the Web request URL from the opening event trigger step.
  • Create an SNS topic subscription where:
    • Protocol is HTTP.
    • Endpoint is Web request URL from previous step.
  • SNS will now call Web request URL, and you will receive a Slack message from the Workflow containing Message and Token values.
  • Using the Token, confirm the SNS topic subscription via the AWS CLI:
    $ aws sns confirm-subscription --topic-arn SNS_TOPIC_ARN --token LONG_TOKEN_STRING
    {
      "SubscriptionArn": "SUBSCRIPTION_ARN"
    }
  • Finally, go back to your Slack Workflow and update the message body/add additional triggering actions/etc. You can remove Token from the From a webhook initial step, as no longer required.
  • Done!

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment