Skip to content
Digital Inspiration DocsDigital Inspiration Docs

Document Studio can put a different QR code in every email and every document it creates. Each code is made from its own row of your sheet or form response: a ticket with a seat number, a link to an order, or a discount code.

You can add the code in two ways. An Embed QR Code marker in your template needs no extra column and works in emails, Google Docs, Slides and Sheets. A QRCODE formula in your sheet lets you see every code before the workflow runs.

Maya Chen runs Weaving for Beginners, a workshop at Willow Lane Studio. Each guest should get a ticket by email with a QR code that she can scan at the door. Her guest list is in a Google Sheet:

First Name Email Address Session Seat
Daniel daniel.okafor@example.net Saturday, January 10 at 10 AM B4
Hannah hannah.weber@example.org Saturday, January 17 at 2 PM A1
  1. Open the workflow and add a Send Email task, or open the one you have.

  2. In Email Body, type an Embed QR Code marker on a line of its own, where the code should appear.

    Hi {{First Name}},
    You're booked for Weaving for Beginners on {{Session}}. Your seat is {{Seat}}.
    Show this code at the door:
    {{Embed QR Code, "Weaving for Beginners - {{First Name}} - Seat {{Seat}}", width=200}}
    See you there,
    Maya
  3. Click Preview. Document Studio sends the email to your own address with sample data. Scan the code with your phone camera to check what it says.

  4. Click Done, then save the workflow.

Document Studio fills in the markers inside the quotes for each row. When Maya scans Daniel’s code, her phone shows Weaving for Beginners - Daniel - Seat B4. The width=200 makes the code 200 pixels wide.

Daniel’s ticket email in Gmail, with his QR code below the line Show this code at the door

Document Studio attaches the code inside the email. The code shows even in email apps that hide pictures from the web, and it keeps working after you change the sheet.

The same marker works in a Google Docs, Slides or Sheets template. Maya can print a name badge for each guest with the same code as the email.

Template Where to type the marker What happens
Google Docs On a line of its own The code replaces the marker. Use the align buttons of Google Docs to move the line left, center or right.
Google Slides Alone in a text box The code replaces the whole text box and fits inside it. Make the text box square and as large as the code should be.
Google Sheets Alone in a cell The code sits over the cell. Spaces or a line break around the marker are fine, but no other text.

In Google Docs and Sheets, Document Studio shrinks a code wider than 600 pixels to fit. A PDF made from the document includes the code.

Google Docs template with four Embed QRCODE markers for typed text, a background color and a column, each line aligned differently
Each marker sits on its own line. The line's alignment decides where the code goes.

For a complete badge template in Google Slides, see make name badges with QR codes.

You can write the value after Embed QR Code, in three ways:

You write The code holds If the title is misspelled
{{Embed QR Code, {{Seat}}}} The Seat cell of that row No code
{{Embed QR Code, Seat}} The Seat cell of that row A code of the misspelled title
{{Embed QR Code, "Seat B4, Studio 2"}} The text in quotes, exactly as typed

Use braces for a column of your sheet or a question of your form. Use quotes for text you type, and always for text with a comma, because a comma starts the options. Markers inside quotes are filled in for each row, like "{{First Name}}, seat {{Seat}}". When the cell is empty, Document Studio adds no code.

Use Marker
A ticket number from a column {{Embed QR Code, {{Ticket ID}}, width=220}}
A page for that row, like an order {{Embed QR Code, https://example.com/orders/{{Order Number}}}}
The same link for everyone {{Embed QR Code, "https://willowlane.com/check-in"}}
Wi-Fi details, so the phone offers to join {{Embed QR Code, "WIFI:T:WPA;S:Willow Lane Guest;P:weaving;;"}}
A phone number to call {{Embed QR Code, tel:{{Phone}}}}

Write options after the text, with a comma before each one:

{{Embed QR Code, {{Seat}}, width=150, textcolor=#1A3C6E, backgroundcolor=#FFF8E1}}
Option What it does If you leave it out
width Width of the code in pixels, up to 2000 300
textcolor Color of the squares, as a hex code Black, #000000
backgroundcolor Color behind the squares, as a hex code White, #FFFFFF

Colors must be hex codes, like #1A3C6E. Document Studio ignores a color name like red and uses the default. Keep the squares much darker than the background, or some phones can’t scan the code.

In Google Slides, the size of the text box decides the size of the code, so width only changes how sharp the code is.

Document Studio adds a QRCODE function to Google Sheets. The formula turns each row’s text into a link to a picture of the code. Use the formula when you want to see and scan every code in the sheet first.

  1. Add a column titled Ticket to your sheet.

  2. Click the first cell under the title and paste this formula. The formula joins the workshop name, the guest’s first name in column A and their seat in column D.

    =QRCODE("Weaving for Beginners - "&A2&" - Seat "&D2, 200)
    Output
    https://charts.digitalinspiration.com/qrcode/3TqMkepTjTpIcdZQcLF0…bPGD.png

    The cell shows a long link that ends in .png. That link is the picture of the code. The 200 makes the code 200 pixels wide.

  3. Copy the formula to the other rows. Click the cell, then drag the small blue square at its bottom-right corner down to the last guest.

  4. To see the codes in the sheet, add a column titled Ticket Preview. Enter =IMAGE(E2), where E2 is the cell with the link, and copy the formula down.

  5. In your template, type {{Ticket}} where the code should go.

Use the column with the link in your template, not the preview column. A cell that shows a picture has no text in it, so {{Ticket Preview}} leaves a blank.

Document Studio shows a {{Ticket}} marker as the picture in emails, Google Docs, Slides and Sheets. In Google Docs and Sheets, add a width to the marker to make the picture smaller, like {{Ticket width=150}}. In an email, the picture loads from charts.digitalinspiration.com when the reader opens the email.

  • Keep the text short. The more text a code holds, the smaller its squares get and the harder it is to scan. If a code is slow to scan, make it wider or shorten the text.
  • Anyone can read a QR code. Don’t put passwords or private details in a QR code.
  • A marker inside an {% if %} condition adds the code only when the condition is true.
  • Older email templates may have =QRCODE({{Website}} width=200) typed in the Email Body. This still works in emails only. Use an Embed QR Code marker in new templates.
  • For a barcode that a store scanner can read, use Embed Barcode.
  • Document Studio removes the marker from the email Subject and from text messages, such as SMS and Google Chat.

Check these in order:

  1. Is the cell empty for that row, or is the column title in the inner braces misspelled?
  2. Is the name exactly Embed QR Code or Embed QRCode, with a comma after it?
  3. Is the marker in the subject, or in a text message? Codes only go in the email body and in documents.

The marker has no braces around the column title, like {{Embed QR Code, Seat}}, and no column has that title. Write {{Embed QR Code, {{Seat}}}} and check the spelling.

The text has a comma, so Document Studio read the rest as options. Put the text in quotes, like {{Embed QR Code, "Seat B4, Studio 2"}}.

The code fits inside the text box that holds the marker. Make the text box bigger and square in your template.

Google Sheets doesn’t know the QRCODE formula yet. Open the Extensions menu and choose Document Studio > Open once in this spreadsheet, then close the sidebar. The formula works after that.

The {{Ticket}} marker is set as the address of a link, or the email is plain text. Type the marker as normal text on a line of its own.