1. Overview
Brevo (formerly Sendinblue) is a comprehensive digital marketing platform that provides email marketing, SMS marketing, marketing automation, and CRM tools. The Brevo API enables developers to programmatically manage contacts, send transactional emails, and automate marketing workflows.
With the GoInsight Brevo node, you can seamlessly integrate email marketing and contact management into your automated workflows. This includes:
- Contact Management: Create, update, retrieve, and delete contacts in your Brevo account. Manage contact attributes and maintain organized contact lists.
- Email Operations: Send transactional emails and template-based emails directly through the Brevo platform with full customization options.
- Sender Management: Create, retrieve, and manage verified sender identities for your email campaigns.
- Attribute Management: Define and manage custom contact attributes to store additional information about your contacts.
2. Prerequisites
Before using this node, you need to have a valid Brevo account. You may need appropriate permissions to generate and manage API keys for authentication.
3. Credentials
For a detailed guide on how to obtain and configure credentials, please refer to our official documentation: Credentials Configuration Guide.
4. Supported Operations
Summary
This node allows you to perform operations related to contacts, emails, senders, and contact attributes in your Brevo account.
| Resource | Operation | Description |
|---|---|---|
| Contact | Get All Contacts | Retrieve a list of all contacts with pagination and sorting options. |
| Contact | Get a Contact | Retrieve detailed information for a specific contact by email or ID. |
| Contact | Create a Contact | Create a new contact in your Brevo account. |
| Contact | Update a Contact | Update an existing contact's information. |
| Contact | Create or Update a Contact | Create a new contact or update if it already exists. |
| Contact | Delete a Contact | Delete a contact from your Brevo account. |
| Contact Attribute | Get All Contact Attributes | Retrieve all custom contact attributes defined in your account. |
| Contact Attribute | Create a Contact Attribute | Create a new custom contact attribute. |
| Contact Attribute | Update a Contact Attribute | Update an existing contact attribute's properties. |
| Contact Attribute | Delete a Contact Attribute | Delete a custom contact attribute. |
| Send Email | Send a transactional email with custom content. | |
| Send Template Email | Send an email using a pre-defined template. | |
| Sender | Get All Senders | Retrieve all verified sender identities. |
| Sender | Create a Sender | Create a new sender identity. |
| Sender | Delete a Sender | Delete a sender identity. |
Operation Details
Get All Contacts
Retrieve a list of all contacts from your Brevo account with pagination and sorting capabilities. This operation allows you to fetch contacts in batches and control the order of results.
Options:
- Limit: Number of contacts to return per page (default: 50, max: 1000)
- Offset: Starting index for pagination (default: 0)
- Sort: Sort order - asc for ascending or desc for descending by creation date (default: desc)
Output:
- Contacts (object-array): List of contact objects containing contact details
- Count (number): Total number of contacts returned in this response
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Get a Contact
Retrieve detailed information for a specific contact using their email address or contact ID. Returns complete contact profile including attributes and list memberships.
Input Parameters:
- Identifier: Email address or contact ID to retrieve
Output:
- Contact (object): Complete contact information including all attributes
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Create a Contact
Create a new contact in your Brevo account with email address and optional attributes. You can assign the contact to lists and set custom attribute values.
Input Parameters:
- Email: Email address of the contact to create
Options:
- Attributes: JSON string containing custom attributes (e.g., {"FIRSTNAME": "John", "LASTNAME": "Doe"})
- EmailBlacklisted: Whether the contact is blacklisted for email campaigns (default: false)
- SmsBlacklisted: Whether the contact is blacklisted for SMS campaigns (default: false)
- ListIds: Comma-separated list IDs to add the contact to
- UpdateEnabled: Whether to update the contact if it already exists (default: false)
- SmtpBlacklistSender: Comma-separated sender emails to blacklist for this contact
Output:
- ContactId (number): Unique identifier of the created contact
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Update a Contact
Update an existing contact's information including attributes, list memberships, and blacklist status.
Input Parameters:
- Identifier: Email address or contact ID to update
Options:
- Attributes: JSON string containing attributes to update
- EmailBlacklisted: Update email blacklist status
- SmsBlacklisted: Update SMS blacklist status
- ListIds: Comma-separated list IDs to add the contact to
- UnlinkListIds: Comma-separated list IDs to remove the contact from
- SmtpBlacklistSender: Comma-separated sender emails to blacklist
Output:
- Success (bool): Whether the update was successful
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Create or Update a Contact
Create a new contact or update an existing one if it already exists. This is a convenience operation that combines create and update functionality.
Input Parameters:
- Email: Email address of the contact
Options:
- Attributes: JSON string containing custom attributes
- EmailBlacklisted: Email blacklist status
- SmsBlacklisted: SMS blacklist status
- ListIds: Comma-separated list IDs to add the contact to
- UnlinkListIds: Comma-separated list IDs to remove the contact from
- SmtpBlacklistSender: Comma-separated sender emails to blacklist
Output:
- ContactId (number): Unique identifier of the contact (for new contacts)
- Success (bool): Whether the operation was successful
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Delete a Contact
Permanently delete a contact from your Brevo account using their email address or contact ID.
Input Parameters:
- Identifier: Email address or contact ID to delete
Output:
- Success (bool): Whether the deletion was successful
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Get All Contact Attributes
Retrieve all custom contact attributes defined in your Brevo account. Contact attributes allow you to store additional information about your contacts beyond the standard fields.
Output:
- Attributes (object-array): List of all contact attribute definitions
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Create a Contact Attribute
Create a new custom contact attribute to store additional information about your contacts. You can define the attribute type and enumeration values for dropdown attributes.
Input Parameters:
- Name: Name of the attribute (must be uppercase and use underscores)
- Type: Data type of the attribute (text, number, date, boolean, category)
Options:
- Category: Category for the attribute (normal, transactional, calculated, global)
- EnumValues: Comma-separated enumeration values for category type attributes
Output:
- Success (bool): Whether the attribute was created successfully
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Update a Contact Attribute
Update an existing contact attribute's properties such as enumeration values.
Input Parameters:
- Name: Name of the attribute to update
Options:
- EnumValues: Updated comma-separated enumeration values
Output:
- Success (bool): Whether the update was successful
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Delete a Contact Attribute
Delete a custom contact attribute from your Brevo account. Note that this will remove the attribute from all contacts.
Input Parameters:
- Name: Name of the attribute to delete
Output:
- Success (bool): Whether the deletion was successful
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Send Email
Send a transactional email with custom content, recipients, and attachments. This operation allows you to send fully customized emails without using templates.
Input Parameters:
- SenderEmail: Email address of the sender
- SenderName: Name of the sender
- ToEmail: Recipient email address
- Subject: Email subject line
Options:
- ToName: Recipient name
- HtmlContent: HTML content of the email
- TextContent: Plain text content of the email
- CcEmails: Comma-separated CC email addresses
- BccEmails: Comma-separated BCC email addresses
- ReplyTo: Reply-to email address
- Attachment: JSON string containing attachment information
- Headers: JSON string containing custom headers
- Tags: Comma-separated tags for email tracking
Output:
- MessageId (string): Unique identifier of the sent message
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Send Template Email
Send an email using a pre-defined Brevo template. This operation allows you to leverage your saved templates with dynamic parameter substitution.
Input Parameters:
- TemplateId: ID of the template to use
- ToEmail: Recipient email address
Options:
- ToName: Recipient name
- CcEmails: Comma-separated CC email addresses
- BccEmails: Comma-separated BCC email addresses
- ReplyTo: Reply-to email address
- Params: JSON string containing template parameters
- Attachment: JSON string containing attachment information
- Headers: JSON string containing custom headers
- Tags: Comma-separated tags for email tracking
Output:
- MessageId (string): Unique identifier of the sent message
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Get All Senders
Retrieve all verified sender identities from your Brevo account. Sender identities must be verified before they can be used to send emails.
Output:
- Senders (object-array): List of all sender identities with their verification status
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Create a Sender
Create a new sender identity for your email campaigns. The sender email address will need to be verified before it can be used.
Input Parameters:
- Name: Display name for the sender
- Email: Email address of the sender
Options:
- IpsIds: Comma-separated dedicated IP IDs to associate with this sender
Output:
- SenderId (number): Unique identifier of the created sender
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
Delete a Sender
Delete a sender identity from your Brevo account. This will prevent the sender from being used in future email campaigns.
Input Parameters:
- SenderId: ID of the sender to delete
Output:
- Success (bool): Whether the deletion was successful
- StatusCode (number): HTTP status code indicating operation result
- ErrorMessage (string): Error description if operation fails, empty on success
5. Example Usage
This section will guide you through creating a simple workflow to send a transactional email using Brevo.
The workflow will consist of three nodes: Start -> Brevo: Send Email -> Answer.
- Add the Brevo Node
- In the workflow canvas, click the "+" icon to add a new node.
- In the pop-up panel, select the "Tools" tab.
- Find and select "Brevo" from the list of tools.
- From the list of supported operations for Brevo, click on "Send Email" to add the node to your canvas.
- Configure the Node
- Click on the newly added "Send Email" node to open its configuration panel on the right.
- Credentials Configuration: At the top of the panel, find the credentials field. Click the dropdown menu and select your pre-configured Brevo credential.
- Parameter Configuration: Fill in the required parameters to send your email.
- SenderEmail: Enter the verified sender email address, for example, noreply@yourcompany.com.
- SenderName: Enter the sender name, for example, Your Company.
- ToEmail: Enter the recipient email address, for example, customer@example.com.
- Subject: Enter the email subject, for example, Order Confirmation.
- HtmlContent (Optional): Enter the HTML content of your email, for example,
Thank you for your order!
Your order #12345 has been confirmed.
. - TextContent (Optional): Enter the plain text version of your email.
- Run and Verify
- Once all required parameters are correctly filled, any error indicators on the workflow canvas will disappear.
- Click the "Run" button in the top-right corner of the canvas to execute the workflow.
- After a successful execution, you can click the logs icon in the top-right corner to view the detailed inputs and outputs of the node, including the MessageId of the sent email.
After completing these steps, your workflow is fully configured. When executed, it will send a transactional email through the Brevo platform.
6. FAQs
Q: Why am I getting a 401 Unauthorized error?
A: This typically indicates an issue with your API key. Please check the following:
- API Key: Ensure your API key is correct and has not been revoked.
- Permissions: Verify that the API key has the necessary permissions to perform the operation.
- Key Format: Make sure you're using the correct API key format without any extra spaces or characters.
Q: My email is not being sent. What could be wrong?
A: Check the following:
- Sender Verification: Ensure the sender email address is verified in your Brevo account.
- Account Status: Verify that your Brevo account is active and has sufficient email credits.
- Content Requirements: Make sure you've provided either HtmlContent or TextContent (or both).
- Recipient Format: Ensure the recipient email address is in a valid format.
Q: How do I create custom contact attributes?
A: Use the "Create a Contact Attribute" operation. The attribute name must be in uppercase with underscores (e.g., CUSTOMER_TYPE). Choose the appropriate type (text, number, date, boolean, or category) based on the data you want to store.
Q: Can I send emails to multiple recipients at once?
A: For transactional emails, you should send individual emails to each recipient. For bulk email campaigns, consider using Brevo's campaign features through their web interface or dedicated campaign API endpoints.
Q: What's the difference between Create Contact and Create or Update Contact?
A: "Create Contact" will fail if the contact already exists, while "Create or Update Contact" will update the existing contact if it's already in your database. Use the latter when you're not sure if the contact exists.
7. Official Documentation
For more in-depth information about the capabilities and technical details of the API, please refer to the Brevo Official API Documentation.
Leave a Reply.