Santa Claus SMSs Logic App

  • Sandro Pereira
  • Nov 29, 2023
  • 4 min read

Christmas is just around the corner, which means that here at home, it’s a crazy and fun time for the kids (actually, for the whole family since we love Christmas!). They started asking us to put up the Christmas decorations really early, and they already wrote a letter to Santa with their requests.

I don’t know about you, but here, Santa exists! I love playing with this idea, and although my oldest daughter is no longer a believer, the younger ones are… even though they say Santa Claus was their father last year :). I tell them that there are many children around the world and Santa Claus cannot be everywhere at the same time, and in order for no child to be without a present, they ask for the help of all fathers. We are Santa’s helpers, like the elves!

Because they were always asking whether Santa had already received the letters, whether he understood the requests, and whether he needed any help… and I always told them that Santa would send magic SMSs to all fathers (modern technology) if he had any problems or when he was able to read the letters. That worked for a while (2 years :))… but now they are asking to see the SMSs. No matter how much I say they are magical SMS that only Dad can see, they beg to see… To solve this problem, I activated my geek side and thought, why not create a Logic App that sends me SMSs with personalized messages from Santa Claus!

Azure has a service called Azure Communication Services that allows you to send SMS messages (among other features). Still, unfortunately, this service was not eligible for my MVP subscription, nor was it available for free accounts with credits. It has to be on an enterprise or pay-per-use subscription. This way, I was not able to test these services. However, there is another third-party connector you can use in Logic Apps to send SMS messages: the Twilio Connector.

📝 One-Minute Brief

A fun Christmas experiment using Azure Logic Apps to send personalized SMS messages from Santa Claus. This article shows how to build a simple Logic App with the Twilio connector to send SMS notifications, combining cloud integration with a bit of holiday magic.

Before you start creating the Logic App, you need to :

  • Access to the Twilio website: https://www.twilio.com/en-us and create an account.
  • You have the option to Start for free (you will have $15 to test this service)
Start for free
  • After you register, you will have access to your Twilio Console, where you can get a number.
    • This is a US number, but that is perfect for me. If my kids see a foreign number, it will be more credible. Santa Claus lives on the North Pole.
Twilio Console
  • You also have access to your Account info. You will need this information to configure the connector inside the Logic App.
Twilio Console

Now that we have configured our Twilio account, let us create our Santa Claus Logic App. To do that, you need to:

  • Access the Azure Portal and create a Logic App.
    • For simplicity, we will use a Logic App Consumption and name it LA-Santa-Claus-POC
  • For the trigger, we will use a Request When a HTTP request is received. The Logic App will receive the following payload:
{
    "msg": "This is the SMS"
}
  • In order to make it easier to map these values in the Twilio connector, on the Request When a HTTP request is received trigger:
    • Click on Use sample payload to generate schema.
    • Copy the JSON above and click Done.
When a HTTP request is received
  • Click on the + New step, and from the search text box, type Twilio and select the Twilio connector, followed by the Send Text Message (SMS) action.
Send Text Message (SMS)
  • The first thing you need to do is to configure the Twilio connector by setting the:
    • Connection name
    • Twilio Account ID and Access Token > These two you can get from your Twilio Console.
Send Text Message (SMS)
  • Once you configure the connector, we need to:
    • From the From Phone Number combo box property, select the Twilio number.
    • In the To Phone Number field, enter your phone number.
    • And on the Text property, map the message from the request: triggerBody()?[‘msg’].
Send Text Message (SMS)
  • And Save your Logic App.

Simple as that!

Now, if you test your Logic App you will notice that you will have a new SMS from Santa Claus!

SMS Received

I don’t know about you, but I will have fun with my kids tonight!

Hope you find this helpful! So, if you liked the content or found it helpful and want to help me write more, you can buy (or help buy) my son a Star Wars Lego set! 

Buy me a Lego
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

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

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top