Generate documents with QR codes from template - quick tips for each type

Modern templating engine

Still using Classic syntax? See the Classic documentation.

Learn the differences.

In this article, we’ll explore how you can enhance your business processes using Plumsail Documents with dynamic QR codes.

QR codes (Quick Response codes) are scannable codes that provide quick access to various resources, such as forms, documents, websites, or locations. By incorporating QR codes into your documents, you can streamline communication and logistics, benefiting your business at every stage.

Build data dynamically

The QR code value is simply a text string. You can build the string values dynamically in any system, such as Power Automate, Azure Logic Apps, Zapier, Make, or a custom application. Learn more about Plumsail Documents integrations.

For example, in Power Automate, you can use the concat() function to build the required string format.

Some formats, such as vCard, also require line breaks between properties. In such cases, use decodeUriComponent('%0D%0A') to insert line breaks where needed.

Below is an example of how to build a vCard string in Power Automate:

Concat function in Power Automate to build vCard string

In this example, when a new item is created in a SharePoint list, we collect the contact details and use the concat() function to build a vCard string. The decodeUriComponent('%0D%0A') function inserts the line breaks required by the vCard format:

concat(
'BEGIN:VCARD',
decodeUriComponent('%0D%0A'),
'VERSION:3.0',
decodeUriComponent('%0D%0A'),
'N:', triggerBody()?['LastName'], ';', triggerBody()?['FirstName'], ';;;',
decodeUriComponent('%0D%0A'),
'FN:', triggerBody()?['FirstName'], ' ', triggerBody()?['LastName'],
decodeUriComponent('%0D%0A'),
'ORG:', triggerBody()?['Company'],
decodeUriComponent('%0D%0A'),
'TITLE:', triggerBody()?['JobTitle'],
decodeUriComponent('%0D%0A'),
'TEL;TYPE=WORK,VOICE:', triggerBody()?['Phone'],
decodeUriComponent('%0D%0A'),
'EMAIL:', triggerBody()?['Email'],
decodeUriComponent('%0D%0A'),
'URL:', triggerBody()?['Website'],
decodeUriComponent('%0D%0A'),
'END:VCARD')

Simply replace the field names used in the triggerBody() expressions with the names from your data source, and the flow will generate a vCard QR code containing your contact information.

This approach also works for other QR code types. For simpler formats, such as SMS messages, MeCard or geolocations, you can still use concat() to assemble values dynamically, but no additional line breaks are needed.

The decodeUriComponent('%0D%0A') function is only required for QR code formats that use multiple lines, such as vCard or calendar events.

Next, we’ll look at each QR code type in more detail and show how to use it in document templates.

URL QR code

URL QR codes are the most commonly used type because they provide instant access to online resources with a quick scan. Common applications include:

  • Your company website

  • Product sign-up forms

  • Payment portals

  • App download links

  • Cloud-stored documents, like restaurant menus or test results

For example, a medical lab can generate test reports that include a QR code, allowing patients to check their results online.

To create a QR code in your document, use the #qrcode operation. Check the documentation on object operations for details.

Template

Result

Download template document
Word modern document template with dynamic qr code
Download result document
Completed pdf document with qr code

Phone number QR code

You can create phone number QR codes in your documents by inserting a token with the #qrcode operation applied to it. See QR code operation documentation for details.

Use the following format for phone numbers: tel:+1-234-555-6677. Include the country code (for example, +1 for the US) to ensure the phone number is recognized correctly on different devices.

Below are a business card template and the resulting document after merging data.

Template

Result

Download template document
Word modern document template with phone number qr code
Download result document
Completed pdf document with phone number qr code

When someone scans the QR code, they can call the number or save the contact information.

Geolocation QR code

QR codes can also be used to store geolocation coordinates. As in the previous examples, you can add a QR code by applying the #qrcode operation to a token, as described in the QR code operation documentation.

