Automatisierter täglicher Cashflow- und Ausgabenbericht für Finanzprofis

Experte

Dies ist ein Document Extraction-Bereich Automatisierungsworkflow mit 25 Nodes. Hauptsächlich werden Code, Merge, Slack, EmailSend, GoogleDrive und andere Nodes verwendet. Täglicher Cashflow-Bericht für das Finanzteam mit Google Sheets, Slack und E-Mail generiert

Voraussetzungen
  • Slack Bot Token oder Webhook URL
  • Google Drive API-Anmeldedaten
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
  • Google Sheets API-Anmeldedaten
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": "zfjbXMrH4jEkZcti",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Daily Cash Flow & Expense Report for Finance Professionals",
  "tags": [],
  "nodes": [
    {
      "id": "906bf96e-e9fd-480d-850a-ea04667fba76",
      "name": "Täglich um 18 Uhr",
      "type": "n8n-nodes-base.scheduleTrigger",
      "notes": "⏰ DAILY TRIGGER\nRuns every day at 6:00 PM\nGenerates end-of-day report",
      "position": [
        -928,
        -208
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "13babc7a-eaef-4484-b2a7-a9d98a7c7936",
      "name": "Cashzuflüsse abrufen",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "💵 FETCH INFLOWS\nRetrieves all incoming payments\nToday's deposits & revenue",
      "position": [
        -704,
        -304
      ],
      "parameters": {
        "url": "https://api.accounting.com/transactions",
        "options": {}
      },
      "typeVersion": 4.1
    },
    {
      "id": "8c87a527-7f6a-4806-80a5-63cb76a755f4",
      "name": "Cashabflüsse abrufen",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "💸 FETCH OUTFLOWS\nRetrieves all outgoing payments\nToday's expenses & bills",
      "position": [
        -704,
        0
      ],
      "parameters": {
        "url": "https://api.accounting.com/transactions",
        "options": {}
      },
      "typeVersion": 4.1
    },
    {
      "id": "4a48cf32-59d4-4048-ae7c-0134ee0f2663",
      "name": "Zuflüsse berechnen",
      "type": "n8n-nodes-base.code",
      "notes": "🧮 CALCULATE INFLOWS\nSums total incoming cash\nGroups by category\nCounts transactions",
      "position": [
        -480,
        -304
      ],
      "parameters": {
        "jsCode": "// Process Inflows\nconst inflows = $input.first().json;\nlet totalInflow = 0;\nconst inflowsByCategory = {};\n\nif (Array.isArray(inflows)) {\n  inflows.forEach(transaction => {\n    totalInflow += parseFloat(transaction.amount || 0);\n    const category = transaction.category || 'Other';\n    if (!inflowsByCategory[category]) {\n      inflowsByCategory[category] = 0;\n    }\n    inflowsByCategory[category] += parseFloat(transaction.amount || 0);\n  });\n}\n\nreturn {\n  total_inflow: totalInflow.toFixed(2),\n  inflow_categories: inflowsByCategory,\n  inflow_count: Array.isArray(inflows) ? inflows.length : 0,\n  date: new Date().toISOString().split('T')[0]\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "47798a32-d2a6-4a71-b0fb-74c382417b45",
      "name": "Abflüsse berechnen",
      "type": "n8n-nodes-base.code",
      "notes": "🧮 CALCULATE OUTFLOWS\nSums total outgoing cash\nGroups by expense category\nCounts transactions",
      "position": [
        -480,
        -112
      ],
      "parameters": {
        "jsCode": "// Process Outflows\nconst outflows = $input.first().json;\nlet totalOutflow = 0;\nconst outflowsByCategory = {};\n\nif (Array.isArray(outflows)) {\n  outflows.forEach(transaction => {\n    totalOutflow += parseFloat(transaction.amount || 0);\n    const category = transaction.category || 'Other';\n    if (!outflowsByCategory[category]) {\n      outflowsByCategory[category] = 0;\n    }\n    outflowsByCategory[category] += parseFloat(transaction.amount || 0);\n  });\n}\n\nreturn {\n  total_outflow: totalOutflow.toFixed(2),\n  outflow_categories: outflowsByCategory,\n  outflow_count: Array.isArray(outflows) ? outflows.length : 0,\n  date: new Date().toISOString().split('T')[0]\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "a5ac7f5d-5c0e-4aa1-a0ea-924aba958ce2",
      "name": "Daten zusammenführen",
      "type": "n8n-nodes-base.merge",
      "notes": "🔀 COMBINE DATA\nMerges inflows + outflows\nPrepares for final report",
      "position": [
        -256,
        -208
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combinationMode": "mergeByPosition"
      },
      "typeVersion": 2.1
    },
    {
      "id": "cf3299a5-67c9-4970-948e-7613f2dfbd07",
      "name": "Netto-Cashflow berechnen",
      "type": "n8n-nodes-base.code",
      "notes": "📊 NET CALCULATION\nTotal Inflow - Total Outflow\nDetermines cash position\nPositive or Negative status",
      "position": [
        -32,
        -208
      ],
      "parameters": {
        "jsCode": "const data = $input.all();\nconst inflow = data[0].json;\nconst outflow = data[1].json;\n\nconst totalInflow = parseFloat(inflow.total_inflow || 0);\nconst totalOutflow = parseFloat(outflow.total_outflow || 0);\nconst netCashFlow = totalInflow - totalOutflow;\n\nreturn {\n  date: inflow.date,\n  total_inflow: totalInflow.toFixed(2),\n  total_outflow: totalOutflow.toFixed(2),\n  net_cash_flow: netCashFlow.toFixed(2),\n  inflow_categories: inflow.inflow_categories,\n  outflow_categories: outflow.outflow_categories,\n  inflow_count: inflow.inflow_count,\n  outflow_count: outflow.outflow_count,\n  cash_flow_status: netCashFlow >= 0 ? 'Positive' : 'Negative'\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "10370491-a9fb-4325-b6f0-4d81f071393a",
      "name": "In Google Tabellen speichern",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "💾 SAVE TO SHEETS\nSheet: Daily_Cash_Flow\nDoc ID: 9x8w7v6u5t4s3r2q\nHistorical tracking",
      "position": [
        192,
        -304
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappings": [
            {
              "value": "={{ $json.date }}",
              "column": "Date"
            },
            {
              "value": "={{ $json.total_inflow }}",
              "column": "Total_Inflow"
            },
            {
              "value": "={{ $json.total_outflow }}",
              "column": "Total_Outflow"
            },
            {
              "value": "={{ $json.net_cash_flow }}",
              "column": "Net_Cash_Flow"
            },
            {
              "value": "={{ $json.cash_flow_status }}",
              "column": "Status"
            },
            {
              "value": "={{ $json.inflow_count }}",
              "column": "Inflow_Count"
            },
            {
              "value": "={{ $json.outflow_count }}",
              "column": "Outflow_Count"
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": "Daily_Cash_Flow",
        "documentId": "9x8w7v6u5t4s3r2q",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "ScSS2KxGQULuPtdy",
          "name": "Google Sheets- test"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "90770fcd-1953-46f9-872b-1da928eca718",
      "name": "HTML-Bericht erstellen",
      "type": "n8n-nodes-base.code",
      "notes": "📄 CREATE REPORT\nBuilds HTML formatted report\nIncludes all categories\nSummary + detailed breakdown",
      "position": [
        208,
        48
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json;\n\n// Build category breakdown HTML\nlet inflowHTML = '';\nfor (const [category, amount] of Object.entries(data.inflow_categories)) {\n  inflowHTML += `<tr><td>${category}</td><td>$${parseFloat(amount).toFixed(2)}</td></tr>`;\n}\n\nlet outflowHTML = '';\nfor (const [category, amount] of Object.entries(data.outflow_categories)) {\n  outflowHTML += `<tr><td>${category}</td><td>$${parseFloat(amount).toFixed(2)}</td></tr>`;\n}\n\nconst statusColor = data.cash_flow_status === 'Positive' ? 'green' : 'red';\n\nconst htmlReport = `\n<!DOCTYPE html>\n<html>\n<head>\n  <style>\n    body { font-family: Arial, sans-serif; max-width: 800px; margin: 20px auto; }\n    h1 { color: #333; border-bottom: 3px solid #4CAF50; padding-bottom: 10px; }\n    h2 { color: #666; margin-top: 30px; }\n    table { width: 100%; border-collapse: collapse; margin: 20px 0; }\n    th, td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }\n    th { background-color: #4CAF50; color: white; }\n    .summary { background: #f5f5f5; padding: 20px; border-radius: 8px; margin: 20px 0; }\n    .positive { color: green; font-weight: bold; }\n    .negative { color: red; font-weight: bold; }\n  </style>\n</head>\n<body>\n  <h1>Daily Cash Flow Report</h1>\n  <p><strong>Date:</strong> ${data.date}</p>\n  \n  <div class=\"summary\">\n    <h2>Summary</h2>\n    <p><strong>Total Inflows:</strong> $${data.total_inflow} (${data.inflow_count} transactions)</p>\n    <p><strong>Total Outflows:</strong> $${data.total_outflow} (${data.outflow_count} transactions)</p>\n    <p><strong>Net Cash Flow:</strong> <span style=\"color: ${statusColor};\">$${data.net_cash_flow}</span></p>\n    <p><strong>Status:</strong> <span style=\"color: ${statusColor};\">${data.cash_flow_status}</span></p>\n  </div>\n  \n  <h2>Cash Inflows by Category</h2>\n  <table>\n    <tr><th>Category</th><th>Amount</th></tr>\n    ${inflowHTML}\n    <tr style=\"background: #f0f0f0; font-weight: bold;\"><td>Total</td><td>$${data.total_inflow}</td></tr>\n  </table>\n  \n  <h2>Cash Outflows by Category</h2>\n  <table>\n    <tr><th>Category</th><th>Amount</th></tr>\n    ${outflowHTML}\n    <tr style=\"background: #f0f0f0; font-weight: bold;\"><td>Total</td><td>$${data.total_outflow}</td></tr>\n  </table>\n</body>\n</html>\n`;\n\nreturn {\n  html_report: htmlReport,\n  ...data\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "0bcbdaaf-97ff-440a-b3d9-5f6978183791",
      "name": "Bericht per E-Mail senden",
      "type": "n8n-nodes-base.emailSend",
      "notes": "📧 EMAIL DELIVERY\nTo: finance@company.com, cfo@company.com\nCC: accounting@company.com\nPDF attachment included",
      "position": [
        640,
        -304
      ],
      "webhookId": "7424dadf-c7c3-45ef-ab94-afc139928921",
      "parameters": {
        "options": {
          "ccEmail": "accounting@company.com",
          "attachments": "data:application/pdf;base64,={{ $json.pdf_base64 }}"
        },
        "subject": "Daily Cash Flow Report - {{ $now.format('MMM dd, yyyy') }}",
        "toEmail": "finance@company.com, cfo@company.com",
        "fromEmail": "reports@company.com"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3b4e8178-5819-4299-a509-429cbdc09e7e",
      "name": "Backup in Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "notes": "☁️ CLOUD BACKUP\nGoogle Drive storage\nFolder: /finance/reports/\nAutomatic archiving",
      "position": [
        704,
        48
      ],
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "MGnTMJvH7MB4xBS9",
          "name": "Google Drive account - test"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "f6b32c5f-8fcf-4896-9c45-53147eed217d",
      "name": "In Slack veröffentlichen",
      "type": "n8n-nodes-base.slack",
      "notes": "💬 SLACK NOTIFICATION\nChannel: #daily-reports\nChannel ID: C98765ZYXWV\nQuick summary for team",
      "position": [
        448,
        48
      ],
      "webhookId": "1af009f1-5a52-4ab9-bfc0-ccc771596ac6",
      "parameters": {
        "text": "📊 *Daily Cash Flow Report*\n\n*Date:* {{ $json.date }}\n\n💵 *Total Inflows:* ${{ $json.total_inflow }}\n💸 *Total Outflows:* ${{ $json.total_outflow }}\n📈 *Net Cash Flow:* ${{ $json.net_cash_flow }}\n\n*Status:* {{ $json.cash_flow_status }}\n\nFull report emailed to finance team.",
        "user": {
          "__rl": true,
          "mode": "username",
          "value": ""
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "MQ0fgwuS8AzfwFvy",
          "name": "Slack account - test "
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "81ba9fe8-c157-4f81-a1ad-b5704b4b52c8",
      "name": "In PDF konvertieren",
      "type": "n8n-nodes-pdfmonkey.pdfMonkey",
      "position": [
        416,
        -304
      ],
      "parameters": {
        "documentTemplateId": "=mnhu765rfcxse456yuj"
      },
      "credentials": {
        "pdfMonkeyApi": {
          "id": "B6lNi5YDBkcut5uy",
          "name": "PDFMonkey account - test"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5b07dccd-f3c4-49df-a158-5a7349d6a4cb",
      "name": "Notiz1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        -336
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "⏰ Triggers daily at 6 PM\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4576e612-833e-457e-9700-03453ab42433",
      "name": "Notiz2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -400
      ],
      "parameters": {
        "width": 160,
        "height": 240,
        "content": "💵 Fetches cash inflows (deposits, revenue)\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8f251823-583f-49f5-9d47-ef91165a33c5",
      "name": "Notiz3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -96
      ],
      "parameters": {
        "width": 160,
        "height": 240,
        "content": "💸 Fetches cash outflows (expenses, bills)\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8ae88b52-3252-4f56-979a-2b731758521b",
      "name": "Notiz4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -416
      ],
      "parameters": {
        "width": 160,
        "height": 496,
        "content": "🧮 Calculates totals by category for both\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7bcaaee4-8a25-45f2-81c1-9e585fe57b20",
      "name": "Notiz5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -320
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "🔀 Merges the data together\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e238c7cd-1035-43eb-8479-4ce1dd7cd97b",
      "name": "Notiz6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -320
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "📊 Calculates net cash flow (Inflow - Outflow)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "94c331d0-66f9-445e-82e3-6e135519abf7",
      "name": "Notiz7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -432
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "💾 Saves to Google Sheets for tracking\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d40e3e31-de41-40ea-ba8f-1fe904f18d0a",
      "name": "Notiz8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -432
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "📧 Emails to finance team with PDF attached\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cf304fc3-f19f-4285-9f38-6fe0712ba9bb",
      "name": "Notiz9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -112
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "📄 Generates formatted HTML report\n"
      },
      "typeVersion": 1
    },
    {
      "id": "dcf2d893-d7a3-40d6-b39f-48d4692cfc23",
      "name": "Notiz10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -432
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "📑 Converts to professional PDF\n"
      },
      "typeVersion": 1
    },
    {
      "id": "67edc76d-3a9a-4e0a-b7d0-9286151e0629",
      "name": "Notiz11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -112
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "💬 Posts summary to Slack"
      },
      "typeVersion": 1
    },
    {
      "id": "d62323f3-c4ca-4580-86a8-61e2a3dcd5e4",
      "name": "Notiz12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -112
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "☁️ Backs up to Google Drive\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "110ed3b3-c47a-4dc3-9557-960a5948cb40",
  "connections": {
    "a5ac7f5d-5c0e-4aa1-a0ea-924aba958ce2": {
      "main": [
        [
          {
            "node": "cf3299a5-67c9-4970-948e-7613f2dfbd07",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "906bf96e-e9fd-480d-850a-ea04667fba76": {
      "main": [
        [
          {
            "node": "13babc7a-eaef-4484-b2a7-a9d98a7c7936",
            "type": "main",
            "index": 0
          },
          {
            "node": "8c87a527-7f6a-4806-80a5-63cb76a755f4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f6b32c5f-8fcf-4896-9c45-53147eed217d": {
      "main": [
        [
          {
            "node": "3b4e8178-5819-4299-a509-429cbdc09e7e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "81ba9fe8-c157-4f81-a1ad-b5704b4b52c8": {
      "main": [
        [
          {
            "node": "0bcbdaaf-97ff-440a-b3d9-5f6978183791",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "13babc7a-eaef-4484-b2a7-a9d98a7c7936": {
      "main": [
        [
          {
            "node": "4a48cf32-59d4-4048-ae7c-0134ee0f2663",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a48cf32-59d4-4048-ae7c-0134ee0f2663": {
      "main": [
        [
          {
            "node": "a5ac7f5d-5c0e-4aa1-a0ea-924aba958ce2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8c87a527-7f6a-4806-80a5-63cb76a755f4": {
      "main": [
        [
          {
            "node": "47798a32-d2a6-4a71-b0fb-74c382417b45",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "47798a32-d2a6-4a71-b0fb-74c382417b45": {
      "main": [
        [
          {
            "node": "a5ac7f5d-5c0e-4aa1-a0ea-924aba958ce2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "90770fcd-1953-46f9-872b-1da928eca718": {
      "main": [
        [
          {
            "node": "f6b32c5f-8fcf-4896-9c45-53147eed217d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "10370491-a9fb-4325-b6f0-4d81f071393a": {
      "main": [
        [
          {
            "node": "81ba9fe8-c157-4f81-a1ad-b5704b4b52c8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cf3299a5-67c9-4970-948e-7613f2dfbd07": {
      "main": [
        [
          {
            "node": "10370491-a9fb-4325-b6f0-4d81f071393a",
            "type": "main",
            "index": 0
          },
          {
            "node": "90770fcd-1953-46f9-872b-1da928eca718",
            "type": "main",
            "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 - Dokumentenextraktion

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 Nodes25
Kategorie1
Node-Typen10
Schwierigkeitsbeschreibung

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

Autor
Oneclick AI Squad

Oneclick AI Squad

@oneclick-ai

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34