{
  "name": "Flowgrammer Canada — internal error alert",
  "nodes": [
    {
      "id": "fg-95",
      "name": "Workflow failed",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "parameters": {}
    },
    {
      "id": "fg-96",
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        260,
        300
      ],
      "parameters": {
        "mode": "raw",
        "jsonOutput": "{\"client_id\":\"demo-client\",\"client_name\":\"Demo client\",\"business_display_name\":\"Your business\",\"idempotency_namespace\":\"CHANGE-TO-UNIQUE-CLIENT-UUID\",\"timezone\":\"America/Toronto\",\"locale\":\"en-CA\",\"currency\":\"CAD\",\"province\":\"ON\",\"tax_regime\":\"HST-ON\",\"tax_components\":[[\"HST\",0.13]],\"tax_inclusive\":false,\"rates_valid_from\":\"2026-01-01\",\"rates_valid_through\":\"2026-12-31\",\"dry_run\":true,\"dispatch_enabled\":false,\"batch_size\":10,\"wait_seconds_between_sends\":5,\"amount_tolerance_cents\":1,\"variance_pct_threshold\":20,\"reminder_days\":[3,7,14],\"max_reminders\":3,\"deadline_notice_days\":14,\"max_file_mb\":10,\"max_pages\":20,\"allowed_file_types\":[\"application/pdf\",\"image/png\",\"image/jpeg\"],\"quickbooks_sandbox\":true,\"quickbooks_realm_id\":\"\",\"quickbooks_item_id\":\"\",\"quickbooks_tax_code\":\"\",\"xero_tenant_id\":\"\",\"xero_account_code\":\"\",\"xero_tax_type\":\"\",\"error_notify_to\":\"configure-internal-alert@example.com\",\"from_email\":\"configure-sender@example.com\"}",
        "options": {}
      }
    },
    {
      "id": "fg-97",
      "name": "Notify internal owner",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        520,
        300
      ],
      "parameters": {
        "fromEmail": "={{ $json.from_email }}",
        "toEmail": "={{ $json.error_notify_to }}",
        "subject": "Flowgrammer finance workflow needs review",
        "emailFormat": "text",
        "text": "={{ \"A finance workflow failed. Workflow: \" + $(\"Workflow failed\").first().json.workflow?.name + \"; execution: \" + ($(\"Workflow failed\").first().json.execution?.id || \"trigger failure\") + \". Inspect n8n and fg_finance.audit. Do not replay uncertain actions until reconciled.\" }}",
        "options": {}
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 5000
    },
    {
      "id": "fg-98",
      "name": "Read setup guide first",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        780,
        -100
      ],
      "parameters": {
        "content": "## Setup required\nOriginal Flowgrammer workflow. Import queue.sql into a separate private PostgreSQL database. Connect least-privilege Postgres credentials to every database node. Configure Settings; keep dry_run=true for testing. Import 12-error-alert.json and select it under Workflow Settings > Error workflow (IDs are instance-specific). No OCR/AI or source-app connectors included: load normalized records using the documented input contract. Human reviewer uses separate database login. See README.md.",
        "height": 380,
        "width": 520
      }
    }
  ],
  "connections": {
    "Workflow failed": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "Notify internal owner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "timezone": "America/Toronto",
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "none",
    "executionTimeout": 300
  },
  "pinData": {},
  "tags": []
}
