{
  "name": "Heavy IO \u2014 HTTP + DB + Slack (well-handled)",
  "nodes": [
    {
      "id": "t",
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        200,
        300
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      }
    },
    {
      "id": "http",
      "name": "Fetch Orders",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        440,
        300
      ],
      "parameters": {
        "url": "={{$env.ORDERS_API}}/orders",
        "options": {},
        "retryOnFail": true
      },
      "retryOnFail": true,
      "maxTries": 3,
      "continueOnFail": true
    },
    {
      "id": "db",
      "name": "Upsert Postgres",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2,
      "position": [
        680,
        300
      ],
      "parameters": {
        "operation": "upsert",
        "table": "orders"
      },
      "onError": "continueErrorOutput",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "slack",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        920,
        220
      ],
      "parameters": {
        "resource": "message",
        "operation": "post"
      },
      "continueOnFail": true,
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "handle",
      "name": "Handle DB Error",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        920,
        400
      ],
      "parameters": {}
    }
  ],
  "connections": {
    "Schedule": {
      "main": [
        [
          {
            "node": "Fetch Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Orders": {
      "main": [
        [
          {
            "node": "Upsert Postgres",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert Postgres": {
      "main": [
        [
          {
            "node": "Notify Slack",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "error": [
        [
          {
            "node": "Handle DB Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "errorWorkflow": "err-wf-1"
  },
  "active": false
}