Skip to main content

Create Swiss QR Bill in n8n: Two Complete Workflows (With and Without an Existing PDF)

· 25 min read
SEO and Content Writer

Every Swiss invoice must carry a Swiss QR Bill (also called Swiss QR payment slip) so that banks and accounting software can scan and process the payment automatically. n8n and PDF4me make that generation fully automatic. This guide walks through two production-ready workflows: one that overlays the QR slip onto an existing PDF already in Dropbox, and one that generates a standalone QR Bill document from payment data alone with no background PDF required. Both run in under 10 minutes to set up.

Two workflows covered in this guide
Workflow A (4 nodes)
Trigger → Download PDF → Create SwissQR (Binary Data) → Upload. Output: 602 kB. Best when you already have a PDF invoice in Dropbox.
Workflow B (3 nodes)
Trigger → Create SwissQR (None) → Upload. Output: 132 kB. Best when you only have payment data and need a standalone QR slip.
The short version

Workflow A: Trigger fires. Dropbox Download retrieves Test Debt AG.pdf (344 kB). PDF4me Create SwissQR Bill runs with Input Data Type: Binary Data, Amount 1000, CHF, IBAN CH0200700110003765824, Creditor: Test AG. Output is swissqr_bill.pdf at 602 kB. Dropbox Upload saves the result.

Workflow B: Trigger fires. PDF4me Create SwissQR Bill runs with Input Data Type: None, same payment fields plus a full structured creditor address. Output is n8n_swissqr02.pdf at 132 kB. Dropbox Upload saves the result.

The one setting that determines everything

The Input Data Type field in the PDF4me node is the only structural difference between the two workflows. Set it to Binary Data when you have an existing PDF (Workflow A). Set it to None when you want a standalone QR slip from payment data alone (Workflow B). Every other parameter, amount, IBAN, currency, creditor name, is identical between them.

What you are building

Every Swiss invoice issued after the 2020 migration from the old payment slip standard must include a Swiss QR Bill: a standardised payment section with a QR code that encodes IBAN, amount, currency, creditor, and optional debtor data in ISO 20022 format. Banks and accounting software scan it without any manual re-entry. The two n8n workflows in this guide automate that generation step so the QR Bill is produced and saved to Dropbox without touching it manually.


At a glance

Workflow A: 4 steps

1Trigger
2Download PDF from Dropbox
3Create SwissQR (Binary Data)
4Upload result to Dropbox
n8n workflow A overview: When clicking Execute workflow trigger, Dropbox Download a file node (download: file), PDF4me Create SwissQR bill node (invoice / Create Swiss QR Bill), Dropbox Upload a file node (upload: file). All four nodes connected in sequence with 1 item passing between each.

Workflow A: four nodes, Trigger to Download to Create SwissQR Bill (Binary Data) to Upload.

Workflow B: 3 steps

1Trigger
2Create SwissQR (None)
3Upload result to Dropbox
n8n workflow B overview: When clicking Execute workflow trigger, PDF4me Create SwissQR bill1 node labeled Create Swiss QR without input data (PDF) (invoice / Create Swiss QR Bill), Dropbox Upload a file1 node (upload: file). Three nodes connected in sequence with 1 item passing between each.

Workflow B: three nodes, Trigger to Create SwissQR Bill (Input Data Type None) to Upload. No download step needed.


Why two separate workflows

Keep your existing document

Workflow A keeps your branded invoice template intact. PDF4me appends the Swiss QR slip to the PDF you already have in Dropbox. No reformatting, no redesign, no manual layout work.

Generate from data alone

Workflow B skips the download step entirely. Provide the payment data and PDF4me produces the complete QR payment slip document from scratch. No base PDF required at all.

One setting, two paths

The only structural difference is the Input Data Type field: Binary Data for Workflow A, None for Workflow B. Amount, IBAN, currency, and creditor name are configured the same way in both.


Before you start

Checklist
  • n8n (cloud or self-hosted). Create a new blank workflow.
  • PDF4me API key. First-time setup: Connect PDF4me to n8n.
  • Dropbox OAuth2 credential in n8n with read and write access to your working folder.
  • Workflow A only: An existing PDF stored in Dropbox (e.g. Test Debt AG.pdf in /Blog Data/SwissQR/).
  • Payment data: A valid Swiss IBAN (21 characters, starts with CH), amount, currency (CHF or EUR), creditor name, and for Workflow B the full structured creditor address.

