Skip to main content

Swiss QR Bill from a SharePoint List: Generate and Email Every QR Bill in Power Automate with PDF4me

· 26 min read
SEO and Content Writer

PDF4me Create SwissQR Bill is a Power Automate action that turns payment details into a QR slip that follows the Swiss Payment Standards. Pointed at a SharePoint list, it renders a QR bill for every request that arrives, files the image in a document library, links it back on the row, and emails it to the debtor.

Search for a Swiss QR bill and you get two kinds of answer. One explains the standard: what the receipt and the payment part must contain, which reference formats exist, why the slip replaced the old payment slips in 2022. The other is a code library, in PHP or JavaScript or Python, for developers who are building invoicing software. Between those two sits the company that simply has to send one. The payment details already live in a list that someone keeps up to date, and what is missing is the part where the slip gets produced, stored and sent. That is this flow, in five actions and without code.

The flow at a glance
1. When an item is created
SharePoint trigger on the list named Swiss QR Requests. One row is one QR bill.
2. Barcode - Create SwissQR Bill
PDF4me Barcode. Output Format Type PNG, QRR reference, debtor and amount from the row.
3. Create file
Saves the slip into the QR Bills library, named after the invoice number.
4. Update item
Stamps Status Generated and the OutputLink back on the same row.
5. Send an email (V2)
Mails the slip to the address on the row, attached as a PNG.
The short version

Someone adds a row to a SharePoint list with the debtor, the amount, the currency and a message. About thirty-five seconds later the QR bill exists as a PNG in a document library, the row carries a link to it and the status Generated, and the debtor has it in their inbox ready to scan. Five actions, standard connectors, and nobody opens a banking portal.

Why-Based Q&A​

Why keep the payment details in a SharePoint list? Because the people who know them are not the people who would run a script. A list row is a form anyone in finance can fill in, it keeps a history of what was requested, and its columns are what drive the slip: the amount, the currency, the message on the payment part, even the language the labels are printed in.

Why produce a PNG instead of a PDF? Because there is no invoice to attach the slip to. With Output Format Type set to PDF, the action expects a source document and appends the payment part to it. With PNG it returns the slip on its own, which is what you want when the QR bill is the whole message: it previews in SharePoint, and it opens in the email without a download.

Why the QRR reference type? Because it is the reference that reconciles the payment automatically. QRR is the Swiss 27-digit numeric reference with a check digit, and it only works with a QR-IBAN, an IBAN whose institution number falls in the QR range. When the debtor scans and pays, the reference comes back with the credit and the invoice closes itself. SCOR and NON are the alternatives when you do not need that.

Why write the link back to the row? Because the request should be able to answer the question "did this go out?" on its own. The flow sets the status to Generated and stores a link to the image, so the list is both the queue and the record, and nobody has to go looking in the library to find out what happened.


What You'll Get​

Input: a row in a SharePoint list holding the invoice number, the debtor's name and address, the amount, the currency, the message, the language and the email address. Output: a Swiss QR bill PNG in the QR Bills library, the same row updated with the status and a link, and an email to the debtor with the slip attached.

SharePoint list Swiss QR Requests with columns Title, InvoiceNumber, DebtorName, Street, BuildingNo, PostalCode, City, Amount, Currency, Language, Message, Email, Status and OutputLink, holding one row: Test QR 001, INV-1001, Max Muster, Musterstrasse, 1, 8000, Zurich, 1,005.00, CHF, English, Test invoice INV-1001, with status Generated and a link to the generated PNG

One row is one QR bill. Status and OutputLink are written by the flow, not by the person filling in the request.

SharePoint QR Bills library showing SwissQR_INV-1001.png with a preview of the Swiss QR bill: receipt and payment part, account CH44 3199 9123 0008 8901 2 for Var Schneider AG in Biel, reference 21 00000 00003 13947 14300 09017, payable by Max Muster in Zurich, CHF 1 005.00

The slip in the library, named after the invoice number.

Outlook showing the email Your Swiss QR bill from the Pdf4me Flow account with SwissQR_INV-1001.png attached and open in the preview pane, and the body telling the recipient to scan the QR code with their banking app to pay

The same slip in the debtor's inbox, ready to scan.


