# Sendpulse

* [How to configure Sendpulse API](#how-to-configure-sendpulse-api)&#x20;
* [How to set up sending emails from the editor](#how-to-set-up-sending-emails-from-the-editor)&#x20;
* [How to add an email to the address book](#how-to-add-an-email-to-the-address-book)&#x20;
* [How to send an SMS](#how-to-send-an-sms)

## 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.

{% hint style="info" %}
You can send emails only from the email address you specified during the sign up process.
{% endhint %}

![](https://lh5.googleusercontent.com/tC8C8c6R_wjZDvMvgk5jiB9VvpcqBe9nSTO8FR-HMKP5ueeVSuP0h7DoYWE8VQ5ktaJV35EqcplElJoFDE33E0POGBbpWgj4w35LH1TN8FhNoVD2RqH0qYqqLcY453PLN_ftgUgyilavLWq1og)

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**:&#x20;

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.

![](https://lh3.googleusercontent.com/FsdCNqRclYoa6a6sWQxAIw6ephOuwVkkepVZSvCnhYWEH9VfdvXAqeExCl60p9j2uknvIoCZ7nMYzpFvirv-GFOZqzE1WoBAuregI4EQaIhVGrLgd1CQm6H1yTbTronNH5wlAmy3krgEwG_H6A)

Then create a scheme that collects the data.

![](https://lh6.googleusercontent.com/rCermgFjtqDBoZ8TIBgZlGREgGLxerefrQcY7vYRdERQOExZCZhhBLQ2S_zxObFHq4TSM5kt1BHQO0e_-0fPX1ynAWRvbNSLo3drdRKRJMbIYpmiQQxPAegOfnki8djuwxkfrdbIEnj9KIrEIA)

Now let’s test it:

![](https://lh5.googleusercontent.com/ucX81qCR2LnC1KtwUb9iAm76ILV5SNCwKcC-uVp6E9bkl7i_BdaxBDa93aCvJdsxBdD3GFjd2SKkiP-1S5YUom8TMGVRA8496vzVvtWJTLVFFYDMmY4KSPey0DbYe6N-zQrSe-_YXgnPXp0NUA)

## 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mavibot.ai/integrations/other/sendpulse.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
