Rechnungsautomatisierungspaket: KI-gesteuerte Rechnungsverarbeitung und wöchentlicher Bericht

Experte

Dies ist ein Automatisierungsworkflow mit 21 Nodes. Hauptsächlich werden If, Set, Airtable, EmailSend, FormTrigger und andere Nodes verwendet. Automatisierte Rechnungsverarbeitung und wöchentliche Ausgabenberichte mit GPT-4 und Airtable

Voraussetzungen
  • Airtable API Key
  • OpenAI API Key

Kategorie

-
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "GrKYNsmth0mGCu4O",
  "meta": {
    "instanceId": "15d6057a37b8367f33882dd60593ee5f6cc0c59310ff1dc66b626d726083b48d",
    "templateCredsSetupCompleted": true
  },
  "name": "Invoice Automation Kit: AI-Powered Invoice Processing and Weekly Reports",
  "tags": [],
  "nodes": [
    {
      "id": "4f3cbf6b-6399-44c9-a09c-1cf906bfa22f",
      "name": "Rechnungshochladeformular",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -448,
        112
      ],
      "webhookId": "5341e1c7-350e-419f-9b6c-c9663ca6763a",
      "parameters": {
        "options": {},
        "formTitle": "Invoice Upload",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "Upload Invoice",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": ".pdf, .png, .jpg"
            },
            {
              "fieldLabel": "Additional Notes (Optional)"
            }
          ]
        },
        "formDescription": "Upload your invoice for automated processing"
      },
      "typeVersion": 2.3
    },
    {
      "id": "9c465618-7758-44ac-a546-0011af01198c",
      "name": "Workflow-Konfiguration",
      "type": "n8n-nodes-base.set",
      "position": [
        -224,
        112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "airtableBaseId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Your Airtable Base ID__>"
            },
            {
              "id": "id-2",
              "name": "airtableTableId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Your Airtable Table ID__>"
            },
            {
              "id": "id-3",
              "name": "reportRecipientEmail",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Email address for weekly reports__>"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "3b20014d-1f05-41f9-9360-36684182132a",
      "name": "Rechnungsdaten extrahieren",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        0,
        0
      ],
      "parameters": {
        "text": "Extract the following information from the uploaded invoice: vendor name, invoice date, total amount, currency, and line items (each with description, quantity, unit price, and total). Return the data in the structured format defined by the output parser.",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "dc923a0a-f108-4220-a3cb-7b0fb65e8e87",
      "name": "OpenAI Chat Model - Rechnungsparser",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        16,
        224
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "1QksFURwoDDzs6yl",
          "name": "API獲得済み"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "415ab90b-19e8-44bc-87c1-e3d38ddcfaba",
      "name": "Rechnungsdatenparser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        144,
        224
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"vendor\": \"Acme Corporation\",\n\t\"invoiceDate\": \"2024-01-15\",\n\t\"totalAmount\": 1250.50,\n\t\"currency\": \"USD\",\n\t\"lineItems\": [\n\t\t{\n\t\t\t\"description\": \"Product A\",\n\t\t\t\"quantity\": 2,\n\t\t\t\"unitPrice\": 500.00,\n\t\t\t\"total\": 1000.00\n\t\t},\n\t\t{\n\t\t\t\"description\": \"Product B\",\n\t\t\t\"quantity\": 1,\n\t\t\t\"unitPrice\": 250.50,\n\t\t\t\"total\": 250.50\n\t\t}\n\t]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "103d5136-194e-45f5-98bf-d9a613521427",
      "name": "Rechnungsdaten validieren",
      "type": "n8n-nodes-base.if",
      "position": [
        352,
        112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "notEmpty"
              },
              "leftValue": "={{ $('Extract Invoice Data').item.json.vendor }}"
            },
            {
              "id": "id-2",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $('Extract Invoice Data').item.json.totalAmount }}",
              "rightValue": "0"
            },
            {
              "id": "id-3",
              "operator": {
                "type": "string",
                "operation": "notEmpty"
              },
              "leftValue": "={{ $('Extract Invoice Data').item.json.invoiceDate }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0418ba62-d4f2-4764-9f28-ca138d1ed81c",
      "name": "Rechnung in Airtable speichern",
      "type": "n8n-nodes-base.airtable",
      "position": [
        576,
        112
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.airtableTableId }}"
        },
        "columns": {
          "value": {
            "Vendor": "={{ $json.vendor }}",
            "Currency": "={{ $json.currency }}",
            "Line Items": "={{ JSON.stringify($json.lineItems) }}",
            "Invoice Date": "={{ $json.invoiceDate }}",
            "Total Amount": "={{ $json.totalAmount }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "6I4nL72ldgd0L8Cz",
          "name": "Airtable Personal Access Token account 3"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "8c5c5d9f-00aa-461f-8446-66c8dad0d335",
      "name": "Wöchentlicher Berichtsplan",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -592,
        544
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtHour": 18
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "88035c13-ffdd-4ff6-a2b2-e9ab5cba0f9c",
      "name": "Wöchentliche Rechnungen abrufen",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -336,
        544
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.airtableTableId }}"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "IS_AFTER({Invoice Date}, DATEADD(TODAY(), -7, 'days'))"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "6I4nL72ldgd0L8Cz",
          "name": "Airtable Personal Access Token account 3"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "158e3e08-f784-4ecc-8bb5-8af9aa7f7d8d",
      "name": "Ausgabenbericht generieren",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        0,
        544
      ],
      "parameters": {
        "text": "Analyze the weekly invoice data and generate a comprehensive spending report. Include: total spending for the week, breakdown by vendor, top 5 expenses, spending trends, and any notable observations. Format the report in a clear, professional manner suitable for email.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "679779e5-a7b2-4bce-adbb-c3c5225617e0",
      "name": "OpenAI Chat Model - Berichtsgenerator",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -64,
        672
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "1QksFURwoDDzs6yl",
          "name": "API獲得済み"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1338103f-3774-4460-975e-dd92e7224e39",
      "name": "Wöchentlichen Bericht per E-Mail senden",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        448,
        544
      ],
      "webhookId": "3db8cea9-0a32-4cb5-93ad-98ae5a770278",
      "parameters": {
        "html": "={{ $json.output }}",
        "options": {},
        "subject": "=Weekly Spending Report - {{ $now.format('MMMM DD, YYYY') }}",
        "toEmail": "={{ $('Workflow Configuration').first().json.reportRecipientEmail }}",
        "fromEmail": "<__PLACEHOLDER_VALUE__Sender email address__>"
      },
      "typeVersion": 2.1
    },
    {
      "id": "1fc7950b-8968-49fa-a7e3-f9922ca4ead0",
      "name": "Notizzettel",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        -192
      ],
      "parameters": {
        "width": 1072,
        "height": 1392,
        "content": "## Invoice Automation Kit: AI-Powered Invoice Processing and Weekly Reports\n\nThis n8n workflow is designed to automate invoice processing and streamline financial management. It leverages AI to extract key invoice data, validate it, and store it in Airtable. Additionally, it generates and emails weekly spending reports.\n\n### Who is it for?\n\nThis template is for small businesses, freelancers, or individuals looking to save time on manual invoice processing. It's ideal for anyone who wants to improve the accuracy of their financial data and maintain a clear overview of their spending.\n\n### How it Works / What it Does\n\nThis workflow consists of two main parts:\n\n1.  **Invoice Data Extraction and Storage**:\n    *   **Invoice Upload Form**: Upload your invoices (PDF, PNG, JPG) via an n8n form.\n    *   **AI-Powered Data Extraction**: AI extracts key information such as vendor name, invoice date, total amount, currency, and line items (description, quantity, unit price, total) from the uploaded invoice.\n    *   **Data Validation**: The extracted data is validated to ensure it is complete and accurate.\n    *   **Store in Airtable**: Validated invoice data is saved in a structured format to your specified Airtable base and table.\n\n2.  **Weekly Spending Report Generation and Email**:\n    *   **Weekly Report Schedule**: Automatically triggers every Sunday at 6 PM.\n    *   **Fetch Weekly Invoices**: Retrieves all invoices stored in Airtable within the last 7 days.\n    *   **AI-Powered Spending Report Generation**: Based on the retrieved invoice data, AI generates a comprehensive spending report, including total spending for the week, breakdown by vendor, top 5 expenses, spending trends, and any notable observations.\n    *   **Send Weekly Report Email**: The generated report is sent in a professional format to the configured recipient email address.\n\n### How to Set Up\n\n1.  **Update Workflow Configuration Node**:\n    *   Replace `airtableBaseId` with your Airtable Base ID.\n    *   Replace `airtableTableId` with your Airtable Table ID.\n    *   Replace `reportRecipientEmail` with the email address that should receive the weekly reports.\n2.  **Airtable Credentials**:\n    *   Set up your Airtable Personal Access Token credentials in the Airtable nodes.\n3.  **OpenAI Credentials**:\n    *   Set up your OpenAI API key credentials in the OpenAI Chat Model nodes.\n4.  **Email Credentials**:\n    *   Configure your email sending service (e.g., SMTP) credentials in the \"Send Weekly Report Email\" node and update the `fromEmail`.\n5.  **Airtable Table Setup**:\n    *   Ensure your Airtable has a table set up with appropriate columns to store invoice data, such as \"Vendor\", \"Invoice Date\", \"Total Amount\", \"Currency\", and \"Line Items\".\n\n### Requirements\n\n*   An n8n instance\n*   An OpenAI account and API key\n*   An Airtable account and Personal Access Token\n*   An email sending service (e.g., SMTP server)\n\n### How to Customize the Workflow\n\n*   **Adjust Information Extraction**: Edit the prompt in the \"Extract Invoice Data\" node to include additional information you wish to extract.\n*   **Customize Report**: Adjust the prompt in the \"Generate Spending Report\" node to change specific analyses or formatting included in the report.\n*   **Add Notifications**: Incorporate notification nodes to other services like Slack or Microsoft Teams to be alerted when an invoice is uploaded or a report is ready.\n*   **Modify Validation Rules**: Edit the conditions in the \"Validate Invoice Data\" node to implement additional validation rules.\n\nHere's a visual representation of the workflow.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0a533b31-bf95-45d5-b6ad-32ee369df522",
      "name": "Notizzettel1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -48
      ],
      "parameters": {
        "color": 3,
        "height": 320,
        "content": "## **Invoice Data Extraction and Storage**\n   *   **Invoice Upload Form**: Upload your invoices (PDF, PNG, JPG) via an n8n form."
      },
      "typeVersion": 1
    },
    {
      "id": "1052cdb3-dd21-4b82-ab03-aa0e7fe31e1b",
      "name": "Notizzettel2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -112
      ],
      "parameters": {
        "color": 4,
        "width": 384,
        "height": 464,
        "content": "## **AI-Powered Data Extraction**\n** AI extracts key information such as vendor name, invoice date, total amount, currency, and line items (description, quantity, unit price, total) from the uploaded invoice."
      },
      "typeVersion": 1
    },
    {
      "id": "fc719679-9734-4e04-af38-356f7d71f79c",
      "name": "Notizzettel3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -32
      ],
      "parameters": {
        "color": 6,
        "width": 224,
        "height": 288,
        "content": "##  **Store in Airtable**\n**Validated invoice data is saved in a structured format to your specified Airtable base and table."
      },
      "typeVersion": 1
    },
    {
      "id": "4ab481fd-2428-4343-83f6-076144131a0d",
      "name": "Notizzettel4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -32
      ],
      "parameters": {
        "width": 192,
        "height": 288,
        "content": "## **Data Validation**\n**The extracted data is validated to ensure it is complete and accurate."
      },
      "typeVersion": 1
    },
    {
      "id": "b98c5fa0-8050-4885-a444-624b5933a450",
      "name": "Notizzettel5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        416
      ],
      "parameters": {
        "color": 4,
        "width": 256,
        "height": 288,
        "content": "## **Fetch Weekly Invoices**\n**Retrieves all invoices stored in Airtable within the last 7 days."
      },
      "typeVersion": 1
    },
    {
      "id": "3762e193-5bf8-4d31-bffb-00eaf1671082",
      "name": "Notizzettel6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        368
      ],
      "parameters": {
        "color": 6,
        "width": 464,
        "height": 432,
        "content": "## **AI-Powered Spending Report Generation**\nBased on the retrieved invoice data, AI generates a comprehensive spending report, including total spending for the week, breakdown by vendor, top 5 expenses, spending trends, and any notable observations."
      },
      "typeVersion": 1
    },
    {
      "id": "49aa8e47-049a-4528-b554-d5b88913955e",
      "name": "Notizzettel7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        368
      ],
      "parameters": {
        "width": 224,
        "height": 336,
        "content": "## **Send Weekly Report Email**\n**The generated report is sent in a professional format to the configured recipient email address."
      },
      "typeVersion": 1
    },
    {
      "id": "46d8ac5e-356a-4833-a554-9f5e3e437362",
      "name": "Notizzettel8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        416
      ],
      "parameters": {
        "height": 272,
        "content": "## **Weekly Report Schedule**\n Automatically triggers every Sunday at 6 PM.\n    "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c58557f6-707c-4e2f-b09b-547c7bd4f0e0",
  "connections": {
    "415ab90b-19e8-44bc-87c1-e3d38ddcfaba": {
      "ai_outputParser": [
        [
          {
            "node": "3b20014d-1f05-41f9-9360-36684182132a",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "4f3cbf6b-6399-44c9-a09c-1cf906bfa22f": {
      "main": [
        [
          {
            "node": "9c465618-7758-44ac-a546-0011af01198c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3b20014d-1f05-41f9-9360-36684182132a": {
      "main": [
        [
          {
            "node": "103d5136-194e-45f5-98bf-d9a613521427",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "88035c13-ffdd-4ff6-a2b2-e9ab5cba0f9c": {
      "main": [
        [
          {
            "node": "158e3e08-f784-4ecc-8bb5-8af9aa7f7d8d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "103d5136-194e-45f5-98bf-d9a613521427": {
      "main": [
        [
          {
            "node": "0418ba62-d4f2-4764-9f28-ca138d1ed81c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8c5c5d9f-00aa-461f-8446-66c8dad0d335": {
      "main": [
        [
          {
            "node": "88035c13-ffdd-4ff6-a2b2-e9ab5cba0f9c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9c465618-7758-44ac-a546-0011af01198c": {
      "main": [
        [
          {
            "node": "3b20014d-1f05-41f9-9360-36684182132a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "158e3e08-f784-4ecc-8bb5-8af9aa7f7d8d": {
      "main": [
        [
          {
            "node": "1338103f-3774-4460-975e-dd92e7224e39",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dc923a0a-f108-4220-a3cb-7b0fb65e8e87": {
      "ai_languageModel": [
        [
          {
            "node": "3b20014d-1f05-41f9-9360-36684182132a",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "679779e5-a7b2-4bce-adbb-c3c5225617e0": {
      "ai_languageModel": [
        [
          {
            "node": "158e3e08-f784-4ecc-8bb5-8af9aa7f7d8d",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Experte

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Experte
Anzahl der Nodes21
Kategorie-
Node-Typen10
Schwierigkeitsbeschreibung

Für fortgeschrittene Benutzer, komplexe Workflows mit 16+ Nodes

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34