Telegram · Send a photo — Sends a picture from your Telegram bot — and Telegram · Send a document — Sends a file from your Telegram bot — send a file to a chat your bot is in. A photo shows as a picture in the chat; a document as a file to download, kept exactly as it was.

Who can do this

Workspace Admins and Editors, on every plan. Viewers see the step's settings but cannot change them.

Before you start

  • A Telegram connection in this workspace, and the bot let into the chat — see Connect Telegram.
  • The file: either a file an earlier step brought into the run — a form upload, an email attachment — or an https address where the file can be fetched.

Steps

  1. Select + where the file should be sent. In the step picker, open Apps, select Telegram, then Send a photo or Send a document.
  2. In Connection, choose your Telegram connection.
  3. In Chat, choose the chat, or select Use a value and type a chat id.
  4. In Photo (or File) — A file from an earlier step, or an https address. — do one of these:
    • Drag the file in from Data from earlier steps, or type {{ and choose it — for example {{ $json.file }}. Put nothing else in the box, so the whole file is sent.
    • Type an https address — for example https://www.consulace.com/brochure.pdf. Telegram fetches the file from there.
  5. Optional: in Caption, the text shown under it.
  6. Select Run this step to send a test.

Output

Field What it is
id The message's id in the chat. Delete or pin it with this.
chatId The chat's id.
chat The chat's title, or the person's username or first name.
text The caption.
date When Telegram took it, in UTC.

Good to know

  • Telegram's size limits. A file sent from an earlier step: up to 10 MB for a photo, 50 MB for a document. A file Telegram fetches from an address: up to 5 MB for a photo, 20 MB for a document.
  • Photos are compressed by Telegram. To send a picture at full quality, use Send a document.
  • A photo must be a picture — JPG, PNG, WebP or GIF.
  • Caption is plain text, up to 1,024 characters.
  • Runs once per item, and the step may take up to 10 minutes to send a large file.
  • Files are kept with the run. A file from a run that has left the run history cannot be sent. See Pass files between steps.

If something goes wrong

What you see Why What to do
File is neither a file from an earlier step nor an https address Telegram can fetch. The box holds a file's name, an http address, or something else. Put only the file's {{ }} in the box, or an https address.
The file is no longer kept — the run it came from has left the history. The file's run was removed. Use a file from the current run.
Telegram refused: Bad Request: wrong file identifier/HTTP URL specified or Telegram refused: Bad Request: failed to get HTTP URL content Telegram could not fetch the address — it is private, too large, or not a file. Check the address opens in a browser without signing in, or send the file from an earlier step.
Telegram refused: Bad Request: IMAGE_PROCESS_FAILED Send a photo was given something that is not a picture. Use Send a document.
Telegram refused: Request Entity Too Large The file is over Telegram's limit. Send a smaller file, or a link to it with Send a message.
Telegram refused: Bad Request: chat not found The id is wrong, or the bot is not in that chat. Choose the chat from the list, or add the bot to it.
Chat is empty when the step ran — an earlier step may not have given the value it names. The chat value came out empty. Check the value it reads.