WhatsApp Business API templates can be sent automatically via Salesbot based on an event, such as when a deal moves to the next stage in the pipeline. With the bot, you can send the first message to a client and respond to their messages.
To add a WABA template to the bot, you need its code. The code will appear in your personal account once the template has been approved.
1. To send a template, copy its code in the "Templates" section of your Wazzup account. Select the desired template in the list, click the edit button → copy the code.

2. Then insert the code instead of the message text.
The code for the template looks like this: 2a6b105a-54d6-4a2b-9749-1a75188b102e { }
You don't need to change anything in it: just copy and add. You don't need to add anything to the template either — then the message won't go away.
The code for the template with variables looks like this:

To attach media, add a link to the file instead of "headerContentUrl". Use a direct link to the file. Those links that lead to Google Drive, Dropbox or other cloud storage will not work.
How to prepare a link to an attachment:
1. Send the file via Wazzup chat to your or your client's number. The service will process the file and assign a link to it.
2. Right-click on the picture → copy the URL of the picture. It will look something like this: https://store.wazzup24.com/c4d2f98d9b3d75d1a8e8d760343c26cc66495ea4

Make sure the link works and leads to the right file. If there is a bad link in the template - the message will not be sent. In the deal card it will be displayed as an error message and in Wazzup chats it will be shown with a red cross.
You can add only the media type that you chose when you created the template. For example, if you agreed on a template with an image, and attach only pictures you won't be able to send a video or document.
If you need to check what type of media you can attach to the message, go to WABA Templates → click the "pencil" in the template line → see the type in the template header.
The button itself already has part of the link prescribed. So instead of "buttonVarN" add only the missing part of the link from the Bitrix24 field in brackets.

1. Insert the template code into the appropriate bot stage. You cannot add new buttons or change their text in the code.
2. In the next stage, create a Validator and set conditions for the buttons:
Select "If client message" → Change "contains" to "regular expression" → Enter the button text in this format: /button text$/
To ensure everything works correctly, make sure to include brackets and the dollar sign ($)—it’s charged for conversions!
3. Assign the next step for each condition.
4. Done! Your bot structure should look like this: Template code with buttons → Validator with conditions → Response for each button.
Now you can save the bot and enjoy how the work gets done effortlessly without your involvement!