Messaging • Last Updated 9/29/2023

How to Forward SMS to Slack, Email, or another number

Use the Zapier automation tool and Telnyx SMS to forward your messages for marketing purposes.

By Tyron Pretorius

Zapier Telnyx

In this tutorial, we’ll walk through the steps on how to forward SMS to Slack, email, and another phone number using the Zapier automation tool and the Telnyx CPaaS platform.

This can be useful for when you are sending out communications that you want to distribute across multiple channels, or to different parties. Before starting the tutorial, make sure to follow the Telnyx SMS Quickstart Portal Setup Guide to complete the following prerequisites:

  1. Create a free Telnyx portal account
  2. Buy an SMS capable phone number
  3. Create a messaging profile
  4. Associate your SMS number with this messaging profile
  5. Obtain your API V2 authorization key and V2 Profile ID

Zapier Integration

Inbound SMS to Messaging Profile Trigger

Follow the steps below to create your new Zap with Zapier. This will set up a trigger for inbound SMS to one of your Telnyx messaging profiles.

  1. Sign up for an account at Zapier.com if you don’t already have one
  2. Select the “Telnyx” app
  3. Select the “Receive a Message” event
  4. Click “Continue”
  5. Click on the “Choose an account” dropdown
  6. Select “Connect a new account”
  7. Enter your “v2 API Key” and “v2 profile ID”
  8. Click “Yes, Continue”

Now any inbound SMS to any of the numbers associated with this messaging profile will trigger this Zap to run.

Forward SMS to Slack

Using this Zap, you can set up a Slack action to forward the SMS to the intended destination. For example, you can forward the inbound SMS to a direct message or a message in a channel.

Forward SMS to Slack

I would recommend choosing “Yes” for the “Include A Link To This Zap?” option so that if there is an issue it is easy to follow the link from the Slack message and start troubleshooting.

Forward SMS to Another Number

You can forward the SMS contents to another phone number using the “Send SMS” action in the Telnyx app or using Python code in a “Code by Zapier” action to make a request to the Telnyx SMS API.

Forward SMS to another number

Using Python code to make the request will allow you to factor in more complex logic and conditions before sending the message. For example, you can set up logic to only forward the SMS if a keyword is present in the inbound text.

If you want an example of how to send an SMS with Telnyx using Python code in a “Code by Zapier” action take a look at the Send Response using Telnyx SMS API section in the “Marketo 2 Way SMS using Telnyx and Zapier” post on the Workflow Pro blog.

Forward SMS to Email

The “Email by Zapier” action can be used to forward the SMS contents to an email address. Again, it is recommended to include a link to the history of this Zap so that it is easy to click the link and start debugging, if necessary.

Forward SMS Slack Email

Forward SMS to Slack, Email, & URL using Webhooks

If you have a system in place that can send information about inbound SMS using webhooks then you can use the “Catch Hook” trigger event in the “Webhooks by Zapier” app. The “Custom Webhook URL” field will provide you with a destination URL that you can send the inbound SMS information to.

Forward SMS Slack Webhook Trigger

Forward SMS to Slack, Email, and URL using webhooks in Zapier

Forward SMS Slack Inbound Webhook

"Catch Hook" trigger event in Zapier

Forward SMS Slack Inbound Webhook URL

“Custom Webhook URL” of the “Catch Hook” trigger event

For example, on any Telnyx messaging profile you can forward any inbound SMS using webhooks to a primary URL or a backup URL if sending to the first URL fails.

Forward SMS Slack Messaging Profile Webhook Forwarding

Telnyx messaging profile webhook forwarding URLs

If you are looking for a way to test this “Catch Hook” trigger then you can use Postman, the free API testing tool, to make a POST request to the “Custom Webhook URL”. Take a look at the Testing the Marketo API using Postman in the “Marketo API Quick Start Guide” post on the Workflow Pro blog to learn how to make your first POST request.

Forward SMS Slack Postman POST

Postman POST request to Zapier custom webhook URL

Once you have triggered the zap then the exact same “Forward SMS to Slack” and “Forward SMS to Email” actions from above can be used to forward the SMS to Slack and email respectively.

Forward SMS to URL

You can also forward any inbound SMS information to a destination URL using the “POST” action event of the “Webhooks by Zapier” app. In the “Set up action” section you can populate the body of the webhook and specify any headers and authorization that you need to make a request to the destination URL.

Forward SMS Slack Outbound Webhook Body

Forward SMS to URL using a Zapier webhook

A great site for testing your outbound webhooks is https://webhook.site/ because it gives you a URL to send information to, which it will then display as webhooks come in.

Forward SMS Slack Webhook Site

Enjoyed the tutorial? Check out the full version on The Workflow Pro Blog!

Share on Social

Related articles

Sign up and start building.