Skip to main content

Swiss QR Bill from an Airtable Base: Generate, Attach and Email It in Make with PDF4me

· 24 min read
SEO and Content Writer

PDF4me Create Swiss QR-bill is a Make module that turns payment details into a Swiss QR bill image. Pointed at an Airtable base, it reads the creditor, the debtor and the QR-IBAN from a row, puts the finished slip back on that same record as an attachment, and emails it to the debtor.

Ask whether Airtable can produce an invoice and the honest answer is no, not a payable one. It holds the creditor, the debtor, the amount and the QR-IBAN perfectly well, but a Swiss QR bill is a specification: a defined layout, a scissor line, a reference in the right format, and a QR code a bank app will actually accept. The usual advice is to leave Airtable, open your bank's portal and retype the row. This scenario does the opposite, and the data never leaves the base it already lives in.

The scenario at a glance
1. Watch records
Airtable. Picks up rows in Swiss QR Requests where Status is New.
2. Create Swiss QR-bill
PDF4me. Builds the slip from the creditor, debtor and QR-IBAN on the row.
3. Upload an attachment
Airtable. Puts the PNG back on the same record, in the Document field.
4. Update a record
Airtable. Writes the result back so the row says what happened.
5. Send an email
Gmail. Sends the slip to the address on the row.
The short version

Someone adds a row to an Airtable table with a creditor, a debtor, an amount and a QR-IBAN, and sets Status to New. Make picks it up, PDF4me renders the Swiss QR bill, and the image goes straight back onto that record as an attachment. The debtor gets it by email. Five modules, no bank portal, and the invoice data stays in the base your team already edits.

Why-Based Q&A​

Why keep the payment data in Airtable? Because for a lot of small finance teams it is already there, next to the client record and the project it belongs to. Moving it into an accounting package to produce one payment slip means maintaining the same customer in two systems. A row is also something a non-technical colleague can fix without asking anyone.

Why put the image back on the record instead of into a folder? Because a file in a folder loses its connection to the thing that produced it. Attaching the PNG to the Document field on the same row means the slip, the amount it was built from and the status all travel together, and anyone looking at the row can see the artefact without going anywhere else.

Why filter the trigger on Status rather than watching everything? Because Watch records would otherwise fire on every row you ever add, including half-finished ones. The formula on the trigger makes New an explicit instruction: the row is complete and ready. It also gives you a safe way to re-issue a slip, which is to set the status back.

Why does the QR-IBAN get cleaned before it is sent? Because people type IBANs with spaces, and the specification wants the account without them. The IBAN field runs the column through a replace that strips spaces, which is the difference between a slip a bank app reads and one it rejects. The same thinking applies to the amount, which is formatted to two decimals rather than passed raw.


What You'll Get​

Input: an Airtable row with a creditor, a debtor, an amount, a currency and a QR-IBAN, with Status set to New. Output: a Swiss QR bill PNG attached to that same record, and an email to the debtor with the slip attached.

Airtable base PDF4me Live Automations with the Swiss QR Requests table open, showing rows INV-1001 to INV-1004 with CreditorName Muster AG, Bahnhofstrasse 1, 8001 Zuerich CH, a QRIBAN beginning CH4431999123, a structured Reference, DebtorName Test Kunde AG at Seestrasse 10 in 8002 Zuerich, Amount 100.50, Currency CHF, a Message column reading Rechnung INV-1001 and a Status column reading Generated

One row per bill. Every column here maps onto a field the Swiss QR specification asks for.

The generated Swiss QR bill for INV-1003: a Receipt half and a Payment part separated by a scissor line, both showing account CH44 3199 9123 0008 8901 2 payable to Muster AG at Bahnhofstrasse 1, 8001 Zuerich, reference 21 00000 00003 13947 14300 09017, additional information Rechnung INV-1003, payable by Test Kunde AG at Seestrasse 10, 8002 Zuerich, currency CHF and amount 100.50, with the QR code in the payment part

Receipt on the left, payment part on the right, scissor line between them.

Gmail showing the received message with subject Your Swiss QR bill INV-1003, the body reading Hello Test Kunde AG, Please find your Swiss QR bill INV-1003 attached, Amount 100.5 CHF, and one attachment previewing the QR bill

