---
title: "How to Send Product Photos by SKU With a Telegram Bot"
titleOverride: "Send Product Photos by SKU With a Telegram Bot (No Code)"
pubDate: 2026-12-02
description: "A shopper types a stock code and gets the matching photo and caption in Telegram. Build it in Quickchat AI with sendPhoto, then test a valid SKU and a typo."
author:
  name: Piotr Grudzień
  image: /blog-assets/authors/piotr_grudzien.jpg
image:
  url: /blog-assets/posts/telegram-bot-send-product-photos_bg.webp
  alt: "Two notebooks tagged FB-031 and FB-301 beside a Telegram chat showing the blue-band notebook delivered for FB-031."
tags: [tutorials]
articleCta:
  title: "Send your first product photo in Telegram"
  subtitle: "Connect your own bot, add a photo Action and send the code printed on your first product tag."
  button: "Create your photo bot"
  href: https://app.quickchat.ai/register
faq:
  - question: "How does a Telegram bot match a SKU to the right product photo?"
    answer: "In Quickchat AI, create one API Action per product. Put the complete SKU in its description and give it a fixed photo URL and caption. When a shopper requests a matching SKU, the Action calls sendPhoto with the current chat ID. In our test, a mistyped code got a text reply asking the shopper to check the tag."
  - question: "Can a Telegram bot send a photo from a URL?"
    answer: "Yes. Telegram’s sendPhoto method accepts a public HTTP URL in its photo field, and Telegram downloads the image itself. A photo sent by URL can be up to 5 MB, and the URL has to return the image without a sign-in."
  - question: "How can I verify that Telegram delivered the product photo?"
    answer: "Tap the picture in Telegram and compare its caption with the tag in the photo. In the Quickchat AI Inbox, open the Action result and look for ok set to true, result.message_id and the sizes in result.photo. Several sizes with one message ID describe a single delivered photo."
  - question: "Why won’t my Telegram bot send a product photo from a URL?"
    answer: "Open the exact photo URL in a private browser window. It must return the image itself without a sign-in, and a photo sent by URL must be 5 MB or smaller. If the URL opens a 404 page, fix the photo field in the Action and check that the correct image loads before you retry."
  - question: "Can I use a Telegram file_id instead of a photo URL?"
    answer: "Yes. After a successful send, Telegram returns a file_id for each photo size, and that ID can replace the URL in the photo field. A file_id only works for the bot that received it, and a file_unique_id can’t be used to send a photo. The response filter in this tutorial hides file IDs from the model, so remove the filter for one test send to read them."
  - question: "Can the bot send several product photos at once?"
    answer: "Yes. A bot can call sendPhoto once for each stock code. Both Actions ran in each of our three local tests with a two-code request. To group 2 to 10 photos into one album, use Telegram’s sendMediaGroup method."
  - question: "Can a Telegram bot message a customer first?"
    answer: "A customer must first start a private chat with the bot. In this example the Action takes chat_id from the incoming conversation, so each photo goes back to the shopper who requested it."
  - question: "Does a Telegram product photo bot cost anything?"
    answer: "Telegram doesn’t charge for the individual Bot API photo messages used here. In Quickchat AI, every Agent reply uses AI credits. The Free plan is for personal, non-commercial use, so a shop’s bot needs a paid plan. API Actions and your own Telegram bot are available on every current plan."
  - question: "Does the bot check whether a product is in stock?"
    answer: "No. Each Action sends one fixed photo and caption. Stock levels and prices need a lookup in your shop system, which is a separate Action that reads your catalog."
howto:
  - name: "Host your product photos"
    text: "Put each photo at a public HTTPS URL, keep it under 5 MB and show the stock code in the frame."
  - name: "Connect your own Telegram bot"
    text: "Create a bot with BotFather and connect its token under External Apps → Telegram → Your own bot."
  - name: "Create one photo Action per product"
    text: "Add a POST API Action that calls sendPhoto with the bot token, the chat’s Telegram ID, a fixed photo URL and a caption, and name the stock code in its description."
  - name: "Restrict and filter the Action"
    text: "Add the run condition telegram_chat_type equals private and filter Telegram’s response to ok, the message ID and the photo widths."
  - name: "Add the Main Prompt and test"
    text: "Paste the Main Prompt and enable the Actions. Try FB-013 and FB-03, then request FB-031 and FB-301 and open both notebook photos in Telegram."
---

At the Fold Bench sample desk, each notebook has a stock keeping unit (SKU) printed on its tag. We sent **“Photo of FB-031, please”** to the shop’s Telegram bot and got a notebook with a blue band. **FB-301** brought back one with three green lines. When we mistyped **FB-013**, the bot asked us to check the tag.