Workflow A: Create Swiss QR Bill on an existing PDF (4 nodes)

Use this when you already have an invoice or document in PDF format. PDF4me overlays the Swiss QR Bill onto the file.

Step 1: Download the existing PDF from Dropbox

Flow so far: Trigger.

  1. Add the Dropbox node.
  2. Credential: Dropbox OAuth2 API.
  3. Resource: File. Operation: Download.
  4. File Path: path to your PDF in Dropbox, e.g. Test Debt AG.pdf (in this example the file lives under /Blog Data/SwissQR/).
  5. Put Output File in Field: data.
  6. Run the step. The OUTPUT panel should show the file name (Test Debt AG.pdf), directory, MIME type application/pdf, and file size 344 kB.
n8n Dropbox Download a file node: Credential Dropbox OAuth2 API, Resource File, Operation Download, File Path Test Debt AG.pdf, Put Output File in Field data. OUTPUT panel shows File Name Test Debt AG.pdf, Directory /Blog Data/SwissQR, File Extension pdf, Mime Type application/pdf, File Size 344 kB.

Dropbox Download configured with File Path Test Debt AG.pdf and Put Output File in Field data. OUTPUT confirms the file downloaded at 344 kB.


Step 2: Create SwissQR Bill on the downloaded PDF

Flow so far: Trigger then Download PDF.

This is the core step. PDF4me reads the downloaded PDF binary and generates a new PDF with the Swiss QR Bill attached.

  1. Add the PDF4me node.
  2. Credential: PDF4ME account.
  3. Resource: Invoice. Invoice Operations: Create SwissQR Bill.
  4. Input Data Type: Binary Data (because you are feeding the PDF from the previous node).
  5. Binary Property: data (matches the field name from the Download step).
  6. File Name: Test Debt AG.pdf (the filename of the source document).
  7. Fill in the payment fields:
    • Amount: 1000
    • Currency: Swiss Franc
    • IBAN: CH0200700110003765824
    • Creditor Name: Test AG
  8. Run the step. The OUTPUT panel shows swissqr_bill.pdf, MIME type application/pdf, file size 602 kB (up from 344 kB because the QR slip pages were embedded).
n8n PDF4me Create SwissQR bill node with INPUT showing Download a file output: File Name Test Debt AG.pdf 344 kB. Parameters: Credential PDF4ME account 3, Resource Invoice, Invoice Operations Create SwissQR Bill, Input Data Type Binary Data, Binary Property data, File Name Test Debt AG.pdf, Amount 1000, Currency Swiss Franc, IBAN CH0200700110003765824, Creditor Name Test AG. OUTPUT: data, File Name swissqr_bill.pdf, File Extension pdf, Mime Type application/pdf, File Size 602 kB.

Create SwissQR Bill with Input Data Type Binary Data. INPUT is the 344 kB PDF from Dropbox. OUTPUT is swissqr_bill.pdf at 602 kB. The size increase confirms the QR slip was embedded.


Step 3: Upload the result to Dropbox

Flow so far: Trigger then Download PDF then Create SwissQR Bill.

  1. Add another Dropbox node.
  2. Credential: Dropbox OAuth2 API.
  3. Resource: File. Operation: Upload.
  4. File Path: destination path in Dropbox, e.g. /Blog Data/SwissQR/swissqr_bill.pdf.
  5. Binary File: On.
  6. Input Binary Field: data (the SwissQR bill output from the previous step).
  7. Run. Dropbox returns upload metadata confirming the file name and path.

Workflow A is complete. Your existing PDF now has a Swiss QR Bill and is saved back to Dropbox.


Workflow B: Create a standalone Swiss QR Bill (3 nodes)

Use this when you do not have a background PDF. PDF4me generates the entire QR payment slip document from the payment details you enter directly in the node.

Step 1: Create SwissQR Bill with no background PDF

Flow so far: Trigger.