What the debtor receives, built entirely from the row.


What You Need​

  • A Make account. Open Make. Five modules on standard apps, no premium tier needed.
  • PDF4me API key. Get your API key. One PDF4me connection covers the whole scenario.
  • An Airtable base. The captured base is called PDF4me Live Automations with a table named Swiss QR Requests. It needs the creditor block, the debtor block, QRIBAN, Reference, Amount, Currency, Message, Email, a Status field, and an attachment field called Document for the finished slip.
  • A Gmail account for delivery, connected to Make.
  • A real QR-IBAN from your bank. This is not an ordinary IBAN: Swiss QR-IBANs sit in a dedicated institution range and are what make a structured QR reference work. Your bank issues one on request.

The Scenario at a Glance​

  1. Watch records (Airtable) picks up new rows in Swiss QR Requests.
  2. Create Swiss QR-bill (PDF4me) renders the slip as a PNG.
  3. Upload an attachment (Airtable) attaches it to the Document field on the same row.
  4. Update a record (Airtable) writes the outcome back to the row.
  5. Send an email (Gmail) delivers the slip to the debtor.

Complete scenario overview​

The Make scenario canvas showing five connected modules in order: Airtable Watch records with a clock icon, PDF4me Create Swiss QR-bill, Airtable Upload an attachment, Airtable Update a record, and Gmail Send an email, each marked with a green tick and one operation

Three Airtable modules, one PDF4me module and one Gmail module. The base is both the source and the destination.


Step 1: How do you trigger a scenario from an Airtable row?​

Flow so far: nothing yet, this is the trigger.

A row marked ready is the request, so that is what Make watches.

  1. Add Airtable > Watch records as the trigger.
  2. Configure:
    • Base: PDF4me Live Automations
    • Table: Swiss QR Requests
    • Trigger field: Created
    • Label field: Title
    • Limit: 10
    • Formula: {Status}='New'

Watch records configuration​

Make Airtable Watch records module with Base set to PDF4me Live Automations, Table Swiss QR Requests, Trigger field Created, Label field Title, Limit 10, View left empty and Formula braces Status equals New

The Formula is what stops the scenario firing on half-finished rows.

Tip. Trigger field must be a Created Time or Last Modified Time field, and Make says so in the module. Without one the trigger cannot sort records and will behave unpredictably. If your table has no such field, add one before you build the rest of this.


Step 2: How do you turn a row into a Swiss QR bill?​

Flow so far: the Airtable trigger.

This is the module that produces the slip. Most of its fields are a direct mapping from the row; two of them need an expression.

  1. Add PDF4me > Create Swiss QR-bill.
  2. Configure the settings that shape the output:
    • Format Type: PNG
    • Reference Type: QRR
    • Language: English
    • Separator Line: Line With Scissor
    • Creditor Address Type: S
  3. Map the payment data from the trigger:
    • Amount: formatNumber(1.Amount; 2; "."; "")
    • IBAN: replace(1.QRIBAN; " "; "")
    • Creditor Name, street, postal code, city and country from the Creditor columns
    • Debtor name and address from the Debtor columns, and the Reference from the row

Create Swiss QR-bill configuration​

Make PDF4me Create Swiss QR-bill module showing Format Type PNG, a Currency dropdown, Reference Type QRR, Language English, Separator Line Line With Scissor, Amount set to a formatNumber expression over the Amount column, IBAN set to a replace expression over the QRIBAN column, Creditor Address Type S and the start of the Creditor Name field

The panel is scrolled here. Below Creditor Name sit the rest of the creditor address and the whole debtor block.

What each setting decides​

FieldValue hereWhat it controls
Format TypePNGAn image rather than a PDF, which is what lets it attach to an Airtable cell and preview inline
Reference TypeQRRA structured QR reference, which is the type that needs a QR-IBAN. The alternatives are SCOR and NON
Separator LineLine With ScissorDraws the cut line between the receipt and the payment part
Creditor Address TypeSStructured address, meaning street, postal code and town in separate fields rather than free text
AmountformatNumber(...)Two decimals and no thousands separator, which is what the specification expects
IBANreplace(...)Strips the spaces people type into IBANs before the account is validated