The location data should use the following format: geo:40.74018922726678,-74.00869124083648.

Geolocation QR codes are useful in documents that need to provide a specific location, such as delivery instructions, event information, or property details. Below is a simple example that you can use in your own documents.

Template

Result

Download template document
Word modern document template with geo location qr code modern engine
Download result document
Completed pdf document with geo location qr code

SMS QR code

QR codes can also be used to start a text message. You can create them in your documents by applying the #qrcode operation to a token. The operation is described in the QR code documentation.

The SMS data should use the following format: sms:+1234567890. You can also prefill the message text using the smsto:+1234567890:I would like to share my feedback format.

SMS QR codes are useful when recipients need to quickly send a text message without manually entering a phone number. Common use cases include customer support requests, appointment confirmations, event registrations, and feedback collection.

Below is a simple example that you can use in your own documents.

Template

Result

Download template document
Word modern document template with SMS QR code
Download result document
Generated PDF document with SMS QR code

WiFi QR code

QR codes can also be used to share WiFi credentials. You can create them in your documents by applying the #qrcode operation to a token. The operation is described in the QR code documentation.

The WiFi data should use the following format: WIFI:T:WPA;S:Hotel-Guest;P:EnjoyYourStay2026;;.

WiFi QR codes are useful in offices, hotels, restaurants, conference venues, and other locations where visitors need quick access to a wireless network.

When someone scans the QR code, their device can automatically connect to the WiFi network without manually entering the network name and password. Below is a simple example that you can use in your own documents.

Template

Result

Download template document
Word modern document template with WiFi QR code
Download result document
Generated PDF document with WiFi QR code

vCard QR code

QR codes can also be used to share contact information. You can create them in your documents by applying the #qrcode operation to a token. Contact details should be provided in the vCard format, which is described in the QR code documentation.

The QR code value should contain a vCard string, including the line breaks required by the vCard format. See Build data dynamically for an example of generating QR code values from data sources such as SharePoint and Power Automate.

For example, the following JSON value generates a QR code for a contact card:

{
    "businessCard": "BEGIN:VCARD\r\nVERSION:3.0\r\nN:Johnson;Sarah;;;\r\nFN:Sarah Johnson\r\nORG:Plumsail\r\nTITLE:Sales Manager\r\nTEL;TYPE=WORK,VOICE:+15551234567\r\nEMAIL:sarah.johnson@plumsail.com\r\nURL:https://plumsail.com\r\nEND:VCARD"
}

vCard QR codes are useful for business cards, employee badges, event passes, customer-facing documents, and marketing materials. When someone scans the QR code, their device can display the contact details and offer to save them directly to the contacts list.

Below is a simple example that you can use in your own documents.

Template

Result

Download template document

Word modern document template with vCard QR code

Download result document

Generated PDF document with vCard QR code

MeCard QR code

MeCard QR codes provide a simple way to share contact information through a QR code. You can generate them in your documents by applying the #qrcode operation to a token.

Contact details should be provided in the MeCard format, which is described in the QR code documentation. Unlike vCard, MeCard stores contact information in a compact single-line format.

For example, the following JSON value generates a QR code containing contact details:

{
    "contactCard":"MECARD:N:Martinez,Daniel;ORG:Plumsail;TEL:+3344557788;EMAIL:daniel.martinez@plumsail.com;URL:https://plumsail.com;;"
}

When someone scans the QR code, their device can display the contact details and offer to save them directly to the contacts list.

Below is a simple example that you can use in your own documents.

Template

Result

Download template document

Word modern document template with MeCard QR code

Download result document

Generated PDF document with MeCard QR code

Calendar Event QR code

QR codes can also be used to share calendar events. You can create them in your documents by applying the #qrcode operation to a token. Event details should be provided in the vEvent format, which is described in the QR code documentation.

The QR code value should contain a vEvent string, including the line breaks required by the vEvent format. See Build data dynamically for an example of generating QR code values from data sources such as SharePoint and Power Automate.

