Brevo (formerly Sendinblue) ย Plugin for Bubble

Demo to preview the settings

Introduction

Send emails to your customers with Sendinblue using your SMTP account, a free alternative instead of using Sendgrid. Also a good choice for sending emails without using default admin-no-reply@bubble.is
โ—
This plugin uses the v3 API version (the last version)
Prerequisites
To use this plugin you will need to:
  1. Create an account in Sendinblue: https://www.sendinblue.com/users/signup/โ€‹
  1. Get your v3 API key from: https://account.sendinblue.com/advanced/api โ€‹
  1. In case when Brevo needs to verify your account (to prevent spammers), before sending emails, you have to send their support team your page to verify the domain.

How to setup

  1. Install the plugin https://bubble.io/plugin/sendinblue-smtp-1520524904151x890914947846373400 โ€‹
  1. Get your v3 API key from: https://account.sendinblue.com/advanced/api โ€‹
  1. Add your v3 API key to the plugin settings tab (here)
  1. Check your account is verified and ready to send emails
You're set to send emails!

Plugin Data/Actions Calls

There are 4 different workflows, below is explained for correct usage.

Data Calls

1. Get a List of emails

โ—
This endpoint will show the list of emails for the past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
Image without caption
You have 5 types of sorting to get the list of emails. You must specify at least one type for the call to work correctly.
1. email - Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. 2. templateId - Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose a transactional email. 3. messageId - Mandatory if templateId and email are not passed in query filters. Message-ID of the transactional email sent. 4. startDatedate - Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. The maximum time period that can be selected is one month. 5. endDatedate - Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. The maximum time period that can be selected is one month.

Action Calls

2. Send SMTP Mail

We will use this workflow when we need to send a simple message to a user. This workflow is useful i.e. for sending an activation URL, reset password, etc. How to use (fields): (The * fields are required)
  • Sender_name: I.E: Alex Black
  • Sender_mail*: I.E: info@zeroqode.com (we suggest using the same mail that is configured on Sendinblue as sender mail)
  • To_name*: User name I.E: John
  • Message_html*: Message body (accepts HTML tags) NOTE! You cannot use double quotes ("some text")
  • Subject*: Message subject NOTE! You cannot use double quotes ("some text")
  • Name_toreply*: I.E: Zeroqode

3. Send SMTP Mail + File

This workflow is used when sending a simple message with an attached file. This workflow is practical i.e. for sending invoices, birthday post-cards, or others. (We recommend using this workflow only when you need to send a file because the file is required, so if you need to send only a message, don't use this one)
โ˜
NOTE: You cannot use double quotes in the subject or message ("some text")!
How to use (fields): (All the other fields are the same as point 1)
  • Filename_extension*: Here we can customize the filename that will receive the user. I.E: If we are sending a Jpeg image: Myfilename.jpg
  • URL*: File URL. Please note when we use the file from our database, it is stored in //s3โ€ฆ, so when we send the file - we need to set static http/s: then the URL of the file
Image without caption
  • content*: File content. If you are using a file from your database, use this field. To do this, you need to convert the file to Base64 code.
Image without caption
โ˜
NOTE: Don't use both fields (URL and content) at the same time !!! (Next 2 workflows: Templates). Please note you need a template. The sender name, and sender mail is configured in Sendinblue when the template is created.

4. Send SMTP Mail + Template

You can send an email with a template created in your Sendinblue account.
Image without caption
Customize the call body according to your requirements:
The Example JSON body:
javascript
{ "sender":{ "email": "kacinski@gmail.com" }, "to":[ { "email":"zqdevelopment@gmail.com" } ], "subject":"Test Subject2", "replyTo":{ "email":"kacinski.e@gmail.com" }, "params":{ "name":"Alex K", "count":"Second" }, "templateId":2 }
โœ…
You can customize the {body} content of the Send SMTP Mail + Template action. For example, you can add the sender name, reply_to name fields, and many more. It is necessary to stick to the JSON syntax rules. You can validate your {body} using any free JSON validator, like https://jsonlint.com/
Image without caption
โœ…
The Sendinblue documentation can be viewed here https://developers.sendinblue.com/reference/transactional-emails
To insert a template, add the required parameter to the call body, where the number is the template ID.
javascript
"templateId":2
To add params from the template, add the required parameter to the call body
javascript
"params":{ "name": "Alex K", "count":"Second" },
where "name" is the paramsKey, "Alex K" is the paramsName
In the template on the Sendinblue side, the parameters are written as follows {{ params.paramsKey }}
Image without caption

5. Send SMTP Mail with ReplyTo

This workflow is used when sending a simple message with the โ€œreplytoโ€ parameter.
Image without caption

Changelogs

Update: 31/12/2020 โ€“

  • Added new API - Get List of Emails: this data call offers information about emails
  • Added new API action - Send SMTP Mail with Reply: action call used to send emails with replyTo parameter

Update: 03/06/2021 - Version 1.5.0

  • Updated defaults in the call fields

Update: 23/08/2020 - Version 1.7.0

  • Added new actions with static fields
Image without caption
Image without caption
Image without caption

Update 19.07.23. Version - 1.14.0

  • Fixed Api call "Send SMTP Mail (advanced)".