Because there is no input PDF, you must fill in the full creditor address so PDF4me can render the complete Swiss QR Bill layout.

  1. Add the PDF4me node.
  2. Credential: PDF4ME account.
  3. Resource: Invoice. Invoice Operations: Create SwissQR Bill.
  4. Input Data Type: None (this tells PDF4me to generate a standalone QR slip with no background PDF).
  5. Fill in the payment fields:
    • Amount: 1000
    • Currency: Swiss Franc
    • IBAN: CH0200700110003765824
    • Creditor Name: Test AG
    • Creditor Address Type: Structured
    • Creditor Street Name or Address Line: Test Strasse
    • Creditor Building Number: 1
    • Creditor Postal Code: 8000
    • Creditor City: Zurich
  6. Run the step. The OUTPUT panel shows swissqr_bill.pdf at 132 kB. Significantly smaller than Workflow A (602 kB) because there is no background PDF, only the QR slip itself.
n8n PDF4me Create SwissQR bill node with Input Data Type None: Credential PDF4ME account 3, Resource Invoice, Invoice Operations Create SwissQR Bill, Input Data Type None, Amount 1000, Currency Swiss Franc, IBAN CH0200700110003765824, Creditor Name Test AG, Creditor Address Type Structured, Creditor Street Name Test Strasse, Creditor Building Number 1, Creditor Postal Code 8000, Creditor City zurich. OUTPUT: data, File Name swissqr_bill.pdf, File Extension pdf, Mime Type application/pdf, File Size 132 kB.

Create SwissQR Bill with Input Data Type None. Full creditor address is required because PDF4me generates the layout from scratch. Output is 132 kB.


Step 2: Upload the standalone QR Bill to Dropbox

Flow so far: Trigger then Create SwissQR Bill.

  1. Add the Dropbox node.
  2. Credential: Dropbox OAuth2 API.
  3. Resource: File. Operation: Upload.
  4. File Path: /n8n_swissqr02.pdf (or any path in your Dropbox).
  5. Binary File: On.
  6. Input Binary Field: data.
  7. Run. The OUTPUT panel confirms the upload: name: n8n_swissqr02.pdf, path_display: /n8n_swissqr02.pdf, size: 132191, and is_downloadable: true.
n8n Dropbox Upload a file1 node: INPUT from Create SwissQR bill1 showing data, File Name swissqr_bill.pdf, File Extension pdf, Mime Type application/pdf, File Size 132 kB. Parameters: Credential Dropbox OAuth2 API, Resource File, Operation Upload, File Path /n8n_swissqr02.pdf, Binary File enabled, Input Binary Field data. OUTPUT: name n8n_swissqr02.pdf, path_lower /n8n_swissqr02.pdf, path_display /n8n_swissqr02.pdf, size 132191, is_downloadable true, client_modified 2026-05-19T09:08:03Z.

Upload confirms: name n8n_swissqr02.pdf, path /n8n_swissqr02.pdf, size 132191 bytes, is_downloadable: true.

Workflow B is complete. The standalone Swiss QR Bill PDF is in Dropbox and ready to email or attach to any outgoing document.


Which workflow should you choose?

Workflow A (with existing PDF)Workflow B (standalone)
Nodes4 (trigger + download + QR + upload)3 (trigger + QR + upload)
Input Data TypeBinary DataNone
Requires existing PDFYes (in Dropbox or another source)No
Output size (example)602 kB132 kB
Full creditor address requiredNo (name only shown in example)Yes (Structured address required for layout)
Best forAdding QR slip to finished invoices or lettersSending a separate payment slip alongside any document

Quick reference: key parameters

NodeKey settingExample value
Dropbox Download (A only)File Path + Put Output File in FieldTest Debt AG.pdf; data
PDF4me Create SwissQR Bill (A)Input Data Type + Binary Property + File NameBinary Data; data; Test Debt AG.pdf
PDF4me Create SwissQR Bill (A and B)Amount + Currency + IBAN + Creditor Name1000; Swiss Franc; CH0200700110003765824; Test AG
PDF4me Create SwissQR Bill (B only)Input Data TypeNone
PDF4me Create SwissQR Bill (B only)Creditor Address Type + Street + Number + Postal Code + CityStructured; Test Strasse; 1; 8000; Zurich
Dropbox Upload (A)File Path + Binary File + Input Binary Field/Blog Data/SwissQR/swissqr_bill.pdf; On; data
Dropbox Upload (B)File Path + Binary File + Input Binary Field/n8n_swissqr02.pdf; On; data

Use cases

