---
title: "Action scan_qr"
description: "Recognizes a QR code on an image by URL and saves the data to a constant."
---

# Action `scan_qr`

> **System ID:** `action_scan_qr`

## Description

Downloads an image from `source_url`, recognizes a QR code, and writes the data to a constant (`set_to` or `scanned_qrcode`). URL supports placeholders.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| **recognized** | QR code recognized and saved |
| **not_recognized** | QR code not found on the image |
| **error** | No `source_url`, or failed to download / read the image |

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `source_url` | string | yes | — | Image URL with the QR code (placeholders) |
| `set_to` | string | no | `scanned_qrcode` | Constant for the result |

## Configuration example

```json
{
  "source_url": "{{uploaded_image_url}}",
  "set_to": "scanned_qrcode"
}
```

## Related docs

- [Actions reference](/en/actionjail/reference/actions-reference.md)
