Make.com Integration #2: Automated responses to WhatsApp chats

If you'd like to send automated replies to an incoming WhatsApp chat, then you may do so via Make using TimelinesAI Public API and Webhooks .

In the following instructions, we'll be setting up an automated response for WhatsApp messages that arrive with the keyword "pricing."


Step 1: Create a New Scenario on Make



To get started, we'll go to Make.com and create a "New Scenario", which will allow you to build up your integration:



This will take you to a section where you'll be required to select the trigger:

Click on the "+" button and you'll be able to search for the trigger; type "Webhooks" . Detailed steps on how to create a Webhook trigger are available in this article

Step 2: Enable the Outbound Webhook on TimelinesAI



Open https://app.timelines.ai/integrations/webhooks_v2/
Add a new endpoint or edit existing one. Refer to this article on how to created/edit TimelinesAI webhooks.
Event type you need for the automation is: chat:incoming:new
Make sure the webhook has been enabled/activated

Step 3: Adding Another Module on Make



After configuring the Webhook on TimelinesAI, is time to go back to Make, to continue working on your integration. Now, we'll add a module next to your webhook, as shown below:



Hover your cursor over the "+" button, that's on the right side of the webhook icon, and click on it.
Make will display a search bar. Type "http" and select it from the search results
In the next window select "Make a request"



Then, Make will display a window with some options for you to configure:



URL: add https://app.timelines.ai/integrations/api/messages
Method: select POST
Headers: add a header. Name to use: Authorization and Value to use: Bearer XXXXXXXX
Body type: select "raw"
Content type: select "JSON"
Request content: add {"phone":"+996555855555","whatsapp_account": "+996555855555","text": "Thank you for your interest. Here is our pricing for 2023"}
IMPORTANT:
- instead of +996555855555, enter your own WhatsApp number copied from https://app.timelines.ai/whatsapp
- instead of "Thank you for your interest. Here is our pricing for 2023" type your own message.
- replace XXXXXX with your own token generated and copied from https://app.timelines.ai/integrations/api/

We recommend reviewing this article, to learn more about TimelinesAI Public API

Press OK. Then click "Run once". While the process is being executed, send an actual WhatsApp message to your own WhatsApp number (specified at https://app.timelines.ai/whatsapp).
Once the message lands on your WhatsApp ( and consequently appears in the Timelines Chat list), Make will mark the request as "Completed" and will add numbers next to both modules :


Now click "HTTP make request" module and click on the "Request content" field. A box will open to the left.
Select the first number > delete it. While still being within the "" where the number was deleted > click "phone" under "Chat" from the left box. The variable will be automatically added where your phone number used to be. Click "Ok" to save changes.



Step 4: Adding a filter



Now that we have set up the basic structure of this integration, we will add a filter that will send our automatic response only to those incoming messages that contain the word "pricing".

Click the setup icon between 2 modules> select "Set up a filter"
Setup your filter:
Label: enter desired filter name
Text operators: select "contains"
Enter the desired keyword into the next field. In our case the keyword is "pricing"
Click "Ok" to save changes.




And that's it! You have successfully created an automatic responder- now all your messages that contain the keyword "pricing" will be automatically replied to with a custom message.
To test the integration you can RUN the flow one more time.
To permanently activate the flow set the "Scheduling" ON to "Immediately as data arrives".


If you have any questions then please contact us via our Chat Support or send us an email at hello@timelines.ai!

Updated on: 12/06/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!