AutomationFlowsData & Sheets › Entity Enricher · 06 — Delta Feed → Your Own Postgresql

Entity Enricher · 06 — Delta Feed → Your Own Postgresql

Entity Enricher · 06 — Delta feed → your own PostgreSQL. Uses n8n-nodes-entity-enricher, postgres. Event-driven trigger; 4 nodes.

Event trigger★★★★☆ complexity4 nodesN8N Nodes Entity EnricherPostgres
Data & Sheets Trigger: Event Nodes: 4 Complexity: ★★★★☆ Added:

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": "Entity Enricher \u00b7 06 \u2014 Delta feed \u2192 your own PostgreSQL",
  "nodes": [
    {
      "parameters": {
        "event": "delta_available",
        "databaseSyncId": "PASTE_YOUR_DATABASE_SYNC_ID",
        "fetchOnFire": true,
        "deltaSchemaId": ""
      },
      "type": "n8n-nodes-entity-enricher.entityEnricherTrigger",
      "typeVersion": 1,
      "position": [
        -640,
        0
      ],
      "id": "a6000000-0006-4000-8000-000000000001",
      "name": "Deltas Available"
    },
    {
      "parameters": {
        "jsCode": "// The trigger emits ONE ITEM PER DELTA, already leased.\n// Apply a whole window in ONE transaction: all deltas of one enrichment\n// share a batch, the projected tables carry deferred foreign keys, and the\n// window never splits a batch \u2014 so one fire = one transaction = one ack.\nconst deltas = $input.all().map((item) => item.json);\nif (!deltas.length) return [];\nreturn [{\n  json: {\n    sql: deltas.map((d) => d.sql).join('\\n'),\n    up_to_id: Math.max(...deltas.map((d) => Number(d.id))),\n    delta_count: deltas.length,\n    schema_migrations: deltas.filter((d) => d.kind === 'schema').length,\n  },\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -420,
        0
      ],
      "id": "a6000000-0006-4000-8000-000000000002",
      "name": "Aggregate the window"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "={{ $json.sql }}",
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        -200,
        0
      ],
      "id": "a6000000-0006-4000-8000-000000000003",
      "name": "Apply to your replica"
    },
    {
      "parameters": {
        "connectionInfo": "connected",
        "resource": "databaseSync",
        "operation": "ackDeltas",
        "databaseSyncId": "PASTE_YOUR_DATABASE_SYNC_ID",
        "upToId": "={{ $('Aggregate the window').first().json.up_to_id }}"
      },
      "type": "n8n-nodes-entity-enricher.entityEnricher",
      "typeVersion": 1,
      "position": [
        20,
        0
      ],
      "id": "a6000000-0006-4000-8000-000000000004",
      "name": "Acknowledge Deltas"
    }
  ],
  "connections": {
    "Deltas Available": {
      "main": [
        [
          {
            "node": "Aggregate the window",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate the window": {
      "main": [
        [
          {
            "node": "Apply to your replica",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply to your replica": {
      "main": [
        [
          {
            "node": "Acknowledge Deltas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

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

About this workflow

Entity Enricher · 06 — Delta feed → your own PostgreSQL. Uses n8n-nodes-entity-enricher, postgres. Event-driven trigger; 4 nodes.

Source: https://github.com/TOT-Concept/n8n-nodes-entity-enricher/blob/main/examples/06-delta-sync-to-postgres.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

Reagendamiento_v2. Uses executeWorkflowTrigger, redis, httpRequest, n8n-nodes-evolution-api. Event-driven trigger; 89 nodes.

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

This workflow acts as a junior finance research analyst for a UK boutique M&A or corporate finance team. It listens for Slack messages, classifies the request, gathers company or market data, and prod

HTTP Request, Google Drive, Google Docs +5
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

Components. Uses postgres, readWriteFile. Event-driven trigger; 42 nodes.

Postgres, Read Write File