Español

Lee este artículo en español.

How to generate a QR code in n8n (with a single node)

If you automate with n8n, at some point you need to generate a QR code inside a flow: an order's tracking link, an event ticket, a contact card, or a discount coupon. You don't need to install libraries or set up anything special. With the regular HTTP Request node and the Cofferdock API you can set it up in a minute.

One thing up front, because people search for it: n8n has no dedicated "generate QR" node. You do it with the HTTP Request node calling an API that generates it. Here's which one and how, field by field.

What you'll get

You send the text or link you want to encode and it returns the QR code in PNG or SVG, ready for the next step in your flow. No awkward conversions in between: the node's output is already the image file.

Common uses in n8n:

What you need

Step by step in the HTTP Request node

Add an HTTP Request node and fill it in like this:

That's it. The node's output is the QR code as a file, ready to wire into Google Drive, Gmail, Telegram or wherever you need it. One node, done.

A quick example

Say you want the tracking QR for every new order. The flow would be:

  1. A trigger (a webhook from your store, or a new Google Sheets row) with the order's tracking link.
  2. The HTTP Request node above, which turns that link into a QR code.
  3. A Gmail node that emails the QR to the customer (or Google Drive that stores it).

Every order generates its own QR, with nothing done by hand.

Options you can tweak

Add them as Query Parameters in the same node:

OptionDefaultWhat it does
size512QR code side length in pixels (64 to 2000).
formatpngFormat: png or svg.
margin2Quiet zone around the QR code, in modules (0 to 20).
dark#000000Color of the dots, as hex.
light#ffffffBackground color, as hex.
eccMError correction: L, M, Q or H. Higher means the QR code survives more smudging or bending, at the cost of looking denser.

One thing people get stuck on: if your text is 500 characters or less, virtually any scanner reads it fine with the default correction (M).

Prefer to see it in code?

In case you want to test it quickly outside n8n, the same call with curl:

curl -X POST "https://api.cofferdock.com/qr?size=512" \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: text/plain" \
  --data-binary "https://cofferdock.com/order/1234" \
  -o qr.png

How much does it cost?

Each QR code uses 1 credit from your plan. Every Cofferdock tool draws from the same pool of credits, so you don't have to pay for a separate service for each little thing.

If you just need one-off QR codes to test or for your website, there's also a free version with no account or credits at cofferdock.com/qr; this guide is for when you want to generate them automatically from a flow.

FAQ

Does n8n have a native node to generate QR codes? No. You do it with the HTTP Request node calling the Cofferdock API, which is what generates the QR code.

Do I need to know how to code? No. You just fill in the HTTP Request node fields following this guide. The code examples are optional.

Do I get a link or the file? The file directly. With Response Format: File, the next node already receives the QR code, ready to save or send.

Can I generate it as SVG instead of PNG? Yes. Set format to svg and you'll get a vector, great if you're going to print it large later.

Can I generate several QR codes in a loop? Yes. If the previous node returns several rows, n8n runs the HTTP Request once per row and you get one QR code per item.

Try it yourself

You'll find the full instructions, with copy-paste examples, on the QR code generator page. And if you don't have an account yet, you can create one for free and build your first flow today.