Send Automated Message Templates based on Dates

Cesar Banchio Updated by Cesar Banchio

In case we want to send automated messages to a user who initiated a conversation in WhatsApp but has not finished it yet, we can create a Integromat/Make scenario and use the Landbot API to achieve this.

In order to achieve this, we must create 2 scenarios in Make/Integromat and use their Data Storage Module.

The first thing we will do is create the Data Structure to be used in our Data Storage. Go to the left side navigation bar and select Data Storage like so:

There we will create a Data Structure with the following keys:

ID which will be Type Text (where we will store the ID of the user)

For this example, we will also create:

  • Date Start which will be Type Text
  • Continue? which will be Type Text
  • Iteration which will be Type Number with default value to 0

The first scenario will be activated by a trigger in our flow and will send data, on this case the ID of the user and the end variable which will establish if the user reached the end of the flow.

The example flow created is very simple and looks like this:

On the flow, we are creating the continue variable, which will set the condition whether or not we will continue sending the Message Template to the users or not

Both triggers on the flow are the same.

Let's take a look at the first Make/Integromat Scenario (which is activated by the trigger)

The webhook is receiving the ID and the continue variable. The data store is searching is there's a record with the ID that is being received by the webhook

If it is, we will replace the data we have in out Data Store with the new incoming one, if there's no such record, we will create a new one.

The second scenario in make will look like this:

The first module is a data Store that will be searching for records based on today's date:

And will gather all the records from our Data Store that match this condition.

The next module will update the Date Start of the records that match the condition and increase the date by 1. Also, it will increase the iteration field in our Data Store by 1:

Next module is our router, which will be in charge of redirecting the flow based on the Continue variable and the Iterarion variable of each user. Each flow has the following filter:

For the first Message Template we want to send:

For the second message we want to send:

And for the third message we want to send:

How did we do?

Calculate Distances in WhatsApp

Trigger Event if User Abandons Chat Using AWS

Contact