Forward incoming SMS to MS Teams via Webhook

From the everyday life of our customers: How you can use Webhook Relay to forward incoming SMS to MS Teams

It is a very special reward for our work when our customers implement their own ideas, even more so if they share the results with us! Even if we can’t deliver every solution in the world on our own, it’s great to see how our customers’ wishes become reality by employing simple means. Shortly before the turn of the year, such a situation occurred again: One of our customers wrote to our support team. His wish: Send incoming SMS  to a specific channel in MS Teams.

The idea – forward SMS to MS teams

Our customer wanted to forward the incoming SMS to MS Teams via webhook, where they also need be assigned to a specific channel. This way, his team was going to be able to read the incoming SMS instantly in their standard communication tool. The catch: In our webapp, forwarding via webhook can be activated easily, but MS Teams requires a format that is not identical to the one we deliver. Therefore, an additional step was necessary in which the format is prepared for MS Teams.

The implementation

In principle, it would have been possible to create the connection between seven and MS Teams via Zapier. However, there was a first limitation here: our customer did not want to use Zapier for operational reasons. We therefore advised him to use another redirection for the webhook, for example via Webhook Relay.

No sooner said than done. Our customer worked his way into Webhook Relay and was thrilled. In a short time he created a function that converts the request so that is was accepted by MS Teams.

I didn’t know about Webhook Relay, that’s really cool!

The function:

local json = require("json")
local query, err = r.RequestQuery
if err then error(err) end
local message = "New message from [+"..query["sender".]"](tel:+"..query["sender"].."): **"..query["text"]..."**"
local new_payload = {
  type = "message",
  attachments = {
      contentType = "application/",
        contentUrl = null,
        content = {
          schema = ""
          type = "AdaptiveCard"
          version = "1.2",
          body = {
              type = "TextBlock",
                text = message
local result, err = json.encode(new_payload)
if err then error(err) end
r: SetRequestHeader("Content-Type", "application/json")
r: SetRequestMethod("POST")
r: SetRequestBody(result)

In short, this function converts the information coming into Webhook Relay into a format, that is accepted by MS Teams. Now our customer’s team can see in MS Teams when an SMS is received by the company and respond to it quickly. We are excited to be a part of their corporate communications!

Possible use cases

We have already explained in past articles that it can be of great advantage to be able to receive SMS as a company. In this particular case, the incoming SMS are not only received in our system, but are made available to multiple people in the company via MS Teams. This is useful for several use cases, which of course apply to any kind of forwarding to a communication tool like MS Teams.

Customer service

Especially if you offer your customers the possibility to contact your customer service via SMS, a forwarding of incoming SMS to MS Teams, or the communication tool of your choice, can be very useful. Even though SMS are very attention-grabbing in themselves, the advantages are obvious.

Your team is most likely already communicating via MS Teams, and is focused on incoming messages during work hours. By delivering the SMS to a dedicated channel, support staff can respond quickly to incoming messages. In addition, colleagues in the team who are not currently responding to the SMS can also see what the customers’ biggest concerns are at the moment. This allows your team to quickly identify when many customers are making the same requests and spot major issues early.


Many customers also use our inbound SMS to be notified of certain events. Through automation services or direct connection to our API, countless types of alerts are possible. Connections to Internet of Things devices can trigger classic alerts, while automations can be used to receive notifications, for example of unusually high mentions on social media. By forwarding these SMS to MS Teams, in case of doubt, not only one person is notified, but your entire team knows right away. In addition, you can have the SMS forwarded to another number so that the SMS received shows up here as well.

Forward your incoming SMS to MS Teams, for example to send alert messages to your team

Internal communication

You can also use SMS forwarding to MS Teams for internal emergency communication. A separate channel that is only used in emergency situations makes sense in most teams anyway. It relieves your team of the decision which messages really need immediate attention and which can be answered later. In some cases, it also makes sense to include the above-mentioned alerts in this channel. The big advantage of being able to receive SMS here is that you can reach your team via messenger even if you don’t have access to the internet yourself. Simply send an SMS to the inbound number.

Forwarding SMS to MS Teams offers advantages and is easy to implement

Of course, these are just a few examples of how you can make forwarding SMS to MS Teams, and to other coworking platforms, work for you. We already offer integrations for many programs and we are constantly working on expanding this offer. If you are missing an integration option, feel free to contact us, we will be happy to hear from you. However, as you can see in the example above, services such as Zapier or Webhook Relay are also effective tools that can help to make your wish come true. We look forward to seeing what you come up with!

Best regards
Your sms77 team


Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

This site uses Akismet to reduce spam. Learn how your comment data is processed.