8
n8n 中文网amn8n.com

自动财务追踪器:同步收据、预测现金流并获取月度报告

高级

这是一个Invoice Processing, AI Summarization, Multimodal AI领域的自动化工作流,包含 17 个节点。主要使用 If, Set, Cron, Gmail, OpenAi 等节点。 使用Gmail、Google Sheets和GPT-4o月度报告的自动化财务追踪器

前置要求
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "templateCreatedBy": {
      "id": "template-creator",
      "name": "n8n Template Creator"
    },
    "templateCredentials": [
      "gmailOAuth2",
      "googleSheetsOAuth2Api",
      "openAiApi",
      "smtp"
    ]
  },
  "name": "自动财务追踪器:同步收据、预测现金流并获取月度报告",
  "nodes": [
    {
      "id": "sticky-description",
      "name": "📋 模板描述",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        50,
        50
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "cron-trigger-node",
      "name": "月度报告触发器",
      "type": "n8n-nodes-base.cron",
      "position": [
        250,
        100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "user-config",
      "name": "用户配置",
      "type": "n8n-nodes-base.set",
      "position": [
        50,
        200
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "gmail-fetch-node",
      "name": "获取收据邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        250,
        300
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "gmail-get-attachments",
      "name": "获取带附件的邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        450,
        300
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "parse-email-body",
      "name": "解析邮件正文并检查附件",
      "type": "n8n-nodes-base.function",
      "position": [
        650,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ai-extract-receipt",
      "name": "AI:提取收据数据 (GPT-4o)",
      "type": "n8n-nodes-base.openAi",
      "position": [
        850,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "clean-ai-output",
      "name": "清理并解析AI输出",
      "type": "n8n-nodes-base.function",
      "position": [
        1050,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "check-duplicates",
      "name": "检查重复项",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1250,
        300
      ],
      "parameters": {},
      "typeVersion": 4
    },
    {
      "id": "filter-missing-vendor",
      "name": "过滤器:缺少供应商时跳过",
      "type": "n8n-nodes-base.if",
      "position": [
        1450,
        300
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "append-to-sheet",
      "name": "追加到财务表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1650,
        300
      ],
      "parameters": {},
      "typeVersion": 4
    },
    {
      "id": "generate-date-range",
      "name": "生成月份范围",
      "type": "n8n-nodes-base.function",
      "position": [
        450,
        100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "read-finance-data",
      "name": "读取所有财务数据",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        650,
        100
      ],
      "parameters": {},
      "typeVersion": 4
    },
    {
      "id": "aggregate-monthly",
      "name": "汇总月度数据",
      "type": "n8n-nodes-base.function",
      "position": [
        850,
        100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ai-generate-insights",
      "name": "AI:生成洞察分析",
      "type": "n8n-nodes-base.openAi",
      "position": [
        1050,
        100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "generate-chart",
      "name": "生成图表和最终数据",
      "type": "n8n-nodes-base.function",
      "position": [
        1250,
        100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "email-report",
      "name": "发送月度报告",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1450,
        100
      ],
      "parameters": {},
      "typeVersion": 2
    }
  ],
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "v2.1-production-ready",
  "connections": {
    "Check for Duplicates": {
      "main": [
        [
          {
            "node": "Filter: Skip if Missing Vendor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Receipt Emails": {
      "main": [
        [
          {
            "node": "Get Email with Attachments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Month Range": {
      "main": [
        [
          {
            "node": "Read All Finance Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Generate Insights": {
      "main": [
        [
          {
            "node": "Generate Chart & Final Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read All Finance Data": {
      "main": [
        [
          {
            "node": "Aggregate Monthly Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Monthly Data": {
      "main": [
        [
          {
            "node": "AI: Generate Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monthly Report Trigger": {
      "main": [
        [
          {
            "node": "Generate Month Range",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Receipt Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean & Parse AI Output": {
      "main": [
        [
          {
            "node": "Check for Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Email with Attachments": {
      "main": [
        [
          {
            "node": "Parse Email Body & Check Attachments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Chart & Final Data": {
      "main": [
        [
          {
            "node": "Send Monthly Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Skip if Missing Vendor": {
      "main": [
        [
          {
            "node": "Append to Finance Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Extract Receipt Data (GPT-4o)": {
      "main": [
        [
          {
            "node": "Clean & Parse AI Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Email Body & Check Attachments": {
      "main": [
        [
          {
            "node": "AI: Extract Receipt Data (GPT-4o)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 发票处理, AI 摘要总结, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量17
分类3
节点类型9
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Shelly-Ann Davy

Shelly-Ann Davy

@SheCodesFlow

Founder of The Workflow Muse & @SheCodesFlow. I craft elegant, task-focused automations for creators, founders, and soft-tech enthusiasts. “Automate with grace. Scale with power.”

外部链接
在 n8n.io 查看

分享此工作流