This automation responds to new WhatsApp messages based on keywords in the received message.
Example usage: If received message includes the phrase “book a meeting”, automation sends text "To book a meeting visit https://timelines.ai" in response. If it doesn’t, automation sends text "Thank you for reaching out. We will get back to you shortly" in response.
Open TimelinesAI Workflow Builder https://app.timelines.ai/albato/automations and click New Automation
Click Add Trigger
Set up a trigger:
App where your data will come from: TimelinesAI
Event to trigger the automation: New incoming message
Connection token: leave as is.
Click Add action:
Add an action
App where your data will come from: TimelinesAI
Action to perform: Send message in existing Chat
Connection token: leave as is.
Map fields for the action and click Save:
Chat ID: click the field. New window with data from previous steps will appear. Unfold the fields from Step1 and find Chat ID. On click, value will will be inserted into "Chat ID" field.
Message: type desired message text. Example: "To book a meeting visit https://timelines.ai"
Rename created action for clarity. In flows with multiple actions, using distinct, easy‑to‑scan names is recommended. This gives a better control and understanding over the flow in further steps. In this example the action was named Message 1
Add one more action using same steps as above. Use different message text for the 2nd action.
Click the "+" icon after the Step1 and select Tool
Select Router
Set up router conditions
Field: click the field. New window with data from Step1 will appear. Find The text of the message. On click, value will will be inserted into "Field".
Condition: select "contains"
Value: type desired value.
Then ( conditions met): select one of the 2 actions created earlier.
Otherwise ( conditions not met): select the remaining action.
Click the "+" sign after the Step3 ( first message sending action). And add tool "Break".
Then click "Start" to activate the flow
Additional recommendations ( optional)
Add error handler to each action step and choose what to do when errors occur:
Stop the automation
Continue the automation
Move on to the selected step below