AutomationFlowsData & Sheets › Automate Stripe Payments to Brevo Emails

Automate Stripe Payments to Brevo Emails

Original n8n title: Bronze

bronze. Uses httpRequest, postgres, executeWorkflowTrigger. Event-driven trigger; 10 nodes.

Event trigger★★★★☆ complexity10 nodesHTTP RequestPostgresExecute Workflow Trigger
Data & Sheets Trigger: Event Nodes: 10 Complexity: ★★★★☆ Added:

This workflow follows the Execute Workflow Trigger → HTTP Request 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 →

Download .json
{
  "name": "bronze",
  "nodes": [
    {
      "parameters": {
        "url": "http://api:3000/people/v1/enrichments",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "page",
              "value": "={{ $json.page }}"
            },
            {
              "name": "limit",
              "value": "={{ $json.limit }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        608,
        0
      ],
      "id": "b650cc22-f3c3-4305-afcb-fb5bb0d1598a",
      "name": "HTTP Request",
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 2000,
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "data",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        816,
        0
      ],
      "id": "3504daec-9144-437f-bc7d-baa203b58ac5",
      "name": "Split Out"
    },
    {
      "parameters": {
        "operation": "upsert",
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "table": {
          "__rl": true,
          "value": "bronze",
          "mode": "list",
          "cachedResultName": "bronze"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [
            "id"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": true,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "id_workspace",
              "displayName": "id_workspace",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "workspace_name",
              "displayName": "workspace_name",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "total_contacts",
              "displayName": "total_contacts",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": false
            },
            {
              "id": "contact_type",
              "displayName": "contact_type",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "options",
              "canBeUsedToMatch": false,
              "options": [
                {
                  "name": "CANCELED",
                  "value": "CANCELED"
                },
                {
                  "name": "FAILED",
                  "value": "FAILED"
                },
                {
                  "name": "COMPLETED",
                  "value": "COMPLETED"
                },
                {
                  "name": "PROCESSING",
                  "value": "PROCESSING"
                }
              ]
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "canBeUsedToMatch": false
            },
            {
              "id": "updated_at",
              "displayName": "updated_at",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "canBeUsedToMatch": false
            },
            {
              "id": "dw_ingested_at",
              "displayName": "dw_ingested_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "canBeUsedToMatch": false
            },
            {
              "id": "dw_updated_at",
              "displayName": "dw_updated_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "canBeUsedToMatch": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        1024,
        0
      ],
      "id": "8dbe0a71-608b-4a3c-913f-b4ff64ffa746",
      "name": "Insert or update rows in a table",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "62fa4c87-53da-44e1-be81-a3033de23aa6",
              "name": "page",
              "value": 1,
              "type": "number"
            },
            {
              "id": "425c8225-030d-417d-935d-e8a7048b1ec3",
              "name": "limit",
              "value": 100,
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        416,
        0
      ],
      "id": "0bb63806-febd-41e7-b555-d83acf6c4e48",
      "name": "Edit Fields"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        16,
        256
      ],
      "id": "4da29a81-f4c2-41a4-9ce3-f0561b8a9596",
      "name": "Limit"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "ba1baf2a-b45b-4e2d-81c6-6550abba4916",
              "leftValue": "={{ $('HTTP Request').item.json.meta.current_page }}",
              "rightValue": "={{ $('HTTP Request').item.json.meta.total_pages }}",
              "operator": {
                "type": "number",
                "operation": "lt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        208,
        256
      ],
      "id": "e0cc6e28-d977-418c-8432-fbc277af496b",
      "name": "If"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a91a1f80-5fdb-484f-8270-46154638b09f",
              "name": "page",
              "value": "={{ $('HTTP Request').first().json.meta.current_page + 1 }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        448,
        192
      ],
      "id": "36ba9acc-ec01-4375-97f6-e77e089c3659",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "UPDATE estado_pipeline_dw \nSET status = 'PROCESSANDO', data_ultimo_processo = NOW() \nWHERE nome_pipeline = 'bronze';",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        208,
        0
      ],
      "id": "ea4dd83f-6e36-4af9-8f76-63b1bcb0f812",
      "name": "Execute a SQL query",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "UPDATE estado_pipeline_dw \nSET \n    status = 'CONCLUIDO', \n    data_ultimo_processo = NOW(),\n    total_registros_processados = (SELECT count(*) FROM bronze)\nWHERE nome_pipeline = 'bronze';",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        448,
        336
      ],
      "id": "14270bb4-9db5-4538-82eb-965125f3910f",
      "name": "Execute a SQL query1",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "1ea72911-2764-4230-8862-b31acbd09bde",
      "name": "When Executed by Another Workflow"
    }
  ],
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Insert or update rows in a table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert or update rows in a table": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Execute a SQL query1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute a SQL query": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute a SQL query1": {
      "main": [
        []
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Execute a SQL query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "5dd3d4c7-e3d2-42f8-a294-cae79da5c2a4",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "DipvZfztbWYQPYDZ",
  "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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

This workflow automates the processing of incoming bronze-level data requests, ensuring seamless integration with your PostgreSQL database for efficient storage and updates. It saves time for operations teams handling moderate-volume event-driven tasks by validating and filtering data before insertion, reducing manual errors and database clutter. The key step involves splitting incoming HTTP requests and using conditional logic to insert or update records only when criteria are met, with integrations like HTTP Request and PostgreSQL handling the core data flow.

Use this workflow for event-triggered bronze data pipelines where reliability trumps speed, such as in subscription management or basic analytics tracking. Avoid it for high-volume or real-time needs, as the 10-node chain may introduce minor delays; opt for simpler setups instead. Common variations include adding email notifications post-insertion or scaling the limit node for larger datasets.

About this workflow

bronze. Uses httpRequest, postgres, executeWorkflowTrigger. Event-driven trigger; 10 nodes.

Source: https://github.com/Joao-Victor-Oliveira/PipelineEnriquecimento/blob/4785b272a7d687d510867022f181eb0bd5733ed3/workflows/bronze.json — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

Agendamiento_v2. Uses n8n-nodes-evolution-api, redis, httpRequest, executeWorkflowTrigger. Event-driven trigger; 59 nodes.

N8N Nodes Evolution Api, Redis, HTTP Request +3
Data & Sheets

Cancelacion_v2. Uses executeWorkflowTrigger, redis, httpRequest, n8n-nodes-evolution-api. Event-driven trigger; 46 nodes.

Execute Workflow Trigger, Redis, HTTP Request +3
Data & Sheets

Youtube Searcher. Uses splitInBatches, httpRequest, manualTrigger, executeWorkflowTrigger. Event-driven trigger; 21 nodes.

HTTP Request, Execute Workflow Trigger, Postgres +1
Data & Sheets

MCP Tool: Request Tutor. Uses executeWorkflowTrigger, postgres, httpRequest. Event-driven trigger; 7 nodes.

Execute Workflow Trigger, Postgres, HTTP Request
Data & Sheets

Feedback Collection and Training Data. Uses executeWorkflowTrigger, postgres, httpRequest. Event-driven trigger; 4 nodes.

Execute Workflow Trigger, Postgres, HTTP Request