This workflow follows the HTTP Request → Postgres recipe pattern — see all workflows that pair these two integrations.
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 →
{
"name": "Flow: Sync Events",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 * * * *"
}
]
}
},
"id": "schedule-trigger",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
250,
250
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "sync-events",
"options": {}
},
"id": "webhook-trigger",
"name": "Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
250,
350
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "host-assignment",
"name": "host",
"value": "https://zdgvndxdhucbakguvkgw.supabase.co",
"type": "string"
}
]
},
"options": {}
},
"id": "supabase-config",
"name": "Supabase Config",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
450,
300
]
},
{
"parameters": {
"url": "https://api.brevo.com/v3/smtp/statistics/events",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": false,
"options": {}
},
"id": "fetch-events",
"name": "Fetch Events from Brevo",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
650,
300
],
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"fieldToSplitOut": "events",
"options": {}
},
"id": "split-events",
"name": "Split Events",
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
850,
300
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "=WITH assignment_lookup AS (\n SELECT id FROM assignments WHERE corr_id = '{{ $json.messageId }}'\n)\nINSERT INTO events (assignment_id, type, meta, ts)\nSELECT \n assignment_lookup.id,\n '{{ $json.event }}',\n jsonb_build_object(\n 'email', '{{ $json.email }}',\n 'subject', '{{ $json.subject }}',\n 'message_id', '{{ $json.messageId }}',\n 'ip', '{{ $json.ip }}',\n 'tag', '{{ $json.tag }}',\n 'from', '{{ $json.from }}'\n ),\n '{{ $json.date }}'::timestamptz\nFROM assignment_lookup\nON CONFLICT (assignment_id, type)\nDO UPDATE SET\n meta = EXCLUDED.meta,\n ts = EXCLUDED.ts;",
"options": {}
},
"id": "store-event",
"name": "Store Event in Supabase",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.4,
"position": [
1050,
300
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Supabase Config",
"type": "main",
"index": 0
}
]
]
},
"Webhook Trigger": {
"main": [
[
{
"node": "Supabase Config",
"type": "main",
"index": 0
}
]
]
},
"Supabase Config": {
"main": [
[
{
"node": "Fetch Events from Brevo",
"type": "main",
"index": 0
}
]
]
},
"Fetch Events from Brevo": {
"main": [
[
{
"node": "Split Events",
"type": "main",
"index": 0
}
]
]
},
"Split Events": {
"main": [
[
{
"node": "Store Event in Supabase",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "1",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "flow-sync-events",
"tags": []
}
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.
httpHeaderAuthpostgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Flow: Sync Events. Uses httpRequest, postgres. Scheduled trigger; 6 nodes.
Source: https://github.com/priyesh-pandey-ai/preventiq-genai-engine/blob/da09c4b700b81d7f963a54f9e2d32f0f0dc13fe2/n8n-workflows/flow-sync-events.json — 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.
Disparador 1.8. Uses itemLists, postgres, emailSend, httpRequest. Scheduled trigger; 85 nodes.
공유회_알림톡_크론. Uses postgres, httpRequest, n8n-nodes-solapi. Scheduled trigger; 39 nodes.
QuepasaAutomatic. Uses postgres, postgresTrigger, httpRequest. Scheduled trigger; 39 nodes.
QuepasaAutomatic. Uses postgres, postgresTrigger, httpRequest. Scheduled trigger; 39 nodes.
QuepasaAutomatic. Uses postgres, postgresTrigger, httpRequest. Scheduled trigger; 39 nodes.