Automate syncing detailed Brevo contact engagement metrics (opens, clicks, deliveries, blacklist status) directly into your NocoDB database using this complex n8n workflow. Efficiently manage marketing data.
Download this n8n workflow template and start using it instantly.
This is ideal for:
CRM managers needing detailed email activity tracked in a custom, self-hosted database like NocoDB.
Data analysts who use NocoDB for centralized reporting and require complete campaign statistics for contacts.
Automation architects seeking robust n8n templates for handling complex parallel API requests and data merging.
Users who require an automated, scheduled synchronization process initiated by an n8n trigger.
Maintaining accurate and up-to-date marketing campaign data within a centralized database like NocoDB can be challenging, especially when dealing with verbose external APIs like Brevo (Sendinblue). This advanced n8n workflow solves this by providing a highly structured and efficient synchronization pipeline.
The primary value of this solution is its ability to handle complex, nested API responses (Brevo statistics often list multiple actions per campaign ID) and consolidate them into clean, structured rows suitable for NocoDB. This reliable n8n workflow starts with an n8n trigger and uses filtering to process only records that haven't been completed (done != 1), ensuring the process is fast and idempotent. It demonstrates best practices for data segmentation, merging, and custom JavaScript consolidation within the n8n node environment, making it one of the most useful n8n templates for CRM operations.
The n8n workflow operates on a scheduled basis, starting with the Schedule Trigger n8n node.
Insert Emails from NocoDB n8n node to retrieve all existing contact records from the database table.Check if Email is Inserted Before n8n node filters the results, allowing only records where the done flag is unset, preventing repeated processing.Loop n8n node before the API call.Get Brevo Contact Report n8n node queries the Brevo API using the contact's email address retrieved from NocoDB.If Email Blacklisted n8n node checks the API response. If true, the contact is marked as blacklisted and done=1 in NocoDB via the parallel branch.Split Out n8n node instances, isolating data for messagesSent, delivered, opened, and clicked statistics.Edit Fields (Set) and custom Code n8n node scripts. The custom JavaScript code groups campaign IDs by email and converts the array of campaign IDs into a comma-separated string, cleaning the data for insertion.Merge n8n node, followed by the Delete Nulls custom Code n8n node, which performs a final grouping to ensure all four statistic strings belong to one single output item per contact.Update NocoDB n8n node writes the complete, merged statistics back to the corresponding NocoDB record and sets the done flag to '1'. This comprehensive n8n node sequence ensures successful data sync.To deploy this powerful n8n workflow, follow these steps:
Get Brevo Contact Report n8n node and configure your Brevo API key connection using the 'HTTP Header Auth' method. Brevo requires an API key in the api-key header (though this template uses generic authentication setup, ensure the credential linked is a valid Brevo token).NocoDB Token account credentials. This is needed for all three NocoDB n8n node instances (Insert Emails from NocoDB, Update NocoDB - blacklisted, and Update NocoDB).projectId (px9vf43y9cqtdog in the template) and the table name (mz06ar1jy2ca287 in the template) match your specific NocoDB setup.email, messagesSent, delivered, opened, clicked, done, and optionally blacklisted for the update operations.Schedule Trigger n8n trigger settings.This n8n workflow utilizes several key n8n node types for flow control and data transformation:
Schedule Trigger: The starting n8n trigger, configured to run the workflow automatically based on a predefined interval (set here for frequent testing/demo).
NocoDB (Insert Emails from NocoDB): Retrieves contact records from the specified NocoDB table using the 'getAll' operation. This provides the initial dataset for the n8n workflow.
HTTP Request (Get Brevo Contact Report): A crucial n8n node that communicates with the Brevo API to fetch detailed statistics for the specific email address provided by the preceding NocoDB node.
If (If Email Blacklisted): A flow control n8n node that branches the execution based on the emailBlacklisted flag returned by the Brevo API.
Split Out: Four instances of this n8n node are used to flatten specific statistical arrays (messagesSent, delivered, opened, clicked) from the complex Brevo JSON response, enabling parallel processing.
Code (Grouping Nodes): Multiple Code n8n node instances use custom JavaScript to group the output items by email and consolidate multiple campaign IDs (e.g., all opened campaign IDs) into a single, comma-separated string per email address.
Merge: Combines the four parallel statistical data streams into a single path for final processing.
NocoDB (Update NocoDB): The final n8n node that performs the database update operation, inserting the compiled statistics (messagesSent, delivered, opened, clicked) and marking the record as done=1.
Automate data entry into Coda tables using this fundamental n8n workflow. Quickly set up new row insertions using the powerful Coda n8n node and the data preparation capabilities of the Set n8n node.

Use this comprehensive n8n workflow to monitor ingredient prices daily, calculate smart buying recommendations using advanced PostgreSQL queries and custom JavaScript logic, and send instant reports via Email and Slack. This n8n template streamlines procurement and cost management.

Use this powerful n8n workflow to automatically audit influencer profiles for brand safety, suspicious engagement rates, and content risks using AI and scraping. Get instant Slack reports.

Use this sophisticated n8n workflow to automatically publish photos stored in a data table (Lightroom source) to Instagram. It includes advanced AI captioning using EXIF data.

Automate complex Instagram carousel publishing using this detailed n8n workflow. It pulls media from Google Drive, stages it via Cloudinary, and publishes via the Facebook Graph API, providing instant updates via Telegram.

With a deep understanding of marketing processes and data flows, I create solutions that streamline user engagement, campaign management, and data synchronization across multiple platforms. My goal is to help businesses reduce manual effort, improve accuracy, and accelerate their marketing initiatives through smart automation.







