What You Need​

  • Power Automate. Open Power Automate. An automated cloud flow on standard connectors. SharePoint, Office 365 Outlook and PDF4me need no premium plan.
  • PDF4me API key. Get your API key. This flow uses one PDF4me connection, PDF4me Barcode.
  • A SharePoint list for the requests. The captured list is called Swiss QR Requests, with columns InvoiceNumber, DebtorName, Street, BuildingNo, PostalCode, City, Amount, Currency, Language, Message and Email, plus a Status choice column and an OutputLink column the flow writes to.
  • A document library for the slips. The captured flow writes into a library called QR Bills.
  • Your creditor details and a QR-IBAN. The account the money goes to, with its address. The QR-IBAN is required for QRR references, and the Swiss Payment Standards spec limits the account to Swiss or Liechtenstein issuers and the currency to CHF or EUR.

The Flow at a Glance​

  1. When an item is created (SharePoint) watches the Swiss QR Requests list.
  2. Barcode - Create SwissQR Bill (PDF4me Barcode) renders the slip as a PNG.
  3. Create file (SharePoint) saves it into /QR Bills as SwissQR_<invoice number>.png.
  4. Update item (SharePoint) sets Status to Generated and fills OutputLink.
  5. Send an email (V2) (Office 365 Outlook) sends the slip to the debtor.

Complete flow overview​

Power Automate run history showing five actions succeeding in order: When an item is created at 0.3 seconds, Barcode Create SwissQR Bill at 31 seconds, Create file at 2 seconds, Update item at 0.8 seconds and Send an email V2 at 0.4 seconds

Rendering the slip is the whole cost of this flow: 31 of the 35 seconds. Everything after it is SharePoint and Outlook moving a small PNG around.


Step 1: How do you trigger a QR bill when a request arrives?​

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

The list is the request queue, so creating a row is the signal.

  1. Create an Automated cloud flow and pick SharePoint > When an item is created.
  2. Configure:
    • Site Address: PDF4me Support - https://ynoox1.sharepoint.com/sites/PDF4meSupport
    • List Name: Swiss QR Requests

When an item is created configuration​

SharePoint When an item is created trigger with Site Address PDF4me Support at ynoox1.sharepoint.com/sites/PDF4meSupport and List Name Swiss QR Requests, with no advanced parameters set

Every column on the new row is available as a token in the four actions that follow.


Step 2: What goes into the Create SwissQR Bill action?​

Flow so far: the SharePoint trigger.

This is the action that does the work, and it has more fields than the rest of the flow put together. They split into two groups: the creditor side, which is your own account and address and never changes, and the debtor side, which comes from the row.

  1. Add Barcode - Create SwissQR Bill from the PDF4me Barcode connection.
  2. Configure the output and the creditor (static values):
    • Output Format Type: PNG
    • IBAN: CH4431999123000889012
    • Creditor Name: Var Schneider AG
    • Creditor Address Type: S
    • Creditor street, building, PostalCode, City: Bahnhofstrasse, 23, 2501, Biel
    • Reference Type: QRR
    • Seperator Line: LineWithScissor
  3. Map the debtor and the payment from the trigger:
    • Amount, Currency, Ultimate Debtor Name, Street, Building Number, PostalCode, City, Unstructured Message and Language Type all take their value from the matching list column.
    • Ultimate Debtor AddressType: S
    • Billing Info, AV1 Parameters and Av2 Parameters: left empty

Barcode - Create SwissQR Bill configuration​

PDF4me Barcode Create SwissQR Bill action with Output Format Type PNG, IBAN CH4431999123000889012, Amount from the list, creditor Var Schneider AG at Bahnhofstrasse 23, 2501 Biel, address type S, currency and ultimate debtor name, street, building number, postal code and city mapped from list columns, Reference Type QRR with a 27 digit reference, unstructured message and language type from the list, and Seperator Line set to LineWithScissor

Address Type S means structured: separate fields for street, building number, postal code and city. K would take two free-text lines instead.

Where each field comes from​

FieldValue in the captured flowSource
Output Format TypePNGStatic, the slip on its own
IBANCH4431999123000889012Static, your QR-IBAN
Creditor blockVar Schneider AG, Bahnhofstrasse 23, 2501 BielStatic, your own address
Amount, Currency1,005.00, CHFAmount and Currency columns
Ultimate Debtor blockMax Muster, Musterstrasse 1, 8000 ZurichDebtorName, Street, BuildingNo, PostalCode, City
Reference Type, ReferenceQRR, 210000000003139471430009017Static in this flow, see the warning below
Unstructured MessageTest invoice INV-1001Message column
Language TypeEnglishLanguage column
Seperator LineLineWithScissorStatic

Give every bill its own reference before you go live. The captured flow sends the same 27-digit QRR reference on every slip, which is fine for a test and wrong in production: the reference is what tells your bank which invoice a payment belongs to, so one shared value makes every incoming payment look identical. Generate it per invoice, in the list or in the flow, and keep the mod-10 check digit correct. The reference is also the one field a debtor never has to type, so there is no reason to keep it short or memorable.