Monthly invoice batch: Pull a list of invoice PDFs from Dropbox, loop through them with an n8n Split In Batches node, run Workflow A on each, and save results to a separate folder. One run handles the full month.

Dynamic payment slips from a database: Trigger via Webhook when a payment request is created. Pull the amount, IBAN, and creditor data from a Postgres or Airtable node. Use Workflow B to generate the QR slip and email it via Gmail or Outlook automatically.

Rental and utility bills: Generate standalone QR slips (Workflow B) for rent, utilities, or membership fees each month. Store them in Dropbox and attach to emails sent from n8n. No background PDF needed.

Self-hosted and on-premises: Run n8n on your own infrastructure. Payment data never leaves your network except for the PDF4me API call. Combine with on-prem file shares or NAS instead of Dropbox.


Frequently asked questions

When should I use Workflow A versus Workflow B?

Use Workflow A when you already have a finished PDF document (an invoice, a letter, any file) that you want to add a Swiss QR Bill to. PDF4me appends the QR slip to your existing file. Use Workflow B when you only have payment data (IBAN, amount, creditor details) and want a standalone QR payment slip PDF. Workflow B generates the complete document from scratch with no background PDF required.

What IBAN format does the Swiss QR Bill require?

The IBAN must be a valid Swiss IBAN: exactly 21 characters, starting with CH, followed by two check digits and the 17-digit bank account number. Example: CH0200700110003765824. The Swiss QR standard also supports QR-IBANs (starting with CH and using the range 3000 to 3199 for the bank identifier). An invalid or non-Swiss IBAN causes a validation error from the PDF4me API before any PDF is generated.

Why does Workflow B require a full creditor address but Workflow A does not?

When you use Input Data Type Binary Data (Workflow A), PDF4me appends the QR slip to an existing PDF and the layout has visual context from the source document. The creditor address is optional because the QR slip section is appended, not generated from nothing. When you use Input Data Type None (Workflow B), PDF4me generates the full document layout from scratch. The Swiss QR standard mandates that a standalone QR Bill must include the complete creditor address (street, building number, postal code, city) in the QR code data so that payment systems can process it without any other document context.

Can I use dynamic payment data from a database or form instead of hardcoded values?

Yes. In n8n, any field in the PDF4me node accepts expressions. Map the Amount, IBAN, Creditor Name, and City fields from a previous node such as a Postgres query, an Airtable record, a Google Sheets row, a form submission via the n8n Form Trigger, or a webhook payload. Each execution then generates a unique QR Bill for the current item without any manual editing of the workflow. This is the recommended approach for production billing automation.

The PDF4me node returns an error. What should I check first?

Check three things in order. First, confirm your API key is active at dev.pdf4me.com and your account has credits. Second, for Workflow B, verify that all four creditor address fields (Street, Building Number, Postal Code, City) are filled when Creditor Address Type is Structured. Missing any one causes a validation failure. Third, for Workflow A, confirm the Dropbox Download step completed successfully and that the Binary Property name in the PDF4me node matches the field name set in the Download node (both should be data).


Troubleshooting

Binary field not found when uploading

The Dropbox Upload node looks for a field called data by default. If the Create SwissQR Bill node uses a different Output Binary Field Name, update Input Binary Field in the Upload node to match. Keep the same field name across all nodes to avoid this.

Swiss QR Bill validation error (invalid IBAN or address)

The IBAN must be a valid Swiss IBAN starting with CH (21 characters). For Workflow B, all four creditor address fields (Street, Building Number, Postal Code, City) must be filled when Creditor Address Type is Structured. Missing any one of them causes a validation failure.

Dropbox file not found (Workflow A)

Double-check the File Path in the Download node. Dropbox paths are case-sensitive on some accounts. Open your Dropbox and copy the exact path including folder names and the file extension. If the file is inside a subfolder, the path must include the full folder hierarchy, e.g. /Blog Data/SwissQR/Test Debt AG.pdf.

API key or credit errors from PDF4me

See PDF4me Troubleshooting for steps on verifying your API key, checking remaining credits, and re-connecting the credential in n8n.


What to try next

Optional: swap the trigger. Replace the manual trigger with a Schedule for monthly billing runs, a Webhook to fire on payment request creation, or Dropbox on file created to process new PDFs automatically as they arrive.