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://onboarding.brevo.com/account/register/
  1. Get your v3 API key from:
  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://app.brevo.com/settings/keys/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 (advanced)

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

  1. Send SMTP Mail
    1. 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
  1. Send SMTP Mail (advanced)
    1. The same action as Send SMTP Mail with customizable flexible JSON body.
      Customize the call body according to your requirements:
      The Example JSON body:
      javascript
      { "sender": { "name": "Alex", "email": "senderMail@mail.com" }, "to": [ { "email": "vasile.lupan@zeroqode.com", "name": "John" } ], "htmlContent": "<html><head></head><body><p>Hello,</p>This is my first transactional email sent from Sendinblue.</p></body></html>", "subject": "Subject" }
  1. Send SMTP Mail + File
    1. This workflow is used when sending a simple message with an attached file.
      • 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)
      • Recipient_name*: User name I.E: John
      • Reply_to*: Email on which transactional mail recipients will be able to reply back.
      • Reply_to_name*: User name on which transactional mail recipients will be able to reply back.
      • Attachment_url*: Pass the absolute URL (no local file) or the base64 content of the attachment.
      • Attachment_name*: Name of the attachment with extinction, example: myAttachmentFromUrl.jpg
      • 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")
  1. Send SMTP Mail + File (advanced)
    1. 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.
  1. Send SMTP Mail + Template
    1. You can send an email with a template created in your Sendinblue account.
      • 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)
      • Subject*: Message subject NOTE! You cannot use double quotes ("some text")
      • Recipient_name*: User name I.E: John
      • params_user: Pass the set of attributes to customize the template.
      • params_count: Pass the set of attributes to customize the template.
      • templateId: Id of the template.
  1. Send SMTP Mail + Template (advanced)
    1. 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
  1. Send SMTP Mail with ReplyTo
    1. 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)".