How to Embed Barcode and QR Code in Google Form emails
Form Notifications can put a QR code or a barcode in the email message that goes out when someone submits your Google Form. The code can hold the respondent’s answer to a question, like their website address or a book’s ISBN, or the same text for everyone.
Add a QR Code to the Email
Section titled “Add a QR Code to the Email”Your form has a question titled What is your website address. To send a QR code that opens the respondent’s website, type this marker in the body of your email template, on a line of its own, where you want the code to appear:
{{Embed QR Code, {{What is your website address}}}}The inner marker is the question title, the same as other dynamic form fields. When the form is submitted, the add-on makes a QR code of the answer and shows it in the email.
For a code that is the same in every email, put the text in quotes:
{{Embed QR Code, "Thanks for registering"}}You can write the text after Embed QR Code, in three ways:
| You write | The code holds |
|---|---|
{{Embed QR Code, {{What is your website address}}}} |
The answer to that question. No image if no question has that title. |
{{Embed QR Code, What is your website address}} |
The answer if a question has that title, otherwise the words as typed |
{{Embed QR Code, "Thanks for registering"}} |
The text in quotes, exactly as typed |
Use {{Question title}}, with its own braces, for answers from the form, and quotes for fixed text. The form without braces also works, but a misspelled question title turns into a code of that title. Text with a comma must be in quotes.
Change the size and colors
Section titled “Change the size and colors”Write options after the text, with a comma before each one. This code is 225 pixels wide, with white squares on an indigo background:
{{Embed QR Code, {{What is your website address}}, width=225, textcolor=#FFFFFF, backgroundcolor=#4B0082}}| Option | Default | What it does |
|---|---|---|
width |
300 |
Width in pixels. The maximum is 2000. |
textcolor |
#000000 |
Color of the squares, as a hex code. |
backgroundcolor |
#FFFFFF |
Background color, as a hex code. |
Keep the squares and the background far apart in brightness, or some phones can’t scan the code.
Add a Barcode to the Email
Section titled “Add a Barcode to the Email”Your form has a question titled Enter Book ISBN. To send the answer as a barcode, type this marker in the body of your email template:
{{Embed Barcode, {{Enter Book ISBN}}, format=EAN-13}}If the respondent enters 9781786330895, the email shows an EAN-13 barcode with the number printed below the bars.

The text works the same way as in a QR code: {{Question title}} for an answer, or quotes for fixed text.
Choose a barcode format
Section titled “Choose a barcode format”Set the format with format=. If you leave it out, the barcode is Code 128, which takes letters, digits and symbols and is read by almost every scanner.
| Format | Write it as | What it holds |
|---|---|---|
| Code 128 | format=Code 128 |
Letters, digits and symbols. The default. |
| Code 39 | format=Code 39 |
Capital letters, digits and a few symbols |
| EAN-13 | format=EAN-13 |
12 or 13 digits |
| UPC-A | format=UPC-A |
11 or 12 digits |
| ISBN | format=ISBN |
A book number |
| PDF417 | format=PDF417 |
Longer text, in a stacked block |
| Data Matrix | format=Data Matrix |
Letters, digits and symbols, in a small square |
Capital letters, spaces and hyphens in the format name don’t matter, so format=ean13 and format=EAN-13 are the same. Here is the full list of formats.
Change the size and colors
Section titled “Change the size and colors”Write options after the text, with a comma before each one. A single word like includetext is the same as includetext=true.
{{Embed Barcode, {{Enter Book ISBN}}, format=EAN-13, height=10, barcolor=#AA0000}}| Option | Default | What it does |
|---|---|---|
height |
20 |
Height of the bars, in millimeters. |
scale |
3 |
Size of the whole picture. 6 is twice as big. |
includetext |
true |
Prints the text below the bars. Use includetext=false to hide it. |
barcolor |
black | Color of the bars, as a hex code. |
textcolor |
black | Color of the printed text. |
backgroundcolor |
white | Background color. |
Here is the full list of options.
Things to Know
Section titled “Things to Know”- The codes are attached to the email, so they show even when the email app blocks remote pictures.
- An unanswered question gives no image.
- A code holds one value: one answer, or one piece of fixed text.
- When a checkbox question has several choices ticked, each choice goes on its own line in the code.
- The markers work in the body of the email. A plain text email can’t show pictures.
Older Syntax
Section titled “Older Syntax”Before Embed markers, you added codes by typing a formula in the email template. These formulas still work, with spaces between the options:
=QRCODE({{What is your website address}} textcolor=#4B0082 width=225)=BARCODE({{Enter Book ISBN}} format=EAN13)
Use Embed markers in new templates. The formulas have two limits that Embed doesn’t:
- The text ends at the first
). An answer ofStudio (B)gives a code ofStudio (B. - A word like
code=SAVE10after a space is read as an option. An answer ofPromo code=SAVE10gives a code ofPromo.
Troubleshooting
Section titled “Troubleshooting”No image where the code should be
Section titled “No image where the code should be”- The respondent didn’t answer the question.
- The question title inside
{{ }}doesn’t match a question in your form. Check the spelling. - The answer doesn’t fit the barcode format. EAN-13 and UPC-A take digits only and need the right check digit, and Code 39 doesn’t take small letters. Fix the value, or switch to Code 128.
- The format name isn’t one the add-on knows. Check it against the list of formats.
The code shows the question title
Section titled “The code shows the question title”The marker has no braces around the question title, like {{Embed QR Code, Website}}, and no question has that title. Fix the title, and write it with braces, like {{Embed QR Code, {{Website}}}}.
The code holds only part of the text
Section titled “The code holds only part of the text”The text has a comma, so the marker reads the rest as options. Put the text in quotes, like {{Embed QR Code, "Hello, World"}}.