For example, the following JSON value generates a QR code containing an event invitation:

{
    "meetingEvent": "BEGIN:VEVENT\r\nSUMMARY:Document Automation Webinar\r\nDESCRIPTION:Learn how to automate document generation workflows\r\nLOCATION:Online\r\nDTSTART:20261008T150000Z\r\nDTEND:20261008T160000Z\r\nEND:VEVENT"
}

Calendar Event QR codes are useful for meeting invitations, conference schedules, training sessions, webinars, appointments, and other events where attendees need to save event details quickly.

When someone scans the QR code, their device can display the event information and offer to add it directly to their calendar.

Below is a simple example that you can use in your own documents.

Template

Result

Download template document

Word modern document template with calendar event QR code

Download result document

Generated PDF document with calendar event QR code

Girocode QR

Girocode is a European standard for SEPA credit transfers. It contains all the information required to initiate a payment, such as the recipient’s IBAN, name, payment amount, and payment reference.

You can generate Girocode QR codes in your documents by applying the #qrcode operation with the type:girocode parameter. See QR code documentation for implementation details.

The value for a Girocode QR code should be a JSON object containing the required payment information. For example:

{
  "girocodePayment": {
    "iban": "DE89370400440532013000",
    "bic": "COBADEFFXXX",
    "name": "Northwind Consulting GmbH",
    "amount": "123.45",
    "remittanceInformation": "Invoice INV-2026-0815",
    "remittanceType": "Unstructured",
    "messageToPayer": "Consulting services",
    "version": "Version2"
  }
}

Girocode supports only EUR payments. When someone scans the QR code with a banking application, the payment details are filled in automatically, reducing manual data entry and the risk of mistakes. Girocode QR codes are especially useful for invoices, payment reminders, and any documents that require payment information to be shared in a standardized format.

Below is a simple example that you can use in your own documents.

Template

Result

Download template document

Word modern document template with Girocode QR

Download result document

Generated PDF document with Girocode QR

Swiss QR code

Swiss QR code is a specific type of QR code used in Switzerland and Liechtenstein for sharing payment information. It follows the Swiss Implementation Guidelines of the EPC QR Code for Payment Standard and is commonly used on invoices in Switzerland.

You can generate Swiss QR codes in your documents by applying the #qrcode operation with the type:swiss parameter. See QR code documentation for implementation details.

The value for a Swiss QR code should be a JSON object containing the required payment information. For example:

{
  "swissValue": {
    "ibanType": "QrIban",
    "iban": "CH5830000000000000000",
    "currency": "CHF",
    "amount": 119.95,
    "creditor": {
      "name": "Muster AG",
      "street": "Musterstrasse",
      "houseNumber": "1",
      "zipCode": "8000",
      "city": "Zürich",
      "country": "CH"
    },
    "reference": {
      "type": "QRR",
      "value": "990005000000000320071012303"
    },
    "debtor": {
      "name": "Max Mustermann",
      "street": "Musterweg 2",
      "houseNumber": "5",
      "zipCode": "3000",
      "city": "Bern",
      "country": "CH"
    },
    "unstructuredMessage": "Rechnung 2026-0011"
  }
}

When someone scans the Swiss QR code with a banking application, the payment details are filled in automatically, reducing manual data entry and the risk of mistakes. Swiss QR codes simplify invoice payments by allowing banking applications to read payment details automatically. They have replaced traditional payment slips in Switzerland and are now the standard way to include payment information on invoices.

Below is a simple example that you can use in your own documents.

Template

Result

Download template document

Word modern document template with Swiss QR code

Download result document

Generated PDF document with Swiss QR code

Sign up for Plumsail Documents

If you’re new to Plumsail Documents, sign up for a 30-day free trial to start your way to document automation.

If you have any questions, please feel free to contact our technical support team at support@plumsail.com.