# Brevo

#### Intro <a href="#intro" id="intro"></a>

With this action, you can directly invoke Brevo automation from Tilesdesk. This integration allows Tilesdesk to automatically create a new contact in Brevo.

#### Get an API Key from Brevo <a href="#get-an-api-key-from-brevo" id="get-an-api-key-from-brevo"></a>

Click on your profile name in the upper right corner and pick SMTP & API option from the drop-down menu. Then choose the API Keys tab and create your API key.&#x20;

<figure><img src="/files/rzJmFpu5Z1qOQ1QvQs3S" alt=""><figcaption></figcaption></figure>

Once copied, paste the API Key in the Integrations section under Settings, as below.

<figure><img src="/files/AtOrQWJ3VPhDbuJiWFQw" alt=""><figcaption></figcaption></figure>

#### Get the Brevo Action from the Design Studio <a href="#get-the-brevo-action-from-the-design-studio" id="get-the-brevo-action-from-the-design-studio"></a>

Once in the Design Studio, simply drag & drop the Brevo action on the canvas from the side menu “Integrations”, as shown in the picture below:

\
&#x20;

<figure><img src="/files/1V20vRdeFXWb7pfn2xfv" alt=""><figcaption></figcaption></figure>

Once you drag the action you can configure it. The main part is to set up the Brevo webhook and populate all the fields to send to the Brevo API endpoint using the right flow attributes:

<figure><img src="/files/aNj4Tm2TLIwUE6OpPewt" alt=""><figcaption></figcaption></figure>

In the following example, we configure four fields: first name, last name, and email address, as well as the telephone number (SMS), for the contact that will be created in the Brevo database.&#x20;

A new contact will be transmitted to Brevo with the values "custom\_firstname", "custom\_lastname", "custom\_email" and “custom\_SMS”. The Brevo action will trigger a Brevo API call (<https://api.brevo.com/v3/contacts>), which will create a new contact using the transmitted information.

<figure><img src="/files/fcSzGzSIX9HRQv0YaQrE" alt=""><figcaption></figcaption></figure>

You can connect various blocks to extend the automation's actions created on Brevo. Specifically, two blocks can be linked with the Brevo block, which will trigger upon the success or failure of the webhook invocation on the Brevo platform. In the example depicted in the image below, we've merely connected two blocks to the Brevo block: "Brevo ok" and "Brevo fail," which handle the information sent to and received from the Brevo API, respectively.

<figure><img src="/files/SHValMy76oRKD4AibZKV" alt=""><figcaption></figcaption></figure>

#### How to retrieve the result of the invoked automation <a href="#how-to-retrieve-the-result-of-the-invoked-automation" id="how-to-retrieve-the-result-of-the-invoked-automation"></a>

To view the response from the invoked automation, you need to open the "Advanced" section within the "Brevo" block and assign a new variable to the "Assign result to" field, naming it, for example, "Brevo\_result". Upon completion of the execution, the created variable will be populated with the JSON formatted result of the automation.

<figure><img src="/files/XQp5ucDM4rQa98FYWs72" alt=""><figcaption></figcaption></figure>

The automation creates a new contact in the Brevo database and returns the inserted information to Tilesdesk in the 'Brevo\_result' variable as JSON data.

<figure><img src="/files/8axhESDaDoARl7SB5lOc" alt=""><figcaption></figcaption></figure>

The following is a contact created in the Brevo database using the automation described in this article.

<figure><img src="/files/RMNQf0tch4jOvvWRFUvL" alt=""><figcaption></figcaption></figure>

If you have questions about the Brevo Action or other Tiledesk features feel free to send an email to [support@tiledesk.com  ](mailto:support@tiledesk.com)or leave us [feedback](https://feedback.tiledesk.com/feedback).


---

# 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://guide.tiledesk.com/ai-chatbots-and-automation/actions-explained/brevo.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.