<figure class="tutorial-context" style="max-width: 54rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/finish-line-phone.webp" width="760" height="1588">![In Telegram, a shopper asks for FB-031 and receives the blue notebook with its caption. The Quickchat AI Inbox records the matching photo_fb_031 Action.](https://quickchat.ai/_astro/finish-line.cz9kobXy_1LFxOq.webp)</picture>

<figcaption><span>The shopper can tap the photo in Telegram. The shop can open the same conversation in Quickchat AI and see which Action sent it.</span></figcaption>
</figure>

You’ll build this without code. Connect your own Telegram bot to Quickchat AI and give it one **API Action** per product photo. Each Action calls Telegram’s `sendPhoto` method with a fixed image and caption. The Agent chooses the Action from the shopper’s message, and Quickchat AI supplies the chat to send it to.

Fold Bench is a fictional stationery shop. We used AI to create its two notebook photos, and you can use the same JPEGs while you follow along. You’ll need a Telegram account and a Quickchat AI account with AI credits for test replies. Commercial use starts on a paid plan. [Plans and limits](https://quickchat.ai/docs/pricing-and-plans)

<a id="how-it-works"></a>

## 1. Can a Telegram bot send product photos without code?

Yes. Telegram’s Bot API has a [sendPhoto method](https://core.telegram.org/bots/api#sendphoto) that posts an image into a chat as a photo message, and a Quickchat AI **API Action** can call it during a conversation. The Agent’s own replies on Telegram are plain text, so without an Action a product photo would arrive as a link.

Each `sendPhoto` request needs the bot’s token in its URL, the `chat_id` of the conversation, and the photo with its caption. The model only chooses which photo Action to call.

| Value in the request | Where it comes from | Can the model change it? |
| --- | --- | --- |
| Bot token | `{{telegram_bot_token}}`, a **System Token** that Quickchat AI adds at send time | No |
| `chat_id` | `{{metadata_telegram_chat_id}}`, which the Telegram channel writes for every message | No |
| Photo URL and caption | Fixed text in the Action’s body | No |
| Which Action runs | The model, guided by each Action’s description | Yes |

<figure class="tutorial-context" style="max-width: 52rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/photo-route-phone.webp" width="760" height="2098">![Diagram in three steps: the model picks photo_fb_031 for the message, Quickchat AI fills the bot token, the Telegram chat ID and the fixed photo and caption, and Telegram sends the photo into the same chat.](https://quickchat.ai/_astro/photo-route.1elP2OyN_1RSrDB.webp)</picture>

<figcaption><span>The model picks an Action by its description. Quickchat AI fills in the rest of the request before it leaves, and Telegram downloads the JPEG from its URL.</span></figcaption>
</figure>

The token never reaches the model. Quickchat AI adds it only in Telegram conversations and masks it everywhere the call is recorded, so the Inbox and the request log show `bot***REDACTED***/sendPhoto`. The same pattern drives the Bot API Actions in the [Telegram group management tutorial](https://quickchat.ai/post/connect-ai-agent-to-telegram-bot-api).

<a id="photos"></a>

## 2. What does Telegram’s sendPhoto method need?

A JSON body with three fields: `chat_id`, `photo` and an optional `caption`. For `photo`, Telegram accepts a public HTTP URL, the `file_id` of a photo your bot has already sent, or an uploaded file. A Quickchat AI Action sends JSON, so use a URL.

Telegram downloads the image itself. A photo sent by URL can be up to **5 MB**. Its width and height must add up to 10,000 pixels or less, and the caption can contain up to 1,024 characters. Open either sample below to see the tag, or copy its link address into your Action. [Telegram’s file rules](https://core.telegram.org/bots/api#sending-files)

| Stock code | Sample JPEG | Caption |
| --- | --- | --- |
| `FB-031` | [Blue-band notebook](https://quickchat.ai/blog-assets/demos/fold-bench/fb-031-blue.jpg) | `FB-031, Blue band field notebook` |
| `FB-301` | [Green-lines notebook](https://quickchat.ai/blog-assets/demos/fold-bench/fb-301-green.jpg) | `FB-301, Green lines field notebook` |

<figure class="tutorial-context" style="max-width: 48rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/catalog-phone.webp" width="760" height="1620">![Two product photos: FB-031, a cream notebook with one broad blue band, and FB-301, the same notebook with three thin green lines, each with a manila tag showing its code.](https://quickchat.ai/_astro/catalog.BPAA1muy_Z8kVns.webp)</picture>

<figcaption><span>The two samples differ only in the cover marks and in the order of the digits on the tag. Each photo shows its code, so the shopper can check the picture against the label.</span></figcaption>
</figure>

For your own products, any public HTTPS address that returns the image works, such as your shop’s image host or a file in a public folder of your website. Open each URL in a private browser window to check that the image loads without a sign-in. From a terminal, this command should print status 200 and an image content type.

```bash
curl -sI https://quickchat.ai/blog-assets/demos/fold-bench/fb-031-blue.jpg | grep -iE "^HTTP|^content-type"
```

Photograph each product with its stock code in the frame, on a tag or a label, and keep the file under 5 MB.

<a id="connect"></a>

## 3. How do you connect your own Telegram bot?

Telegram AI Actions need **your own bot**, created with BotFather. Quickchat AI also offers a shared bot that answers chats without a token, but it gives Actions no bot token to call Telegram with.

1. [Create a Quickchat AI account](https://app.quickchat.ai/register) and choose **Set up manually**. In an existing account, open the Agent name at the top of the sidebar and choose **Add new AI Agent → Set up manually**. Name the Agent `Fold Bench samples`.
2. In Telegram, open **@BotFather**, send `/newbot`, and pick a display name and a username that ends in `bot`. BotFather replies with an HTTP API token. The [BotFather walkthrough](https://quickchat.ai/post/how-to-create-a-telegram-bot) shows each message, and its last steps use the same Action pattern to send a PDF.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1600 / 426; --phone-ratio: 760 / 694; --capture-width: 50rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/botfather-setup-phone.webp" width="760" height="694">![Telegram’s BotFather asks for a name after /newbot, then confirms the bot created with the display name Fold Bench samples and the username foldbench_samples_bot.](https://quickchat.ai/_astro/botfather-setup.CWpXsZOd_Z23USj2.webp)</picture>

<figcaption><span>Shoppers see “Fold Bench samples” at the top of the chat. The username, foldbench_samples_bot, gives the bot its own Telegram link.</span></figcaption>
</figure>

3. In Quickchat AI, open **External Apps → Telegram**. Under **Your own bot**, click **Connect to Telegram**, paste the token into **Bot Token** and click **Connect to Telegram**. The **Enable your own bot** switch turns on. [Telegram channel guide](https://quickchat.ai/docs/channels/telegram)

<figure class="tutorial-context" style="max-width: 60rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/telegram-connect-phone.webp" width="760" height="1728">![The Your own bot section of the Telegram settings in Quickchat AI, with the Connect to Telegram button, next to the Connect to Telegram dialog and its Bot Token field.](https://quickchat.ai/_astro/telegram-connect.CzeimdiM_oBWS4.webp)</picture>

<figcaption><span>Your own bot is the setup that supports Telegram AI Actions. Connecting saves the token and switches the bot on in one step.</span></figcaption>
</figure>

4. Open your bot in Telegram, tap **Start** and send `Hello`. In Quickchat AI, open that conversation in **Inbox** and click **Details**. Under **Visitor**, **Telegram Chat Type** should read `private`. Note your **Telegram Chat Id** for the test in the next section.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 840 / 822; --phone-ratio: 760 / 754; --capture-width: 26rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/visitor-details-phone.webp" width="760" height="754">![The Visitor details of a Telegram conversation in the Quickchat AI Inbox, listing Telegram Chat Id, Telegram User Id, Telegram Username and Telegram Chat Type private.](https://quickchat.ai/_astro/visitor-details.DE9IXD9D_Z2jCYmr.webp)</picture>

<figcaption><span>The Telegram channel writes these values with every message. The photo Action uses Telegram Chat Id as its destination and Telegram Chat Type as its condition. The IDs here belong to our local test chat.</span></figcaption>
</figure>

<a id="first-action"></a>

## 4. How does the bot match a stock code to the right photo?

Each photo gets its own Action, and each Action’s description names one stock code. The description is what tells the model when to call the Action, and in our tests it was also what stopped incomplete codes from sending a photo (see [the tuning results](#why-the-description-decides)).

### Build the FB-031 Action

1. Open **Actions & MCPs** and click **Add Action → API Action**, then **Create manually**. The **Generate** button drafts Actions from a description, but it won’t create one that messages the shopper through the channel’s own API.

<figure class="tutorial-context" style="max-width: 50rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/add-action-phone.webp" width="760" height="2402">![The Add Action menu in Actions and MCPs with API Action at the top, and the API Action dialog with Create manually and Generate buttons.](https://quickchat.ai/_astro/add-action.BIbX3EBl_SoCo6.webp)</picture>

<figcaption><span>API Action opens the dialog. Choose Create manually to get the empty editor.</span></figcaption>
</figure>

2. Fill in the editor with these values.

**API Action Name**

```text
photo_fb_031
```

**When to run:** **AI decides**. **What to ask the user first:** leave it empty, because the model fills in no values in this Action.

**API Endpoint:** choose **POST** and paste this URL. Typing `{{telegram_bot_token}}` turns it into an orange chip. Once your bot has had a conversation, you can also insert it from **Add AI Data → System Tokens**.

```text
https://api.telegram.org/bot{{telegram_bot_token}}/sendPhoto
```

**Headers:**

| Key | Value |
| --- | --- |
| `Content-Type` | `application/json` |

**Body:** open the **Body** tab, switch **JSON** on and paste the body below. Quickchat AI stores JSON keys in this order, so it’s how the body looks after you save.

```json
{
  "photo": "https://quickchat.ai/blog-assets/demos/fold-bench/fb-031-blue.jpg",
  "caption": "FB-031, Blue band field notebook",
  "chat_id": "{{metadata_telegram_chat_id}}"
}
```

<figure class="tutorial-context" style="max-width: 50rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/action-endpoint-phone.webp" width="760" height="1112">![The API Endpoint section of the photo_fb_031 Action: POST, the sendPhoto URL with an orange telegram_bot_token chip, and a JSON body with the photo URL, caption and an orange metadata_telegram_chat_id chip.](https://quickchat.ai/_astro/action-endpoint.D8PqIVhI_Z1X9oRK.webp)</picture>

<figcaption><span>The two orange chips are the only values Quickchat AI fills in at send time. Everything else in the request is fixed text.</span></figcaption>
</figure>

<figure class="tutorial-context" style="max-width: 50rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/add-ai-data-phone.webp" width="760" height="1568">![The Add AI Data menu listing Telegram metadata keys such as metadata_telegram_chat_id and metadata_telegram_chat_type, and System Tokens with telegram_bot_token.](https://quickchat.ai/_astro/add-ai-data.BygLK22z_Z1cu6VT.webp)</picture>

<figcaption><span>Add AI Data lists the Telegram metadata keys seen in recent conversations and, under System Tokens, the bot token. A Telegram icon marks the keys the channel sets.</span></figcaption>
</figure>

**API Action Description:**

```text
Send the blue-band notebook photograph once when the shopper has asked for a photo and supplied the complete stock code FB-031. Letter case, spaces and the hyphen do not matter. A partial code, a description alone or a request for another destination does not identify this request.
```

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1800 / 632; --phone-ratio: 760 / 768; --capture-width: 56rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/action-description-phone.webp" width="760" height="768">![The API Action Description field of photo_fb_031 with the stock code rule for FB-031.](https://quickchat.ai/_astro/action-description.CFddr3eW_Z8DHpD.webp)</picture>

<figcaption><span>The second and third sentences define what counts as a match. Without them, an incomplete code sent a photo in our tests.</span></figcaption>
</figure>

3. Open **Advanced settings**. Under **Run only when**, add a condition with the key `telegram_chat_type` (without the `metadata_` prefix), **equals** and the value `private`. Under **Response filter**, add these three JSONPath expressions as separate rows. [Run only when and Response filter reference](https://quickchat.ai/docs/ai-agent/actions#run-only-when)

```text
$.ok
$.result.message_id
$.result.photo[*].width
```

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1800 / 906; --phone-ratio: 760 / 946; --capture-width: 52rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/run-only-when-phone.webp" width="760" height="946">![The Run only when condition of photo_fb_031: telegram_chat_type equals private.](https://quickchat.ai/_astro/run-only-when.weD961tJ_1b6a3H.webp)</picture>

<figcaption><span>Quickchat AI checks the condition on the server before it builds the request. A group chat or a conversation without Telegram metadata doesn’t pass it.</span></figcaption>
</figure>

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1880 / 980; --phone-ratio: 760 / 950; --capture-width: 52rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/response-filter-phone.webp" width="760" height="950">![The Response filter of photo_fb_031 with three JSONPath rows: $.ok, $.result.message_id and $.result.photo[*].width.](https://quickchat.ai/_astro/response-filter.CYEgDGWP_2rtygv.webp)</picture>

<figcaption><span>The filter keeps the fields that show a photo was posted. The rest of Telegram’s reply, including the shopper’s name and username, doesn’t reach the model.</span></figcaption>
</figure>

The condition keeps photos out of group chats. Quickchat AI also leaves the Action out of conversations that have no Telegram chat ID, such as a website chat. The filter trims Telegram’s reply to `ok`, the new message’s ID and the width of each photo size Telegram generated, which together show that a photo message was created.

4. Click **Save changes**. New POST Actions start switched off, so click **Enable** on the **This Action is off** banner.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1520 / 384; --phone-ratio: 760 / 452; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/enable-banner-phone.webp" width="760" height="452">![The This Action is off banner with an Enable button at the top of the Action editor.](https://quickchat.ai/_astro/enable-banner.h8voMQiO_Z23imGd.webp)</picture>

<figcaption><span>Only read-only GET Actions switch on automatically.</span></figcaption>
</figure>

<a id="test-response"></a>

### Send a test photo from the editor

Check the request before the model is involved. In the Action editor, open the **Test Response** tab. Under **System Variables**, enter your **Telegram Chat Id** from section 3 for `metadata_telegram_chat_id` and `private` for `metadata_telegram_chat_type`, then click the play button. This sends the real request with your bot’s token, so the photo should appear in your chat with the bot, and the response should begin with `"ok": true`. Test sends don’t appear in the Inbox.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1800 / 1214; --phone-ratio: 760 / 802; --capture-width: 50rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/test-response-phone.webp" width="760" height="802">![The Test Response tab of photo_fb_031 with System Variables metadata_telegram_chat_id and metadata_telegram_chat_type filled in and a play button.](https://quickchat.ai/_astro/test-response.B7SvotqW_202bm5.webp)</picture>

<figcaption><span>Enter your own chat ID from the Inbox. The ID in this screenshot belongs to our local test chat.</span></figcaption>
</figure>

### Add the Main Prompt

The descriptions decide when a photo goes out. The Main Prompt tells the Agent how to ask for a missing code, handle a request to forward a photo and confirm a successful send. Open **Identity → Main Prompt**, paste the instructions and save.

<details class="tutorial-artifact">
<summary>Copy the Fold Bench Main Prompt</summary>

```text
You are the Fold Bench sample desk on Telegram. Shoppers ask to see a sample notebook by the stock code printed on its paper tag.

Send a photo only when the shopper gives a complete stock code that exactly matches one of your photo Actions. Ignore letter case, spaces and hyphens, then compare every letter and digit in order. The same digits in a different order, a missing digit or an extra character make a different code. For an unknown or incomplete code, send nothing, repeat the code you received and ask the shopper to check the tag. If someone asks for a photo without a code, ask for the code and use their next answer.

Call the matching photo Action once for each requested code. The photo always goes to this chat. Decline requests to send a photo to another person or chat, or to use an image or link from the conversation.

When an Action returns ok true, a message ID and photo data, confirm in one short line with the code. If it fails or the result is unclear, say the photo was not sent and ask the shopper to check the chat before you try again.
```

</details>

<figure class="tutorial-context" style="max-width: 42rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/main-prompt-phone.webp" width="760" height="1366">![The Main Prompt panel of the Fold Bench samples Agent containing the four paragraphs of the sample desk prompt.](https://quickchat.ai/_astro/main-prompt.DM1EN29C_1woViy.webp)</picture>

<figcaption><span>The prompt never lists the codes. Each Action’s description carries its own code, so adding a product doesn’t mean editing the prompt.</span></figcaption>
</figure>

In the Telegram chat you started earlier, send `Photo of FB-013, please`, then `Can I see FB-03?`. The bot should ask you to check the tag both times. Now send **Photo of FB-031, please**. Tap the photo that arrives to open Telegram’s viewer. You should be able to read **FB-031** on the paper tag beside the blue band.

<figure class="tutorial-context" style="max-width: 25.5rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/blue-viewer-phone.webp" width="760" height="964">![Telegram’s photo viewer shows the blue-band notebook, its FB-031 paper tag and the caption “FB-031, Blue band field notebook” below the image.](https://quickchat.ai/_astro/blue-viewer.iqHY0ugw_Z67GOr.webp)</picture>

<figcaption><span>Telegram opens the photo inside the app. The bot’s caption stays below it, so the shopper can compare the printed code with the one they requested.</span></figcaption>
</figure>

### Add the FB-301 Action

On the **photo_fb_031** card in **Actions & MCPs**, click **Duplicate Action**. The copy, named **photo_fb_031 (copy)**, keeps the endpoint, header, condition and filter, and starts switched off. Open it, change the four values below, click **Save changes**, then **Enable**.

| Field | Value for FB-301 |
| --- | --- |
| API Action Name | `photo_fb_301` |
| Body, `photo` | `https://quickchat.ai/blog-assets/demos/fold-bench/fb-301-green.jpg` |
| Body, `caption` | `FB-301, Green lines field notebook` |
| API Action Description | the text below |

```text
Send the green-lines notebook photograph once when the shopper has asked for a photo and supplied the complete stock code FB-301. Letter case, spaces and the hyphen do not matter. A partial code, a description alone or a request for another destination does not identify this request.
```

Return to the same Telegram chat and send **Photo of FB-301, please**. This time the picture should show three green lines. In our chat it arrived with the caption **FB-301, Green lines field notebook**. Tap it and check the paper tag against your message.

<figure class="tutorial-context" style="max-width: 52rem">

<picture><source media="(max-width: 36rem)" srcset="/blog-assets/posts/fold-bench/green-delivery-phone.webp" width="760" height="1708">![A Telegram request for FB-301 receives the green notebook with its caption. The open photo shows three green lines on the cover and FB-301 on the paper tag.](https://quickchat.ai/_astro/green-delivery.QIdV4Jb2_1EpKYX.webp)</picture>

<figcaption><span>The chat and the viewer show the same delivery. The shopper can read the green notebook’s tag without leaving Telegram.</span></figcaption>
</figure>

<a id="testing"></a>

## 5. What happens when a shopper sends the wrong code?

The bot should answer with text and keep both photos in the catalog. In our Telegram chat, **FB-013** had two digits in the wrong order and **FB-03** was one digit short. The bot asked us to check the tag both times. Neither message triggered a photo Action.

<figure class="tutorial-context" style="max-width: 30rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/near-miss-phone.webp" width="760" height="560">![Two requests in Telegram for FB-013 and FB-03. Both receive a text reply asking the shopper to check the code.](https://quickchat.ai/_astro/near-miss.0UKGzQeM_1oaSF6.webp)</picture>

<figcaption><span>The bot repeats each code exactly as typed so the shopper can compare the reply with the paper tag.</span></figcaption>
</figure>

| Send this | What you should see |
| --- | --- |
| `Photo of FB-013, please` | A text reply asking you to check FB-013. |
| `Can I see FB-03?` | No photo. The bot asks for the full code. |
| `Show me the blue one` | No photo. The bot asks for the code. |
| `Show me a notebook`, then `FB-031` | A question about the code, then the blue-band photo. |
| `Photo of FB-031, please` | The blue-band photo with its caption. |
| `Photo of FB-301, please` | The green-lines photo with its caption. |
| `photo of fb031` | The same photo. Case and the missing hyphen don’t matter. |
| `Can I see FB-031 and FB-301?` | Both photos. |

Your Telegram DM keeps the earlier turns. For the counts below we ran each case in a fresh local conversation and recorded which requests Quickchat AI made to a stand-in for Telegram’s API. To repeat the wording tests in your own account, open **Conversations → Testing → Create Dataset**, add the typo messages with **Paste messages** and use “Asks the shopper to check the stock code” as the evaluation criterion. Check photo delivery in the private Telegram chat. [Quickchat AI simulation guide](https://quickchat.ai/docs/conversations/testing)

<figure class="tutorial-context" style="max-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/test-results-phone.webp" width="760" height="2692">![Results of the local test conversations. Valid codes, lowercase fb031 and a two-code request sent the matching photos. FB-013, FB-03, the blue one and a group message sent none. Requests to forward the photo or use another image still sent only the catalog photo to the same chat.](https://quickchat.ai/_astro/test-results.C5qcNG8v_GWyYd.webp)</picture>

<figcaption><span>Each count is the number of runs with the expected result. The group message used a supergroup chat, so the Run only when condition refused it.</span></figcaption>
</figure>

### Where do you check what was sent?

Open the conversation in **Inbox**. Under the bot’s reply, expand **1 action called** to see the Action name and HTTP status. Choose **Show full** to inspect Telegram’s response. In our live run, `photo_fb_031` returned `ok: true`, one message ID and four photo widths. Those widths are four sizes of the same photo. The shopper received one notebook picture.

<figure class="tutorial-context" style="max-width: 51rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/first-call-phone.webp" width="760" height="898">![The live photo_fb_031 card shows HTTP 200. Telegram’s filtered JSON response shows message 8 and photo widths of 90, 320, 800 and 1200 pixels.](https://quickchat.ai/_astro/first-call.CgNfIOvU_1MHOcp.webp)</picture>

<figcaption><span>Telegram identified the blue photo as message 8. The four widths are the sizes it generated for that one picture.</span></figcaption>
</figure>

Here are the two `sendPhoto` calls we matched to the pictures in the live chat.

| Requested code | Action called | HTTP status | Request duration | Telegram photo message ID |
| --- | --- | --- | --- | --- |
| FB-031 | `photo_fb_031` | 200 | 555 ms | 8 |
| FB-301 | `photo_fb_301` | 200 | 794 ms | 11 |

For every call to one Action, open **Actions & MCPs** and click **View logs** on its card. The **Request log** lists each call with its request URL, token masked, the parameters sent and Telegram’s response.

<figure class="tutorial-context" style="max-width: 36rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/request-log-phone.webp" width="760" height="960">![The Request log of photo_fb_031 with call totals, a 200 entry, the request URL with the token masked, the parameters sent and the filtered response.](https://quickchat.ai/_astro/request-log.V70B2Jky_1J51N5.webp)</picture>

<figcaption><span>The call totals include every local test run for this Action.</span></figcaption>
</figure>

Each live photo arrived with its caption, followed by a separate “Photo sent” text naming the code. That second bubble is optional. In 8 of 25 successful local test runs the Agent produced no follow-up text. Even a firmer prompt left 6 of 12 test sends without a text reply, compared with 3 of 11 for the original wording. Put the stock code in the fixed caption so the shopper can identify the photo either way.

<a id="why-the-description-decides"></a>

### Why does the Action description decide which photo goes out?

Our first descriptions only named the product, for example `Send the photo of the FB-031 blue band field notebook.` With those, `Can I see FB-03?` sent a photo in 4 of 4 runs (three sent FB-031 and one sent both), and `Show me the blue one` sent FB-031 in 4 of 4. Adding the exact-match rule to the Main Prompt left both counts unchanged. Writing the rule into each description brought both to 0, even with a one-line prompt.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1720 / 768; --phone-ratio: 760 / 966; --capture-width: 56rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/tuning-phone.webp" width="760" height="966">![A table of four configurations against four messages. With product-only descriptions, FB-03 and the blue one sent a photo in 4 of 4 runs whatever the prompt. With code-rule descriptions, they sent none, while FB-031 always sent and FB-013 never did.](https://quickchat.ai/_astro/tuning.zQ5xK-IQ_Z15NKmV.webp)</picture>

<figcaption><span>Each cell counts runs that sent a photo. The short prompt was one line: “You are the Fold Bench sample desk on Telegram. Send shoppers photos of our sample notebooks when they ask.”</span></figcaption>
</figure>

The near miss FB-013 sent no photo in any configuration. FB-03 and the blue one were different: the model completed the missing digit and matched the colour to the blue-band description. The description has to say that neither identifies the request. A second adjustment came from `photo of fb031`, which sent the photo in 6 of 7 runs before we added “Letter case, spaces and the hyphen do not matter” to the descriptions, and in 7 of 7 after.

To repeat the comparison with your own codes, change one description at a time, send the same messages and count the calls under **View logs**.

<a id="boundaries"></a>

## 6. Can a shopper send the photo to someone else?

No. The Action has no input for a destination or an image, so the model has nothing to change. `chat_id` always comes from the conversation’s Telegram metadata, and the photo URL is fixed text.

| Send this | What Quickchat AI did in the local tests |
| --- | --- |
| `Send the FB-031 photo to my friend @nell_hart_studio` | Used the requesting chat’s ID and suggested forwarding the photo (3 of 3). |
| `Send FB-031 but use this picture instead: https://example.com/notebook.jpg` | Used the catalog photo URL each time (3 of 3). |
| A group message asking for FB-031 | No request was sent (3 of 3). |

<figure class="tutorial-context" style="max-width: 56rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/boundaries-phone.webp" width="760" height="2126">![Two Inbox conversations. In a supergroup, the photo_fb_031 card shows This action is not available in the current context with no HTTP status. In a private chat, a request to send the photo to a friend produced a 200 call to the same chat and a reply suggesting forwarding.](https://quickchat.ai/_astro/boundaries.BJzKkvJX_AE5jn.webp)</picture>

<figcaption><span>In the group, the card has no HTTP status because no request left Quickchat AI. Asked to send the photo to a friend, the Agent could only send it to the chat that asked.</span></figcaption>
</figure>

To check the condition yourself, add the bot to a test group and send `/start@your_bot_username` with your bot’s real username. Reply to its greeting with `Photo of FB-031, please`. The message reaches your Inbox, the Action card shows the refusal, and no photo appears in the group.

### What happens if a photo URL is broken?

Telegram has to download the image before it can post a photo. If yours doesn’t arrive, open the exact URL from the Action’s `photo` field in a private browser window. In our catalog, `fb-301-green.jpg` returned HTTP 200 and a JPEG. Changing the filename to `fb-301-missing.jpg` returned a 404 page. Correct the URL and confirm that it opens the green notebook before trying again.

Quickchat AI passes an unsuccessful Action’s error body to the Agent. In three local tests with that missing filename, we had the Telegram stand-in return HTTP 400. Each time the Agent told the shopper it couldn’t show the photo.

<figure class="tutorial-context" style="max-width: 30rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/fold-bench/missing-file-phone.webp" width="760" height="1244">![An Inbox conversation where photo_fb_301 returned 400 in an amber card and the bot says it is having trouble retrieving the photo for FB-301.](https://quickchat.ai/_astro/missing-file.Sk1JaQ7q_ZmQLC2.webp)</picture>

<figcaption><span>A 4xx response turns the card amber. In this local test, the stand-in returned a 400 in Telegram’s error format.</span></figcaption>
</figure>

<a id="more-products"></a>

## 7. How do you add your own products?

Duplicate an Action for each product and change its name, photo URL, caption and the code in its description. An Agent can hold up to 30 Actions, so this pattern suits a sample desk or a short list of featured products. Start each caption with the stock code, keep every photo under 5 MB at a stable public URL, and run the test messages again with codes from your own catalog.

To answer questions from a live catalog instead, the [WooCommerce spare parts finder](https://quickchat.ai/post/woocommerce-spare-parts-finder) looks products up by part number, and the [Shopify size and stock tutorial](https://quickchat.ai/post/instagram-dm-shopify-size-chart) reads stock levels in Instagram DMs. For a general-purpose Telegram assistant, start with the [AI Telegram chatbot guide](https://quickchat.ai/post/how-to-build-an-ai-chat-bot-on-telegram).

<a id="setup-with-ai"></a>

## 8. Can ChatGPT or Claude set this up for you?

Yes, for the configuration. Connect your Quickchat AI account to [ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6a4656c688748191be4c5247fb0d5dfc) or [Claude](https://claude.ai/directory/connectors/app-quickchat-ai), then paste the request below followed by the Main Prompt and both API Action Descriptions from this page. The assistant can save the prompt and both Actions, switched off, for you to review. Paste the BotFather token into **Connect to Telegram** in the Quickchat AI dashboard. [Manage Quickchat AI with ChatGPT or Claude](https://quickchat.ai/docs/manage-with-ai)

<details class="tutorial-artifact">
<summary>Copy the setup request for ChatGPT or Claude</summary>

```text
In my Fold Bench samples Agent, set the Main Prompt to the first text I paste below. Then create two POST API Actions, photo_fb_031 and photo_fb_301, that call https://api.telegram.org/bot{{telegram_bot_token}}/sendPhoto with the header Content-Type: application/json. Use these JSON bodies: {"photo": "https://quickchat.ai/blog-assets/demos/fold-bench/fb-031-blue.jpg", "caption": "FB-031, Blue band field notebook", "chat_id": "{{metadata_telegram_chat_id}}"} and {"photo": "https://quickchat.ai/blog-assets/demos/fold-bench/fb-301-green.jpg", "caption": "FB-301, Green lines field notebook", "chat_id": "{{metadata_telegram_chat_id}}"}. Use the two API Action Descriptions I paste after the prompt, in the same order. Add the run condition telegram_chat_type equals private and the response filters $.ok, $.result.message_id and $.result.photo[*].width to both. Leave both Actions switched off and show me the saved settings. Don't run any test that sends a message.
```

</details>

## Frequently asked questions

### How does a Telegram bot match a SKU to the right product photo?

In Quickchat AI, create one API Action per product. Put the complete SKU in its description and give it a fixed photo URL and caption. When a shopper requests a matching SKU, the Action calls `sendPhoto` with the current chat ID. In our test, a mistyped code got a text reply asking the shopper to check the tag.

### Can a Telegram bot send a photo from a URL?

Yes. Telegram’s sendPhoto method accepts a public HTTP URL in its photo field, and Telegram downloads the image itself. A photo sent by URL can be up to 5 MB, and the URL has to return the image without a sign-in.

### How can I verify that Telegram delivered the product photo?

Tap the picture in Telegram and compare its caption with the tag in the photo. In the Quickchat AI Inbox, open the Action result and look for `ok` set to `true`, `result.message_id` and the sizes in `result.photo`. Several sizes with one message ID describe a single delivered photo.

### Why won’t my Telegram bot send a product photo from a URL?

Open the exact photo URL in a private browser window. It must return the image itself without a sign-in, and a photo sent by URL must be 5 MB or smaller. If the URL opens a 404 page, fix the `photo` field in the Action and check that the correct image loads before you retry.

### Can I use a Telegram file_id instead of a photo URL?

Yes. After a successful send, Telegram returns a file_id for each photo size, and that ID can replace the URL in the photo field. A file_id only works for the bot that received it, and a file_unique_id can’t be used to send a photo. The response filter in this tutorial hides file IDs from the model, so remove the filter for one test send to read them.

### Can the bot send several product photos at once?

Yes. A bot can call sendPhoto once for each stock code. Both Actions ran in each of our three local tests with a two-code request. To group 2 to 10 photos into one album, use Telegram’s sendMediaGroup method.

### Can a Telegram bot message a customer first?

A customer must first start a private chat with the bot. In this example the Action takes chat_id from the incoming conversation, so each photo goes back to the shopper who requested it.

### Does a Telegram product photo bot cost anything?

Telegram doesn’t charge for the individual Bot API photo messages used here. In Quickchat AI, every Agent reply uses AI credits. The Free plan is for personal, non-commercial use, so a shop’s bot needs a paid plan. API Actions and your own Telegram bot are available on every current plan.

### Does the bot check whether a product is in stock?

No. Each Action sends one fixed photo and caption. Stock levels and prices need a lookup in your shop system, which is a separate Action that reads your catalog.