Tip. QRR only works with a QR-IBAN, which is an IBAN whose institution number sits in the QR range. The account used here, CH4431999123000889012, has 31999 in those positions, so it qualifies. If your bank gave you an ordinary IBAN, use SCOR or NON as the Reference Type instead, or ask the bank for the QR-IBAN that belongs to the account.


Step 3: Where does the QR bill image get saved?​

Flow so far: the trigger plus Create SwissQR Bill.

The action returns the image, and SharePoint is where it goes to live.

  1. Add SharePoint > Create file.
  2. Configure:
    • Site Address: PDF4me Support - https://ynoox1.sharepoint.com/sites/PDF4meSupport
    • Folder Path: /QR Bills
    • File Name: SwissQR_ followed by the InvoiceNumber token and .png
    • File Content: the Body token from Barcode - Create SwissQR Bill

Create file configuration​

SharePoint Create file action with Site Address PDF4me Support, Folder Path /QR Bills, File Name SwissQR_ followed by the InvoiceNumber token and .png, and File Content set to the Body token from the PDF4me barcode action

Naming the file after the invoice number is what makes the library searchable later. For INV-1001 this writes SwissQR_INV-1001.png.


Step 4: How do you record the result on the request?​

Flow so far: the trigger, Create SwissQR Bill and Create file.

The row that asked for the bill is also the right place to record that it exists.

  1. Add SharePoint > Update item.
  2. Configure:
    • Site Address: PDF4me Support - https://ynoox1.sharepoint.com/sites/PDF4meSupport
    • List Name: Swiss QR Requests
    • Id: the ID token from the trigger
    • Title: the Title token from the trigger
    • Status Value (advanced): Generated
    • OutputLink (advanced): the site URL followed by the Path token from Create file

Update item configuration​

SharePoint Update item action with Site Address PDF4me Support, List Name Swiss QR Requests, Id and Title taken from the trigger, and advanced parameters Status Value set to Generated and OutputLink built from the site URL plus the Path token from Create file

Title is passed straight back from the trigger. The connector treats it as required, and feeding it the current value is what keeps it unchanged.

Tip. Open the stored link once after your first run. The library here is called QR Bills, with a space, so the path that Create file returns contains that space and a browser has to encode it. If the link does not open cleanly, wrap the expression in encodeUriComponent or rename the library to something without spaces.


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

Flow so far: everything through Update item.

The last action turns the slip into something the debtor can act on, which is the whole point of a QR bill.

  1. Add Office 365 Outlook > Send an email (V2).
  2. Configure:
    • To: the Email token from the trigger
    • Subject: Your Swiss QR bill
    • Body: Hello, please find your Swiss QR bill attached. Scan the QR code with your banking app to pay.
  3. Open Advanced parameters and add an attachment:
    • Attachments Name - 1: the Name token from Create file
    • Attachments Content - 1: the File Content token from Barcode - Create SwissQR Bill
    • Importance: Normal

Send an email (V2) configuration​

Office 365 Outlook Send an email V2 action with To taken from the Email column, subject Your Swiss QR bill, a body asking the recipient to scan the QR code with their banking app, an attachment whose name comes from the Create file Name token and whose content comes from the PDF4me File Content token, and Importance Normal

The attachment takes its name from the file that was just created and its bytes from the action that produced them, so nothing has to be read back out of SharePoint.


Run the Flow and Verify​

  1. Save the flow.
  2. Add a row to Swiss QR Requests with a debtor, an amount, a currency, a language and an email address you can check.
  3. Open the run history. All five actions should be green, with Create SwissQR Bill taking most of the time.
  4. Open the QR Bills library and check the PNG is there and previews as a payment slip.
  5. Go back to the row: Status should read Generated and OutputLink should open the image.
  6. Open the email and scan the QR code with a banking app to confirm the amount, the account and the reference come back the way you entered them.

In the captured run the whole thing took about thirty-five seconds, of which thirty-one were the slip itself. The output, SwissQR_INV-1001.png, carries the receipt on the left and the payment part on the right: account CH44 3199 9123 0008 8901 2 for Var Schneider AG in Biel, reference 21 00000 00003 13947 14300 09017, payable by Max Muster in Zurich, CHF 1 005.00, with Test invoice INV-1001 in the additional information block.

What did you actually build? A QR bill desk that runs on a list. The finance team enters what they already know, the slip comes back in the format Swiss banks expect, it is filed where the rest of the paperwork lives, and the debtor gets it without anyone opening a banking portal or a design tool.


