Process invoices and send weekly AI reports with OpenAI and Gmail

0bbebc2a-ac4b-4259-b6a6-f46182bcd905

Latency
10305ms
Cost
$0.0002
Tokens
582
Status
partial
gemini-2.5-flash-lite

Workflow Graph

Trace

[
  {
    "data": {
      "nodeType": "trigger"
    },
    "event": "node_start",
    "nodeId": "2befd473-43b7-42bb-9fcd-925e35c58044",
    "timestamp": 1780869805603
  },
  {
    "data": {
      "kind": "n8n-nodes-base.formTrigger"
    },
    "event": "seeded",
    "nodeId": "trigger",
    "timestamp": 1780869805603
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "trigger"
    },
    "event": "node_end",
    "nodeId": "2befd473-43b7-42bb-9fcd-925e35c58044",
    "timestamp": 1780869805603
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "03f1a3b9-fedc-4c5f-9812-97129e98269f",
    "timestamp": 1780869805604
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780869805604
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "03f1a3b9-fedc-4c5f-9812-97129e98269f",
    "timestamp": 1780869805604
  },
  {
    "data": {
      "nodeType": "trigger"
    },
    "event": "node_start",
    "nodeId": "062eb808-d9ff-4e9f-b507-aa58246c8ce7",
    "timestamp": 1780869805606
  },
  {
    "data": {
      "kind": "n8n-nodes-base.scheduleTrigger"
    },
    "event": "seeded",
    "nodeId": "trigger",
    "timestamp": 1780869805606
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "trigger"
    },
    "event": "node_end",
    "nodeId": "062eb808-d9ff-4e9f-b507-aa58246c8ce7",
    "timestamp": 1780869805606
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "e9f97f4b-4f7d-4e0c-9f84-b2c091f5705b",
    "timestamp": 1780869805608
  },
  {
    "data": {
      "messages": 1,
      "maxTokens": 1024
    },
    "event": "calling openai/gpt-5-mini",
    "nodeId": "llm",
    "timestamp": 1780869805608
  },
  {
    "data": {
      "model": "gpt-5-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1780869805608
  },
  {
    "data": {
      "error": "Google Gemini API error (500): {\n  \"error\": {\n    \"code\": 500,\n    \"message\": \"An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting\",\n    \"status\": \"INTERNAL\"\n  }\n}\n",
      "status": "error",
      "degraded": true,
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "e9f97f4b-4f7d-4e0c-9f84-b2c091f5705b",
    "timestamp": 1780869809722
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "88e5d798-a530-46ae-ac1c-2bbc331421f1",
    "timestamp": 1780869809727
  },
  {
    "data": {
      "messages": 1,
      "maxTokens": 1024
    },
    "event": "calling openai/gpt-5-mini",
    "nodeId": "llm",
    "timestamp": 1780869809727
  },
  {
    "data": {
      "model": "gpt-5-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1780869809727
  },
  {
    "data": {
      "error": "Google Gemini API error (500): {\n  \"error\": {\n    \"code\": 500,\n    \"message\": \"An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting\",\n    \"status\": \"INTERNAL\"\n  }\n}\n",
      "status": "error",
      "degraded": true,
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "88e5d798-a530-46ae-ac1c-2bbc331421f1",
    "timestamp": 1780869813829
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "82dca76f-328a-40c2-8139-ec6affe6e513",
    "timestamp": 1780869813831
  },
  {
    "data": {
      "inputKeys": [
        "text",
        "validCurrencies",
        "isValid",
        "invoiceNumber",
        "vendorName",
        "invoiceDate",
        "totalAmount",
        "userEmail",
        "emailBody",
        "emailSubject",
        "validationErrors",
        "validationErrors.map",
        "submissionTime",
        "fileName",
        "reportRecipientEmail",
        "output"
      ],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780869813831
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "82dca76f-328a-40c2-8139-ec6affe6e513",
    "timestamp": 1780869813831
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "d2197dc0-6ffd-45f7-83b5-1a15c68f80fe",
    "timestamp": 1780869813833
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780869813833
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "d2197dc0-6ffd-45f7-83b5-1a15c68f80fe",
    "timestamp": 1780869813833
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "8c6c66cc-ffa8-4184-bfad-ec96682e18e7",
    "timestamp": 1780869813834
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780869813834
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "8c6c66cc-ffa8-4184-bfad-ec96682e18e7",
    "timestamp": 1780869813834
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "d3cc2957-8e93-459e-ae15-a537a72fcb65",
    "timestamp": 1780869813836
  },
  {
    "data": {
      "messages": 2,
      "maxTokens": 1024
    },
    "event": "calling openai/gpt-4o-mini",
    "nodeId": "llm",
    "timestamp": 1780869813836
  },
  {
    "data": {
      "model": "gpt-4o-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1780869813836
  },
  {
    "data": {
      "model": "gemini-2.5-flash-lite",
      "costUsd": 0.0000657,
      "provider": "openai",
      "latencyMs": 690,
      "promptTokens": 121,
      "completionTokens": 134
    },
    "event": "llm_result",
    "nodeId": "_context",
    "timestamp": 1780869814527
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "d3cc2957-8e93-459e-ae15-a537a72fcb65",
    "timestamp": 1780869814527
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "4dec86d9-c3bd-4384-b8a2-0785d7bb8f91",
    "timestamp": 1780869814536
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780869814536
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "4dec86d9-c3bd-4384-b8a2-0785d7bb8f91",
    "timestamp": 1780869814536
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "5a124c06-ecb7-44b1-ad1b-47b65913fb52",
    "timestamp": 1780869814537
  },
  {
    "data": {
      "service": "gmail",
      "resolved": true
    },
    "event": "credential_access",
    "nodeId": "_context",
    "timestamp": 1780869814537
  },
  {
    "data": {
      "url": "https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=5&q=in%3Ainbox",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1780869814537
  },
  {
    "data": {
      "status": 200
    },
    "event": "gmail.read",
    "nodeId": "integration",
    "timestamp": 1780869814744
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "gmail",
      "latencyMs": 207,
      "operation": "read"
    },
    "event": "integration_call",
    "nodeId": "integration",
    "timestamp": 1780869814744
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "5a124c06-ecb7-44b1-ad1b-47b65913fb52",
    "timestamp": 1780869814744
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "3fc45009-48db-4fce-9de3-c125f3222621",
    "timestamp": 1780869814754
  },
  {
    "data": {
      "messages": 2,
      "maxTokens": 1024
    },
    "event": "calling openai/gpt-4o-mini",
    "nodeId": "llm",
    "timestamp": 1780869814754
  },
  {
    "data": {
      "model": "gpt-4o-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1780869814754
  },
  {
    "data": {
      "model": "gemini-2.5-flash-lite",
      "costUsd": 0.0000861,
      "provider": "openai",
      "latencyMs": 895,
      "promptTokens": 149,
      "completionTokens": 178
    },
    "event": "llm_result",
    "nodeId": "_context",
    "timestamp": 1780869815650
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "3fc45009-48db-4fce-9de3-c125f3222621",
    "timestamp": 1780869815650
  },
  {
    "data": {
      "nodeType": "code"
    },
    "event": "node_start",
    "nodeId": "1c5937a1-63a7-4d9f-8dd0-8b1796d9cf4e",
    "timestamp": 1780869815650
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "code"
    },
    "event": "node_end",
    "nodeId": "1c5937a1-63a7-4d9f-8dd0-8b1796d9cf4e",
    "timestamp": 1780869815656
  },
  {
    "data": {
      "nodeType": "if"
    },
    "event": "node_start",
    "nodeId": "d4ace010-b345-493d-b3db-ecfbb3a115a4",
    "timestamp": 1780869815659
  },
  {
    "event": "false branch",
    "nodeId": "if",
    "timestamp": 1780869815659
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "if"
    },
    "event": "node_end",
    "nodeId": "d4ace010-b345-493d-b3db-ecfbb3a115a4",
    "timestamp": 1780869815659
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "ae5a40be-3e93-4dc8-b969-965d134278c8",
    "timestamp": 1780869815661
  },
  {
    "data": {
      "inputKeys": [
        "text",
        "model",
        "usage",
        "validation"
      ],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780869815661
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "ae5a40be-3e93-4dc8-b969-965d134278c8",
    "timestamp": 1780869815661
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "21d45666-aa82-4d19-9833-2c1751b8d6ec",
    "timestamp": 1780869815662
  },
  {
    "data": {
      "inputKeys": [
        "text",
        "model",
        "usage",
        "validation"
      ],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780869815662
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "21d45666-aa82-4d19-9833-2c1751b8d6ec",
    "timestamp": 1780869815662
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "f5cd3484-3d2a-4034-aef6-085ab713559f",
    "timestamp": 1780869815663
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780869815663
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "f5cd3484-3d2a-4034-aef6-085ab713559f",
    "timestamp": 1780869815663
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "825ad618-79fe-4941-8666-b266935c0f18",
    "timestamp": 1780869815666
  },
  {
    "data": {
      "service": "gmail",
      "resolved": true
    },
    "event": "credential_access",
    "nodeId": "_context",
    "timestamp": 1780869815666
  },
  {
    "data": {
      "url": "https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=5&q=in%3Ainbox",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1780869815666
  },
  {
    "data": {
      "status": 200
    },
    "event": "gmail.read",
    "nodeId": "integration",
    "timestamp": 1780869815786
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "gmail",
      "latencyMs": 120,
      "operation": "read"
    },
    "event": "integration_call",
    "nodeId": "integration",
    "timestamp": 1780869815786
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "825ad618-79fe-4941-8666-b266935c0f18",
    "timestamp": 1780869815786
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "f67acac8-a840-4148-8b5b-6bd9c8e36e0d",
    "timestamp": 1780869815792
  },
  {
    "data": {
      "service": "gmail",
      "resolved": true
    },
    "event": "credential_access",
    "nodeId": "_context",
    "timestamp": 1780869815792
  },
  {
    "data": {
      "url": "https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=5&q=in%3Ainbox",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1780869815792
  },
  {
    "data": {
      "status": 200
    },
    "event": "gmail.read",
    "nodeId": "integration",
    "timestamp": 1780869815908
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "gmail",
      "latencyMs": 116,
      "operation": "read"
    },
    "event": "integration_call",
    "nodeId": "integration",
    "timestamp": 1780869815908
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "f67acac8-a840-4148-8b5b-6bd9c8e36e0d",
    "timestamp": 1780869815908
  }
]