Docs/Integrations/n8n/Templates/Generate XRechnung from Google Sheets

Generate XRechnung from Google Sheets

Create compliant XRechnung e-invoices directly from a Google Sheets spreadsheet and automatically email them to customers.

Google SheetsInvoice-api.xhubGmail10 min setup

How This Workflow Works

Generate XRechnung from Google Sheets — Workflow Diagram
  1. 1

    Reads pending invoices from a Google Sheets spreadsheet

  2. 2

    Maps spreadsheet columns to the e-invoice JSON format

  3. 3

    Generates compliant XRechnung (EN 16931) via the API

  4. 4

    Emails the XRechnung XML as attachment to the customer

  5. 5

    Updates the status in Google Sheets to 'sent'

Why This Matters

Most small businesses already track invoices in spreadsheets. This workflow turns your existing Google Sheet into an e-invoice generator — no ERP system needed.

Google Sheets Structure

ColumnTypeExampleDescription
invoiceNumberTextRE-2025-001Unique invoice number
invoiceDateDate2025-01-15Invoice issue date (YYYY-MM-DD)
dueDateDate2025-02-15Payment due date (optional, default: +30 days)
sellerNameTextMeine Firma GmbHSeller company name
sellerVatIdTextDE123456789Seller VAT ID
buyerNameTextKunde AGBuyer company name
buyerVatIdTextDE987654321Buyer VAT ID
buyerEmailTextrechnung@kunde.deBuyer email (XRechnung is sent here)
itemDescriptionTextConsulting JanuaryLine item description
itemQuantityNumber10Quantity
itemUnitPriceNumber150.00Unit price (net)
itemVatRateNumber19VAT rate in percent
subtotalNumber1500.00Net total amount
totalNumber1785.00Gross total amount
statusTextpendingOnly rows with 'pending' are processed

Setup Steps

  1. 1

    Create a Google Sheet with 'Invoices' tab and column headers

  2. 2

    Import example CSV or enter your own data

  3. 3

    Enter the Spreadsheet ID in both Google Sheets nodes

  4. 4

    Install the community node and set up credentials

  5. 5

    Execute workflow — only rows with status=pending are processed

Preview (truncated)

json
1{
2 "name": "Generate XRechnung from Google Sheets",
3 "nodes": [
4 {
5 "id": "trigger-sheets-gen",
6 "name": "Manual Trigger",
7 "type": "n8n-nodes-base.manualTrigger",
8 "typeVersion": 1,
9 "position": [400, 600],
10 "parameters": {}
11 },
12 {
13 "id": "read-sheets-gen",
14 "name": "Google Sheets: Read Invoices",
15 "type": "n8n-nodes-base.googleSheets",
16 "typeVersion": 4.7,
17 "position": [640, 600],
18 "parameters": {
19 "operation": "read",
20 "documentId": {
21 "__rl": true,
22 "value": "your-spreadsheet-id",
23 "mode": "id"
24 },
25 "sheetName": {
26 "__rl": true,
27 "value": "Invoices",
28 "mode": "name"
29 },
30 "range": "A:Z",
31 // ... (truncated)

Use Cases

Small Business

Generate XRechnung from your existing invoice spreadsheet

Freelancers

Create compliant e-invoices for public sector clients (B2G)

E-Invoice Mandate 2025

Be ready for the German B2B e-invoicing mandate

Batch Sending

Process multiple invoices at once

Get Started Now

Import the workflow into your n8n instance and get started in minutes.