Skip to content

Simple scenario for sending SMS to customers via Integromat

Отправка SMS через Integromat

Updated: 08.04.2023

SMS is still popular everywhere. For many businesses, it’s a great way to inform the customer about the status of their order and other things.

In this article, I’ll tell you how to set up SMS sending in Integromat. This time the scenario will be small and simple.

Отправка SMS через Integromat

Sending SMS via Integromat

Creating a scenario and defining a trigger

After creating the scenario, the first thing to do is to define a trigger for the SMS to be sent. In my case, working in Trello we move the card to a certain list. Let’s call this list “Done”.

  • Create a Trello trigger -> Watch activities (Instant).
  • In the window choose board and list, which you want to monitor.
  • Then select the activity type updateCard.
  • Run the test module and move the card. If the module works – great, go ahead.

Put filter on listAfter (if the trigger is moving card in the list)

The module will be triggered every time you move a card in or out of the “Done” list. Therefore, to filter out unnecessary executions, we put a filter on the listAfter variable. In it, we put the id of the “Done” list (we find out the list id from the test triggering of the module or in the source code of the Trello board).

Фильтр на перемещние карточки в необходимый столбец

Filter moving the card to the desired list

Thus, only necessary packages will be passed on.

Set the SMS text and the recipient’s phone number

Next, I recommend using the Set Multiple Variables module to set the variables with the SMS text and the recipient’s phone number.

Задание переменных для отправки СМС

Setting variables for sending SMS

  • If the phone number is in a custom field in the Trello card, we get it with the map() function.
  • The SMS text can be either static or dynamic. In my case, it is almost static, I only use shortID dynamically as the order number. If you have a lot of options for the SMS text, you can use the if, switch and other logical functions for that.
  • To prevent repeated sending of SMS, you can make a dropdown field in the Trello card: Status SMS. In this scenario, I also check the ID of the checked option in this drop-down list. If the status is “Sent“, then the filter won’t let the scenario through from here.

Choosing an SMS provider

Here we need to decide on the SMS service provider. In the beginning, I took the easiest way – I chose ClickSend from the available integrations in Integromat. It was easy to set up in a couple of clicks.

Настройка отправки SMS в ClickSend

Setting up SMS sending in ClickSend

  • Sign up for ClickSend, get an authorization token. Enter it in Integromat connection setup window.
  • Then set the sender name, text, and recipient number in the field.
  • Everything works.

But actually, ClickSend appeared to be very expensive for sending SMS in CIS countries, and since Integromat is European service, it has European services integration at most. There are no CIS-SMS providers in it.

What to do? Find a provider, who has API, I think there are a lot of them. In Belarus, there is an operator, where the cost of sending SMS in the country is 10 times cheaper than ClickSend. SMS sends by HTTP-request to a unique link.

To send requests to API, we register, refill balance, get token. I assume that the procedure is similar for any other SMS provider in your country.

  1. Go back to our scenario, add the module HTTP -> Make a request.
  2. According to the documentation, send the SMS text and the recipient’s number in the request URL. The method is GET (at my provider). Nothing else is needed.
Отправка СМС через API и модуль HTTP Send a request

Sending SMS via API and the HTTP Send a request module

The only drawback: in the ClickSend module you could do line break, but here you can’t (or I don’t know how to do it in the request URL), so the SMS comes in one paragraph, but that’s a minor thing.

Remember, that using Cyrillic symbols makes your SMS 2-3 times bigger in size. Use Latin symbols. You can check the size of your SMS here

Finishing the scenario

Next, you can set the status in the custom field SMS Status on a Trello card to Sent with the module Trello -> Set a Custom Field on a Card.

You can also put a router and error filter if something went wrong. In my case it looks like this:

Проверка статуса ошибки в ответе HTTP модуля

Checking the error status of the HTTP module response

If the phone number was filled in incorrectly, there will be an error, and it is important to catch it in a separate branch and notify the agent. This can be done either with a comment in the Trello card or with a message in Telegram. The second branch without an error is put as a fallback route.

Сообщение в Telegram об ошибке отправки СМС

Message in Telegram about an error in texting (Russian)

Also, if an error occurred while sending SMS, the Trello card will show the status of SMS Not Sent, which additionally indicates an error.

That’s a simple scenario for today. If you have any questions, feel free to ask in the comments.

Leave a Reply

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