Tip. Reference Type and the account have to agree. QRR requires a QR-IBAN and a 27 digit QR reference; an ordinary IBAN with a QRR reference is the single most common reason a generated slip fails validation. If you do not have a QR-IBAN yet, use NON and leave the reference empty until your bank issues one.


Step 3: How do you put the slip back on the record?​

Flow so far: the trigger plus the PDF4me module.

The row asked for the bill, so the row should carry it.

  1. Add Airtable > Upload an attachment.
  2. Configure:
    • Base and Table: as in step 1
    • Record ID: the id from the trigger
    • Attachment field: Document
    • File: the output of PDF4me - Create Swiss QR-bill
    • File name: QRBill_ plus the Title from the row plus .png
    • Data: the Document output of module 2
    • Content type: PNG image

Upload an attachment configuration​

Make Airtable Upload an attachment module with Base PDF4me Live Automations, Table Swiss QR Requests, Record ID mapped from the trigger id, Attachment field Document, File set to the PDF4me Create Swiss QR-bill output, File name QRBill_ plus the Title token plus .png, Data set to the module 2 Document output and Content type PNG image

Record ID comes from the trigger, so the slip lands on the row that asked for it.


Step 4: How do you record the outcome on the row?​

Flow so far: everything through the attachment upload.

Attaching the file is not the same as saying the work is done. A separate update writes the outcome.

  1. Add Airtable > Update a record.
  2. Configure:
    • Base and Table: as in step 1
    • Record ID: the id from the trigger
    • Record: fill in the fields you want written back. Status is the important one, because it is what the trigger formula reads, and an OutputLink column is a convenient place for a shareable URL.

Update a record configuration​

Make Airtable Update a record module with Base PDF4me Live Automations, Table Swiss QR Requests, Record ID mapped from the trigger, and the Record section listing the table fields Title, CreditorName, CreditorStreet, CreditorPostalCode, CreditorCity, CreditorCountry, QRIBAN, Reference, DebtorName, DebtorStreet and DebtorPostalCode as empty inputs

The panel lists every column in the table. Leave blank anything you do not want overwritten.

Tip. Leave every field blank except the ones you actually intend to change. A mapped-but-empty field will clear the cell, which is an easy way to wipe a creditor address on a scenario that otherwise looks like it worked. In the captured run the panel is scrolled and the visible fields are all empty, so set Status deliberately rather than copying what you see.


Step 5: How do you send the bill to the debtor?​

Flow so far: everything through the record update.

The last module delivers the slip to the address on the row.

  1. Add Gmail > Send an email.
  2. Configure:
    • To: the Email column from the trigger
    • Subject: Your Swiss QR bill plus the Title
    • Body type: Raw HTML
    • Content: a short HTML body naming the debtor, the bill and the amount
  3. Add the attachment:
    • File: the PDF4me - Create Swiss QR-bill output
    • File name: QRBill_ plus the Title plus .png
    • Data: the Document output of module 2

Send an email configuration​

Make Gmail Send an email module with the recipient mapped from the Email column, Subject Your Swiss QR bill plus the Title token, Body type Raw HTML, an HTML content block greeting the debtor and stating the amount and currency, and one attachment taking the PDF4me module output with the file name QRBill_ plus Title plus .png

The attachment takes its bytes from module 2, so Airtable is never read back.

Tip. Watch the amount in the email body. The captured message reads Amount: 100.5 CHF while the slip itself reads 100.50, because the body maps the raw column while the QR bill goes through formatNumber. Use the same expression in both places unless you enjoy explaining the difference to a customer.


Run the Scenario and Verify​

  1. Save the scenario and run it once.
  2. Add a row to Swiss QR Requests with a creditor, a debtor, an amount, a QR-IBAN and Status New.
  3. Watch the five modules light up. Each should report one operation.
  4. Open the row: the Document field should hold a PNG named after the Title.
  5. Open the attachment and check both halves. The receipt and the payment part must show the same account, reference and amount, with the scissor line between them.
  6. Check the inbox on the Email column for the message and its attachment.

In the captured run, row INV-1003 produced a slip payable to Muster AG at Bahnhofstrasse 1, 8001 Zuerich, on account CH44 3199 9123 0008 8901 2, with reference 21 00000 00003 13947 14300 09017, payable by Test Kunde AG at Seestrasse 10, 8002 Zuerich, for CHF 100.50.

