Salebot.ai
Search…
Sendpulse
You can work on Sendpulse to send emails from your phone number.

How to configure Sendpulse API

There is a free subscription plan on Sendpulse that allows you to send one-off emails.
To use Sendpulse API you’ll need ID, Secret and you’ll also need to register the sender’s email.
You can send emails only from the email address you specified during the sign up process.
You can register the email for sending in the SMPT section

How to set up sending emails from the editor

To send an email, you need to paste this into the Calculator tab:
sendpulse_email(api_id, api_secret, from_email, to_email, subject, message, from_name)
where
api_id — API id from Sendpulse api_secret — Secret from Sendpulse from_email — sender’s email address to_email — recipient’s email address subject — the email’s subject message — the email’s body (the message itself) from_name — sender’s name
To send a template:
First, set the value to the variable template, it’s data on the needed template:
template = { "id": "Template number", "variables": { "variable name": "variable value", "variable name": "variable value" }}
Then call the function
sendpulse_email_template(api_id, api_secret, from_email, to_email, subject, template)
where
api_id — API id from Sendpulse api_secret — Secret from Sendpulse from_email — sender’s email address to_email — recipient’s email address subject — the email’s subject template — the value of the variable that we set above
For ease let’s look into the example of a bot that asks to whom, with which subject and body the email should be sent.
Let’s save the api_id and api_secret values into the variables. To do this, go to Salebot’s project settings.
Then create a scheme that collects the data.
Now let’s test it:

How to add an email to the address book

To add an email address to the address book, use this method:
sendpulse_add_to_addressbook(api_id, api_secret, book_id, email, variables=None)
where
api_id — API id from Sendpulse api_secret — Secret from Sendpulse book_id — id of the address book email — the email you need to add variables — (optional) an array of variables массив переменных. If you need to set it, it needs to be of this format: {“variable_name”:”variable_value”}

How to send an SMS

To send an SMS paste this function into the Calculator tab:
sendpulse_sms(api_id, api_secret, sender, phone, text, transliterate=0, route=None)
where
api_id — API id from Sendpulse api_secret — Secret from Sendpulse sender — sender’s name (under 11 Latin symbols, you can use numbers) phone — the phone number of the recipient text — the message text, you need to place it in brackets if you’re not using a variable transliterate — transliterate = 1, without transliteration = 0 route — the list of channels for sending in countries, you can set it as None
Last modified 4mo ago
Copy link
On this page
How to configure Sendpulse API
How to set up sending emails from the editor
How to add an email to the address book
How to send an SMS