Common Variations You Can Add Without Rebuilding​

Run it as a batch instead
Swap the trigger for Recurrence plus Get items filtered to the rows still waiting, and put the four remaining actions inside an Apply to each. The Status column keeps the queue honest.
Put the slip on the invoice
Set Output Format Type to PDF and pass the invoice in the advanced File Content field, and the payment part is appended to the document instead of standing alone. The Dropbox version of this flow walks through that variant.
Print the slip in the debtor's language
Language Type already comes from the list, so set it per debtor and the labels print in German, French, Italian or English without touching the flow.
Use a creditor reference instead
If the account is an ordinary IBAN, set Reference Type to SCOR and supply an ISO 11649 creditor reference, or to NON to leave the reference off the slip entirely.

How this compares to the usual ways of making a QR bill​

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

ComparisonWho can produce a billWhere the data comes fromDelivery and record
Bank portal generator vs this flowWhoever has the e-banking loginTyped in by hand, one bill at a timeDownload, then attach it to an email yourself
Developer library vs this flowA developer, inside an applicationYour database, through code you maintainWhatever you build around it
ERP or invoicing module vs this flowAnyone, inside that productThe ERP's own recordsInside that product, if it ships the feature
This flowAnyone who can add a row to a listA SharePoint list the team already keepsFiled, linked on the row, and emailed automatically

Common questions​

What is a Swiss QR bill?​

A Swiss QR bill is the payment slip that replaced the old orange and red payment slips in Switzerland. It carries a receipt on the left and a payment part on the right, with a Swiss Cross QR code holding everything a bank needs: the creditor's account and address, the debtor, the amount, the currency and the reference. Scanning it is what makes paying a matter of a few taps instead of typing an account number.

The format is defined by the Swiss Payment Standards, published by SIX, and the official QR-bill flyer explains the layout in a page. The practical part for an automation is that the content is fixed: get the fields right and any Swiss banking app will read the result.

How to pay a Swiss QR bill?​

Open your banking app, choose the scan option, and point the camera at the Swiss Cross QR code. The app fills in the account, the amount, the currency and the reference, and you confirm. Nothing has to be typed, which is the entire reason the standard exists.

Paper still works the same way. The receipt part is yours, the payment part goes to the bank or the post office, and the printed numbers mirror what the code contains.

How do you generate a QR bill in Switzerland?​

Three routes are common. Banks offer a generator inside e-banking, which suits the company that sends a handful of bills a month. Invoicing and ERP products generate the slip as part of an invoice. Developers reach for a library and build it into their own software.

This flow is a fourth: keep the payment details in a list your team already maintains and let Create SwissQR Bill render the slip whenever a row appears. No portal, no code, and the result is a standards-compliant image you can file, attach or print.

How do you send an email with an attachment in Power Automate?​

Use Send an email (V2) from the Office 365 Outlook connector, open Advanced parameters, and add an attachment with two fields: a name and the content. The name is just text, so a token from an earlier action works. The content must be the file bytes, which usually means the output of the action that produced or fetched the file.

In this flow the name comes from Create file, so the mail matches what is in SharePoint, and the content comes straight from the PDF4me action. If the attachment arrives empty or the mail fails, the Content field is almost always pointing at something that is not file bytes.


Troubleshooting​

The action rejects the IBAN or the currency

The Swiss Payment Standards spec only allows accounts issued in Switzerland or Liechtenstein, up to 21 characters, and the currency must be CHF or EUR. An IBAN from anywhere else, or a currency column someone filled in with USD, fails here rather than later.

QRR is set but the reference is refused

A QRR reference is 27 digits, ends in a mod-10 check digit, and requires a QR-IBAN. If the account is an ordinary IBAN, or the reference was shortened or edited by hand, switch the Reference Type to SCOR or NON until the right account and reference are in place.

The email arrives with no attachment

Check the Content field of the attachment. It needs the file bytes, which is the File Content output of the barcode action. A token that returns a path, a name or a whole action body produces a mail that sends successfully and carries nothing useful.

Status is Generated but the link does not open

OutputLink is assembled from the site URL and the path of the new file. A library name with a space, a missing slash between the two halves, or a trailing slash on the site URL all produce a link that looks right and resolves to nothing. Compare the stored value with the address bar when you open the file by hand.


Next Steps​

The same five-step pattern (a row arrives, a document is rendered, it is filed, the row is stamped, the customer is told) fits any small document a list can describe: reminders, delivery notes, membership cards and tickets.