Skip to main content

I am Tring to create a telegram post with image, but what I get is a link to the image file + the image, but clearly I would like to see only the image attached to the post, not the link to the airtable hosting as well

All the data are taken from an airtable sheet.

Any ideas on how to solve it?

 

 

 

Hi there @Bobonez,

I did some digging into this, and it seems like attaching an image to a message in Telegram is not possible at the moment. However, we do have an open feature request for this exact functionality.

I have added you as another interested member to the feature request. That does a few things:

  • Bring this to the attention of the integration developers
  • Help track interest in this feature being implemented
  • Allows us to notify you via email if this feature becomes available in the future

While I don't have an ETA on when this feature might be implemented, we will notify you via email if it is!

Hopefully, this helps.


Thank you very much!

 


You are most welcome @Bobonez! Glad I was able to add you to the feature request.

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 🤗


@ken.a I would like to be added to this feature request too, please. 


Hi there @pablog,

I have added you as another interested member to the open feature request. While we can’t provide an exact timeframe for the feature’s implementation. We will keep you in the loop via email once the feature has been shipped.

Thank you for your patience and understanding!


@ken.a can i be added also, thanks


Hi @organicpaul,

I have added you to the open feature request. We will let you know via email once the feature has been implemented.

Thank you!


@ken.a can i be added also, thanks


Hi @vleopardi,

I have added you as well to the open feature request. We will keep you in the loop via email once the feature has been shipped.

Thanks!


Hi There,

I noticed that the image url in the telegram post with image, is not working after two/three time zap is running.  The url opens a 404error page. I am not sure why this is happening.

thanks  for help

Valeria


Please implement this. We need this. Thanks 

 

URGENT, URGENT, URGENT


Hi @vleopardi and @horacechan,

 

I have added your votes for this feature request, and we’ll email you once an update is readily available. Thank you.


How to see the votes?

 


Hi @horacechan,

 

Votes are being sent internally with the developers but rest assured that your vote was casted and sent to the app developer. 


@JammerS Please upvote this for me and add me to the email list! This feature would be very useful.


Hi @darvinm,

 

I’ve added your vote for this feature request, and we’ll notify you via email once an update is readily available. Thanks.


same here, please add me as well

 


Hi ​@jakobaa,

I have added you to the feature request. We will keep you updated via email once the feature has been implemented.

Thank you!


FYI I have found a solution how to post a photo directly via the API (and not the Telegram Zapier Integration). 

Setup:

  • App: Code by Zapier
  • Event: Run Javascript

Configure:

  • Input Data:
    • botToken = ...
    • channelId = … 
    • photoUrl = …

  • Code:

// Get values from input
const BOT_TOKEN = inputData.botToken;
const CHANNEL_ID = inputData.channelId;
const PHOTO_URL = inputData.photoUrl;

async function testPhotoUpload() {
const url = `https://api.telegram.org/bot${BOT_TOKEN}/sendPhoto`;

try {
// First method: Using form-encoded parameters
const params = new URLSearchParams();
params.append('chat_id', CHANNEL_ID);
params.append('photo', PHOTO_URL);

const response = await fetch(url + '?' + params.toString());

return await response.json();
} catch (error) {
return {error: error.message};
}
}

return testPhotoUpload();

 


Wow ​@jakobaa,

 

Thank you so much for this work around. This will significantly help our Community that was dealing with the same issue.


Happy to help, but I have to give the credit to Claude :) 

I have slightly improved it since to also post a text message as photo caption (so it is one message and not two separate messages, which makes it easier for people to share and just looks cleaner).
I also disabled the link-preview as for my use case. 

Additional Input Data:

Updated Code;

// Get values from input
const BOT_TOKEN = inputData.botToken;
const CHANNEL_ID = inputData.channelId;
const PHOTO_URL = inputData.photoUrl;
const MESSAGE = inputData.message;

async function sendTelegramContent() {
try {
const params = new URLSearchParams();
params.append('chat_id', CHANNEL_ID);
params.append('parse_mode', 'HTML');
params.append('disable_web_page_preview', 'true');

// Check for a valid photo URL (not empty string)
let endpoint;
if (PHOTO_URL && PHOTO_URL.trim().length > 0) {
endpoint = 'sendPhoto';
params.append('photo', PHOTO_URL);
params.append('caption', MESSAGE);
} else {
endpoint = 'sendMessage';
params.append('text', MESSAGE);
}

const url = `https://api.telegram.org/bot${BOT_TOKEN}/${endpoint}`;
const response = await fetch(url + '?' + params.toString());

return await response.json();
} catch (error) {
return {error: error.message};
}
}

return sendTelegramContent();

 


Hey folks, 

Just stopping by to share that the feature request has been implemented! 😁🎉

The team have added a Send Photo action to the latest version of the Telegram app on Zapier, which allows images to be sent to Telegram:

1af469ea57ee805b50f5f1ebbae64516.png
Thanks so much for everyone’s patience on this. If you do give the Send Photo action a try and run into any issues, feel free to start a new topic or reach out to our Support team directly.

In the meantime, happy Zapping! ⚡️