Send WhatsApp Message Template from Make (ex Integromat)

Ana Updated by Ana

In this article, we will see how to send an HSM Template using Landbot API and Make. A common use case is when you have your opt-in leads stored in an external database and then you need to send the template using that already stored data.

In the following example, we will imagine that our opt-in leads are stored in Google Sheets and that we are going to send a template every time a new row is completed, so firstly we will use the Watch Changes module.

  1. Let's jump to what is of our concern. Create a Make an HTTP request module. Then, we will follow the information we get from the Message Template section of the WhatsApp channel to make the request:

  • URL: https://api.landbot.io/v1/customers/:customerID/send_template/
  • Replace :customerID for the data you get from your Google Sheets.
  • In Method selectย POST
  • In Headers add:

- Name: Authorization. Value: Token XXXXXXXXXXX. Get your API TOKEN from here.

- Name: Content-Type. Value: application/json

  1. Scroll down the module and complete the body.
  • Body type: Raw
  • Content type: JSON
  • Parse Response: Yes

  1. In the Request content, we will paste what we have under --data-raw:

If our template has params, you can use Google Sheet data to complete them:

Press OK and it's done! You can activate your scenario and perform a final test by adding a valid customer id to the sheets.

Extra step for HSM template with buttons

  1. In the case your template has buttons and you want to know what your lead chooses from the bot that is linked to your WhatsApp channel, you will need to add an extra module to make an unassign requestย to prevent the chat from being assigned to an agent, which would block the execution of the bot.ย 
  • URL: https://api.landbot.io/v1/customers/:customerID/unassign/
  • Replace :customerID for the data you get from your Google Sheets.
  • In Method selectย PUT
  • In Headers add the same values as above.
  • Body type must be empty.

You can see the unassign request configuration from our API docs.

How did we do?

How to upload a file to Google Drive using Make.com (formerly Integromat)

Make.com (formerly Integromat) trigger

Contact