-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug The telegram_send_photo block always returns "Photo is required." even when a valid, publicly accessible photo URL is correctly passed to the photo field. The error originates from Sim's internal validation layer (handleBlockError in apps_sim_d66846e4._.js), not from the Telegram API itself — the request never reaches Telegram's servers. To Reproduce
Create a workflow with a Loop block (forEach) iterating over an array of photo objects containing url fields
Inside the loop, add a Function block that returns { photo: "https://example.com/valid-image.jpg", caption: "Test" }
Add a Telegram Send Photo block (telegram_send_photo operation) with:
photo: <functionblock.result.photo> (resolves to a valid, publicly accessible HTTPS URL)
chatId: valid chat ID
botToken: valid bot token
caption: any text
Run the workflow
The Telegram Send Photo block fails with: "Photo is required." Expected behavior The block should send the photo to the Telegram chat successfully, since the photo field contains a valid, publicly accessible HTTPS image URL (confirmed accessible via curl and browser). Screenshots Block input showing correct data (URL is a valid, accessible JPEG):
{
"photo": "https://srv1241545.hstgr.cloud/fotos/8596535930/9/foto_20260206_194041_0b8b0fb5.jpg",
"chatId": "8596535930",
"caption: 📸 Foto 1 de 2- ID 9",
"botToken": "[REDACTED]",
"operation": "telegram_send_photo"
}
Error output:
{
"error": "Photo is required."
}
Server logs:
[ERROR] [TriggerWebhookExecution] Webhook execution failed
{"error":"Telegram 2: Photo is required.",
"stack":"Error: Telegram 2: Photo is required.\n at o (/app/apps/sim/.next/server/chunks/apps_sim_d66846e4..js:1:21442)\n at handleBlockError (/app/apps/sim/.next/server/chunks/apps_sim_d66846e4..js:1:28539)",
"provider":"telegram"}
Additional context
Sim version: v5.88
Workaround: Replacing the native Telegram Send Photo block with an API (HTTP Request) block calling https://api.telegram.org/bot{token}/sendPhoto directly works perfectly — confirming the URL is valid and the issue is in Sim's internal handling of the telegram_send_photo operation.
The error is thrown before the request reaches Telegram's API (it's Sim's internal validation, not a Telegram rejection).
The photo URL was tested and confirmed working via: direct browser access (HTTP 200), curl -I (HTTP/2 200, content-type: image/jpeg), and the API block workaround.
This was tested inside a Loop block (forEach), but the issue may also occur outside loops.
Recreating the Telegram Send Photo block from scratch (deleting and adding a new one) did not resolve the issue.