This workflow corresponds to n8n.io template #9364 — we link there as the canonical source.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "RVpmgXJQMYQlZLVC",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Insert Brevo Contact Report into NocoDB",
"tags": [
{
"id": "RhAmCaLYc9EkF42I",
"name": "n8n",
"createdAt": "2025-08-24T08:04:35.027Z",
"updatedAt": "2025-08-24T08:04:35.027Z"
}
],
"nodes": [
{
"id": "f1bdd937-0007-4634-8c4e-9e823278101d",
"name": "Get Brevo Contact Report",
"type": "n8n-nodes-base.httpRequest",
"position": [
420,
200
],
"parameters": {
"url": "=https://api.brevo.com/v3/contacts/{{ $json.email }}",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "b7c783a8-8633-41ba-a4a9-f34c4d119076",
"name": "Split Out - messagesSent",
"type": "n8n-nodes-base.splitOut",
"position": [
900,
0
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "statistics.messagesSent",
"fieldsToInclude": "email"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "e412c15b-cef6-4e9d-8818-e60ed237363e",
"name": "Split Out - delivered",
"type": "n8n-nodes-base.splitOut",
"position": [
900,
200
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "statistics.delivered",
"fieldsToInclude": "email"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "91be2b24-b8e6-46a6-8f79-96c98095cf9c",
"name": "Split Out - opened",
"type": "n8n-nodes-base.splitOut",
"position": [
900,
420
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "statistics.opened",
"fieldsToInclude": "email"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "7b611c7e-e07c-4e60-8ead-37c36a19c23b",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
1340,
0
],
"parameters": {
"jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n const { email, campaignId, NocoDB_id } = item.json;\n\n if (!grouped[email]) {\n grouped[email] = {\n email,\n NocoDB_id,\n messagesSent: []\n };\n }\n\n grouped[email].messagesSent.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n json: {\n email: entry.email,\n NocoDB_id: entry.NocoDB_id,\n messagesSent: entry.messagesSent.join(', ')\n }\n}));\n"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "c0b9ffb3-ea28-4ea4-8390-2d30c6d888e2",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
1120,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
"name": "email",
"type": "string",
"value": "={{ $json.email }}"
},
{
"id": "462fd57f-98c8-423b-b274-d57458d62f0d",
"name": "campaignId",
"type": "string",
"value": "={{ $json[\"statistics.messagesSent\"].campaignId }}"
},
{
"id": "5f04ebf3-1334-46a4-93da-10f9e8443c0d",
"name": "NocoDB_id",
"type": "string",
"value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
}
]
}
},
"typeVersion": 3.4,
"alwaysOutputData": true
},
{
"id": "6ddaf8a4-9240-4f67-a361-8058e2d94598",
"name": "Code1",
"type": "n8n-nodes-base.code",
"position": [
1340,
200
],
"parameters": {
"jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n const { email, campaignId, NocoDB_id } = item.json;\n\n if (!grouped[email]) {\n grouped[email] = {\n email,\n NocoDB_id,\n delivered: []\n };\n }\n\n grouped[email].delivered.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n json: {\n email: entry.email,\n NocoDB_id: entry.NocoDB_id,\n delivered: entry.delivered.join(', ')\n }\n}));\n\n"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "be90e0d6-71da-43ea-9a90-17785b7cb0b3",
"name": "Edit Fields2",
"type": "n8n-nodes-base.set",
"position": [
1120,
200
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
"name": "email",
"type": "string",
"value": "={{ $json.email }}"
},
{
"id": "462fd57f-98c8-423b-b274-d57458d62f0d",
"name": "campaignId",
"type": "string",
"value": "={{ $json[\"statistics.delivered\"].campaignId }}"
},
{
"id": "55231970-3c3a-444c-9bdd-13e187baeb46",
"name": "NocoDB_id",
"type": "string",
"value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
}
]
}
},
"typeVersion": 3.4,
"alwaysOutputData": true
},
{
"id": "290f453a-cd1c-4fd1-8761-57e97ee3d371",
"name": "Code2",
"type": "n8n-nodes-base.code",
"position": [
1340,
420
],
"parameters": {
"jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n const { email, campaignId, NocoDB_id } = item.json;\n\n if (!grouped[email]) {\n grouped[email] = {\n email,\n NocoDB_id,\n opened: []\n };\n }\n\n grouped[email].opened.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n json: {\n email: entry.email,\n NocoDB_id: entry.NocoDB_id,\n opened: entry.opened.join(', ')\n }\n}));"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "4b0ed3c4-df99-4a79-9a7e-c9cb04e64afa",
"name": "Edit Fields3",
"type": "n8n-nodes-base.set",
"position": [
1120,
420
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
"name": "email",
"type": "string",
"value": "={{ $json.email }}"
},
{
"id": "462fd57f-98c8-423b-b274-d57458d62f0d",
"name": "campaignId",
"type": "string",
"value": "={{ $json[\"statistics.opened\"].campaignId }}"
},
{
"id": "b5a653f8-4a79-487d-8535-4734a7403637",
"name": "NocoDB_id",
"type": "string",
"value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
}
]
}
},
"typeVersion": 3.4,
"alwaysOutputData": true
},
{
"id": "ebec351f-92a5-46a7-9c2f-e456efcea05c",
"name": "Code3",
"type": "n8n-nodes-base.code",
"position": [
1340,
620
],
"parameters": {
"jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n const { email, campaignId, NocoDB_id } = item.json;\n\n if (!grouped[email]) {\n grouped[email] = {\n email,\n NocoDB_id,\n clicked: []\n };\n }\n\n grouped[email].clicked.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n json: {\n email: entry.email,\n NocoDB_id: entry.NocoDB_id,\n clicked: entry.clicked.join(', ')\n }\n}));"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "da04ac69-9aaa-40dd-931b-50af87b9c7d2",
"name": "Edit Fields4",
"type": "n8n-nodes-base.set",
"position": [
1120,
620
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
"name": "email",
"type": "string",
"value": "={{ $json.email }}"
},
{
"id": "462fd57f-98c8-423b-b274-d57458d62f0d",
"name": "campaignId",
"type": "string",
"value": "={{ $json[\"statistics.clicked\"].campaignId }}"
},
{
"id": "b5a653f8-4a79-487d-8535-4734a7403637",
"name": "NocoDB_id",
"type": "string",
"value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
}
]
}
},
"typeVersion": 3.4,
"alwaysOutputData": true
},
{
"id": "8a274188-01b8-4f7b-b198-c30f718d7f7a",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-640,
200
],
"parameters": {
"rule": {
"interval": [
{
"field": "seconds",
"secondsInterval": 2
}
]
}
},
"typeVersion": 1.2
},
{
"id": "392bc93d-c0b7-4b60-9a70-b7f72b384190",
"name": "Split Out - clicked",
"type": "n8n-nodes-base.splitOut",
"position": [
900,
620
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "statistics.clicked",
"fieldsToInclude": "email"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "4a346547-a479-4c00-bc53-7a772c64817d",
"name": "Check if Email is Inserted Before",
"type": "n8n-nodes-base.filter",
"position": [
-100,
200
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3db8b002-7c4b-466b-aad5-2a54061a13c4",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.done }}",
"rightValue": "1"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "710df017-88a4-4745-b1c3-5e719c863618",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1700,
240
],
"parameters": {
"numberInputs": 4
},
"typeVersion": 3.1
},
{
"id": "3b978621-20e0-4704-8b9f-2ea846a51970",
"name": "Delete Nulls",
"type": "n8n-nodes-base.code",
"position": [
1920,
260
],
"parameters": {
"jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n const { email, NocoDB_id, messagesSent, delivered, opened, clicked } = item.json;\n\n if (!grouped[email]) {\n grouped[email] = {\n email,\n NocoDB_id,\n messagesSent: [],\n delivered: [],\n opened: [],\n clicked: []\n };\n }\n\n if (messagesSent) grouped[email].messagesSent.push(messagesSent);\n if (delivered) grouped[email].delivered.push(delivered);\n if (opened) grouped[email].opened.push(opened);\n if (clicked) grouped[email].clicked.push(clicked);\n}\n\n// Merge arrays and clean duplicates if needed\nreturn Object.values(grouped).map(entry => ({\n json: {\n email: entry.email,\n NocoDB_id: entry.NocoDB_id,\n messagesSent: entry.messagesSent.join(', '),\n delivered: entry.delivered.join(', '),\n opened: entry.opened.join(', '),\n clicked: entry.clicked.join(', ')\n }\n}));\n"
},
"typeVersion": 2
},
{
"id": "3679a580-22c5-4e15-a80f-cca5adec92e6",
"name": "Update NocoDB",
"type": "n8n-nodes-base.nocoDb",
"position": [
2160,
260
],
"parameters": {
"table": "mz06ar1jy2ca287",
"fieldsUi": {
"fieldValues": [
{
"fieldName": "=id",
"fieldValue": "={{ $json.NocoDB_id }}"
},
{
"fieldName": "messagesSent",
"fieldValue": "={{ $json.messagesSent }}"
},
{
"fieldName": "delivered",
"fieldValue": "={{ $json.delivered }}"
},
{
"fieldName": "opened",
"fieldValue": "={{ $json.opened }}"
},
{
"fieldName": "clicked",
"fieldValue": "={{ $json.clicked }}"
},
{
"fieldName": "done",
"fieldValue": "1"
}
]
},
"operation": "update",
"projectId": "px9vf43y9cqtdog",
"authentication": "nocoDbApiToken"
},
"credentials": {
"nocoDbApiToken": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "e5afe8d6-2c68-424b-af72-705c780b9540",
"name": "If Email Blacklisted",
"type": "n8n-nodes-base.if",
"position": [
620,
200
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "876210df-2bd6-4d0d-88e0-81bda85d2bbe",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.emailBlacklisted }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "0381c270-7dfe-4924-be5c-d89830f15a83",
"name": "Loop",
"type": "n8n-nodes-base.splitInBatches",
"position": [
160,
200
],
"parameters": {
"options": {},
"batchSize": 10
},
"typeVersion": 3
},
{
"id": "150da896-16ec-49d6-8680-50fde2aabaab",
"name": "Update NocoDB - blacklisted",
"type": "n8n-nodes-base.nocoDb",
"position": [
900,
940
],
"parameters": {
"table": "mz06ar1jy2ca287",
"fieldsUi": {
"fieldValues": [
{
"fieldName": "=id",
"fieldValue": "={{ $('Loop').item.json.Id }}"
},
{
"fieldName": "blacklisted",
"fieldValue": "=1"
},
{
"fieldName": "done",
"fieldValue": "1"
}
]
},
"operation": "update",
"projectId": "px9vf43y9cqtdog",
"authentication": "nocoDbApiToken"
},
"credentials": {
"nocoDbApiToken": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "554932b4-e8be-4aed-8dec-6324ee6e4303",
"name": "Insert Emails from NocoDB",
"type": "n8n-nodes-base.nocoDb",
"position": [
-360,
200
],
"parameters": {
"table": "mz06ar1jy2ca287",
"options": {},
"operation": "getAll",
"projectId": "px9vf43y9cqtdog",
"returnAll": true,
"authentication": "nocoDbApiToken"
},
"credentials": {
"nocoDbApiToken": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "548a4011-00df-4ea0-b1a6-6f6e98428756",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
-180
],
"parameters": {
"color": 5,
"height": 560,
"content": "## **Insert Emails from NocoDB**\n\nThis node retrieves email data from your **NocoDB** table. \nIt collects the following fields:\n\n- **email** \n- **messagesSent** \n- **delivered** \n- **opened** \n- **clicked** \n- **done** \n- **blacklisted**"
},
"typeVersion": 1
},
{
"id": "be3d163d-95df-4248-bbdd-8f8b00ead6e7",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
340,
-180
],
"parameters": {
"color": 5,
"height": 560,
"content": "## **Get Brevo Contact Report**\n\nThis node connects to the **Brevo API** to retrieve detailed contact engagement reports. \nIt fetches activity data for each email, including:\n\n- **messagesSent** \n- **delivered** \n- **opened** \n- **clicked** \n- **blacklisted**"
},
"typeVersion": 1
},
{
"id": "4ffd304f-6f3a-42d8-8ae8-72e0fa9c9624",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
-280
],
"parameters": {
"color": 5,
"height": 1080,
"content": "## **Split Out Nodes**\n\nThis section splits the **Brevo contact report data** into separate branches. \nEach branch processes a specific type of result before updating records in **NocoDB**.\n"
},
"typeVersion": 1
},
{
"id": "83e22d4b-64de-4e68-99e7-034429813769",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1260,
-280
],
"parameters": {
"color": 5,
"height": 1080,
"content": "## **Code Nodes**\n\nThese nodes use JavaScript to **group and organize Brevo contact data** by email. \nThey combine multiple campaign records into a single entry for each contact, preparing the data for insertion into **NocoDB**."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "2a211b45-06c9-4f7c-be20-af3d49727a20",
"connections": {
"Code": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Loop": {
"main": [
[],
[
{
"node": "Get Brevo Contact Report",
"type": "main",
"index": 0
}
]
]
},
"Code1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Code2": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 2
}
]
]
},
"Code3": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 3
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Delete Nulls",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Delete Nulls": {
"main": [
[
{
"node": "Update NocoDB",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields2": {
"main": [
[
{
"node": "Code1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields3": {
"main": [
[
{
"node": "Code2",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields4": {
"main": [
[
{
"node": "Code3",
"type": "main",
"index": 0
}
]
]
},
"Update NocoDB": {
"main": [
[
{
"node": "Loop",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Insert Emails from NocoDB",
"type": "main",
"index": 0
}
]
]
},
"Split Out - opened": {
"main": [
[
{
"node": "Edit Fields3",
"type": "main",
"index": 0
}
]
]
},
"Split Out - clicked": {
"main": [
[
{
"node": "Edit Fields4",
"type": "main",
"index": 0
}
]
]
},
"If Email Blacklisted": {
"main": [
[
{
"node": "Update NocoDB - blacklisted",
"type": "main",
"index": 0
}
],
[
{
"node": "Split Out - messagesSent",
"type": "main",
"index": 0
},
{
"node": "Split Out - delivered",
"type": "main",
"index": 0
},
{
"node": "Split Out - opened",
"type": "main",
"index": 0
},
{
"node": "Split Out - clicked",
"type": "main",
"index": 0
}
]
]
},
"Split Out - delivered": {
"main": [
[
{
"node": "Edit Fields2",
"type": "main",
"index": 0
}
]
]
},
"Get Brevo Contact Report": {
"main": [
[
{
"node": "If Email Blacklisted",
"type": "main",
"index": 0
}
]
]
},
"Split Out - messagesSent": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Insert Emails from NocoDB": {
"main": [
[
{
"node": "Check if Email is Inserted Before",
"type": "main",
"index": 0
}
]
]
},
"Check if Email is Inserted Before": {
"main": [
[
{
"node": "Loop",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
httpHeaderAuthnocoDbApiToken
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n workflow automatically retrieves Brevo contact reports and inserts summarized engagement data into NocoDB. It groups campaign activity by email, creating a clean, unified record that includes sent, delivered, opened, clicked, and blacklisted events. This setup keeps…
Source: https://n8n.io/workflows/9364/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
YOUR_ID 4. Uses gmail, googleDrive, googleSheets, httpRequest. Scheduled trigger; 53 nodes.
Development teams using Claude Code who want a chat-ops interface for project management. Instead of SSH-ing into a server to run Claude, your whole team interacts with it through a Matrix chat room —
Instead of providing a routine check, it focuses on significant movements by: Sending a Slack alert only if a query crosses a defined movement threshold. Emailing a structured report with the Top 25 i
Looking for a way to track GitHub bounty issues automatically and get notified in real time? This GitHub Bounty Tracker workflow monitors repositories for issues labeled 💎 Bounty, logs them in Google
This workflow automatically sends a beautifully designed HTML newsletter every Sunday at 8 AM, featuring products currently on sale from your Algolia-powered e-commerce store.