What did you actually build? A payment slip generator that lives inside the database your team already uses. Nobody logs into a bank portal, nobody retypes an IBAN, and the slip ends up attached to the record that produced it, so a month later you can still see which row made which bill.


Common Variations You Can Add Without Rebuilding​

Put the slip on an invoice page
Switch Format Type to PDF and add a merge step to lay the bill under your invoice. The overlay merge scenario covers that pattern in detail.
Invoice in euros as well as francs
The specification permits CHF and EUR and nothing else. Map the Currency column into the Currency field instead of fixing it, and add a validation view in Airtable that flags anything else.
Send reminders from the same base
Add a Paid date column and a scheduled scenario that re-sends the existing attachment for anything unpaid after thirty days. The slip is already on the record, so no regeneration is needed.
Bill for more than one entity
The creditor block already comes from columns, so one base can issue for two companies. Give each its own QR-IBAN in the row and nothing else changes.

How this compares to the other ways of producing a Swiss QR bill​

Each row describes the alternative. The last row is this scenario.

ComparisonWho runs itWhere the data comes fromWhat you maintain
Bank portal vs this scenarioA person, one slip at a timeRetyped by handNothing, but every bill costs someone minutes
Accounting package with Swiss QR export vs this scenarioFinance, inside that productThe product's own ledgerA subscription, and a second home for your customers
Developer library vs this scenarioA developer, inside an applicationYour database, through codeThe code, the spec updates and the releases
This scenarioAnyone who can add an Airtable rowThe base the team already keepsFive modules and a QR-IBAN

Common questions​

What is a Swiss QR bill?​

A Swiss QR bill is the payment slip that replaced the old orange and red payment forms in Switzerland. It carries a QR code holding the creditor, the debtor, the amount and the reference, so the payer scans it in their banking app instead of typing anything.

It comes in two halves, a receipt and a payment part, separated by a cut line, and the layout is fixed by the Swiss implementation guidelines published by SIX. That is why generating one is a specification problem rather than a design problem.

What is the QR-IBAN number in Switzerland?​

A QR-IBAN is a second account number your bank issues alongside your ordinary IBAN, recognisable because its institution identifier falls in a reserved range. It exists so the bank can tell that an incoming payment carries a structured QR reference and match it to an invoice automatically.

The practical rule for this scenario: if you set Reference Type to QRR you must use the QR-IBAN, not your normal one. Mixing them is what produces a slip that looks right and will not scan.

How to pay a Swiss QR bill?​

The payer opens their banking app, scans the QR code in the payment part, checks the amount on screen and confirms. Nothing is typed, which is the entire point of the format.

A slip can also be paid at a post office counter or entered manually from the printed fields, which is why the payment part repeats the account, reference and amount as readable text next to the code.

Can Airtable create invoices?​

Not on its own. Airtable stores the data and can lay it out in an interface or a printable view, but it has no way to produce a document that satisfies a payment standard, and no way to render a scannable QR code to that specification.

What it is good at is being the source of truth. This scenario keeps that division: Airtable holds the row, PDF4me produces the compliant artefact, and the result comes back to the row as an attachment.


Troubleshooting​

The bank app will not scan the code

Check the account and the reference type together. A QRR reference needs a QR-IBAN; an ordinary IBAN needs SCOR or NON. Then check the IBAN actually reached the module without spaces, which is what the replace expression is there for.

The scenario fires on rows that are not ready

The trigger Formula is missing or does not match. {Status}='New' is case sensitive and the field has to be a single select or text field whose value is exactly New. Also confirm Trigger field is a Created Time or Last Modified Time field.

The attachment never appears on the record

Check Record ID in module 3. It must come from the trigger, not from the PDF4me module. Then check Content type matches Format Type: a PNG from module 2 uploaded as a PDF file will attach and then refuse to preview.

A column got wiped after a run

Module 4 lists every field in the table, and a field that is mapped but empty clears the cell. Leave untouched anything you are not deliberately writing.


Next Steps​

The database you already keep is usually closer to a finished payment document than it looks. It just needs something that speaks the specification.