# QR Code Generator

<figure><img src="/files/lfV3Ykv1cHSC1Oe2oieV" alt=""><figcaption></figcaption></figure>

## Description <a href="#description" id="description"></a>

This node allows you to generate a QR code image from a given URL. You can customize the QR code’s appearance by adjusting its size, background color, and foreground color. The generated QR code can be exported in different file formats (PNG, JPG, SVG) and output as either an image or a file, depending on how you want to use it. This makes it useful for sharing links, embedding in documents, or integrating into websites and apps.

**Field and Function:**

1. **Input\***
   * The URL or link you want to encode into a QR code. Example: `https://www.diaflow.io`
   * Use `@` to reference outputs from previous nodes (e.g., AI-generated text, API response, or spreadsheet data).
2. **QR code size**

* Defines the pixel size of the QR code image.
* Select one of the values
* Example: `256px` (common sizes: 128px, 256px, 512px, 1024px)

3. **Background color**

* Choose the background color of the QR code.
* Default: `#FFFFFF` (white).

4. **Foreground color**

* Choose the color of the QR code itself (the squares).
* Default: `#000000` (black).

5. **Output format**

* Select the format of the generated QR code.
* Options: **PNG, SVG**.

6. **Output type**

* Define how the QR code should be returned.
* Options: **Image** (for direct use in workflows) or **Link** (for sharing).

## Example <a href="#description" id="description"></a>

1. Set up node "File creator" with:
   1. Input = Refer to the output of node "Trigger"
   2. QR code size = 256px
   3. Background color = #FFFFF
   4. Foreground color = #000000
   5. Output format = PNG
   6. Output type = Image

<figure><img src="/files/BwY5Cz52pAGYTgL9zqaD" alt=""><figcaption></figcaption></figure>

2. After executing the flow

<figure><img src="/files/IlwNqMmv8lh0CtgOPgB3" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.diaflow.io/workflow-builder/nodes/built-in-tools/qr-code-generator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
