Messaging • Last Updated 8/13/2024

Marketo SMS Messaging with the Telnyx API

A tutorial on how to build outbound text messaging into your Marketo campaigns using webhooks to call the Telnyx messaging API.

By Tyron Pretorius

marketo text messaging

In this tutorial, we'll walk through how to build outbound text messaging into your Marketo campaigns using webhooks to call the Telnyx messaging API.

For an introduction on what to look for in a messaging provider, take a look at the SMS Marketing with Telnyx post for a break down of the pricing and features of Telnyx messaging.

Also, if you want a sneak peek at the cool things you can do once you have set up Marketo text messaging then check out the SMS Integration: Webinar Reminders post.

The first step to Marketo text messaging is to set up your Telnyx account. If you're new to the Telnyx platform, make sure to check out our Messaging Quickstart Portal Setup Guide which will walk you through the following steps for getting started:

  1. Create a free Telnyx portal account
  2. Buy a messaging capable phone number
  3. Create a messaging profile
  4. Associate your number with this messaging profile

Creating the Webhook

Next, login to Marketo and navigate to the “Webhooks” section in “Admin”

  1. Select “New Webhook”
  2. Name the webhook
  3. Paste https://api.telnyx.com/v2/messages into the “URL” field
  4. Leave the “Request Type” as “POST”
  5. Paste the code below into the “Template” field

SMS marketing

Notice how a lead token is used to pull in the phone number of the person the message will be sent to. You will need to swap in your own lead phone number field in here and replace the “+12345678910” number above with the messaging-enabled phone number you purchased before.

  1. Leave “Request Token Encoding” as “None”
  2. Set “Response Format” to “JSON”
  3. Click “Create”

Marketo Text Messaging Webhook Configuration

Marketo text messaging webhook configuration

Authorizing the Webhook

Navigate to the Auth section of your Telnyx account and create a new API Key following the steps below:

  1. Select “Create API Key”
  2. Click “Create”
  3. Copy the “API Key”

Next, follow these steps in Marketo to set up the Authorization header:

  1. Click on “Webhook Actions”
  2. Select “Set Custom Header”
  3. Click “Add”
  4. Put “Authorization” in the header column
  5. Put the word “Bearer” followed by a space in the “Value” column
  6. Paste your Telnyx API key in the “Value” column
  7. Click “Add”
  8. Put “Content-Type” in the header column
  9. Put the word “application/json” in the “Value” column
  10. Click “Save”

marketo text messaging webhook

Marketo text messaging webhook custom header

Marketo Text Messaging with Number Pooling

Telnyx offers the ability to distribute outbound text messages over the numbers associated with a messaging profile with a feature called “Number Pooling”. If you want to learn about how number pooling can help you increase throughput and deliverability rates as well as an explanation of the features like “Sticky Sender” check out the Marketo SMS Marketing with Telnyx post.

Number Pool Settings in the Telnyx Portal

Number Pool Settings in the Telnyx Portal

The setup and custom header of the webhook will be the exact same with the only changes being that the URL must be updated to the number pool endpoint and the payload must be updated to specify the messaging profile id instead of the “From” phone number.

Text Messaging With Marketo marketo text messaging w number pool

Marketo text messaging with Number Pool

Marketo 2 Way Text Messaging

As with email marketing, it is important to adhere to regulations governing text message communications. Take a look at the Marketo 2 Way SMS using Telnyx and Zapier post to see how you can auto-respond to inbound text messages like “HELP” and “STOP” to comply with text message regulations.

Once you have implemented 2 way text messaging you are now ready to start using text messages in your smart campaigns, for purposes like webinar reminders.

Enjoy the tutorial? Make sure to check out the full version on the Workflow Pro Blog!

Share on Social

Related articles

Sign up and start building.