This topic was automatically generated from Slack. You can find the original thread here.
seems like with the telegram api on pipedream the link preview doesn’t work, cause if i send the same message manually it shows the preview
This topic was automatically generated from Slack. You can find the original thread here.
seems like with the telegram api on pipedream the link preview doesn’t work, cause if i send the same message manually it shows the preview
I’m sorry to hear that you’re having trouble with the Telegram API on Pipedream. It sounds like the link preview isn’t working as expected when you send a message. To help you better, could you please provide more details about the issue? Specifically, it would be helpful to know: 1. The exact Telegram component you’re using (e.g., “Send Message”, “Send Photo”, etc.). 2. The format of the message you’re sending (e.g., is it a simple text message with a URL, or are you using Markdown or HTML formatting?). 3. Any relevant code or settings you’re using in your Pipedream workflow. This information will help me understand the issue and provide a more accurate solution.
It’s sent via “Send Message” formatted as Markdown and without using any relevant code on pipedream
It’s possible that the Telegram API on Pipedream isn’t automatically generating link previews due to the way it’s handling Markdown formatting. In Telegram, link previews are generated by default unless they’re disabled in the user’s settings or the disable_web_page_preview
parameter is set to true
in the sendMessage
method. However, Pipedream doesn’t provide a direct way to control this parameter via the “Send Message” component. If you’re not using any relevant code in Pipedream, it might be worth trying to send the message as plain text instead of Markdown to see if that makes a difference. If you’re comfortable with writing code, you could also use a code step in Pipedream to make a POST request to the Telegram Bot API’s sendMessage
method directly, and ensure that disable_web_page_preview
is set to false
. Here’s an example of how you might do that: import { axios } from "@pipedream/platform"; export default defineComponent({ async run({ $ }) { const response = await axios($, { method: 'post', url: `https://api.telegram.org/bot<YOUR_BOT_TOKEN>/sendMessage`, data: { chat_id: '<YOUR_CHAT_ID>', text: '<YOUR_MESSAGE_TEXT>', parse_mode: 'Markdown', disable_web_page_preview: false, }, }); return response.data; }, });
Replace <YOUR_BOT_TOKEN>
, <YOUR_CHAT_ID>
, and <YOUR_MESSAGE_TEXT>
with your actual bot token, chat ID, and message text. Please note that this is just a workaround and might not solve the issue if it’s related to how Telegram’s API handles link previews with Markdown formatting. If this doesn’t work, I recommend reaching out to Pipedream’s support at https://pipedream.com/support for further assistance.
can you share some screenshots of what you’re seeing?
you mean in the telegram message ?
Messages I send are usually made up of two links, the first is a url that refers to a website, while the second to an online pdf document.
I want to send Telegram messages with a structure like this:
First Url: https://tinyurl.com/335jdpzz
Title entry: Lorem ipsum dolor sit amet
Second Url: https://tinyurl.com/5xap2jca
Usually if I send a message like this without Pipedream it shows the preview of the second url.
While on Pipedream it shows the previews only when I send it via the Telegram step of the workflow and it doesn’t work in the deployed workflow (obviously I have the voice “Disable Link Previews” to False).
A bit strange, don’t you agree ?
Sorry, I’m not following this portion:
While on Pipedream it shows the previews only when I send it via the Telegram step of the workflow and it doesn’t work in the deployed workflow (obviously I have the voice “Disable Link Previews” to False).
You’re saying the link unfurl works as expected sometimes but not others?
I’m saying that it shows the previews only when I send it via the Telegram step (see picture) while the deployed workflow doesn’t work
Let me know if you got it
Oh, interesting. can you help triage when you get a chance?
Hi , I’ve done 3 tests:
thanks for following my issue, I’m not using the plain text, can you try using HTML or markdown parse mode like my workflow? cause I have to format the text in bold/italic… so I tried only with these two modes and I don’t know for plain text.
Here it is my formatted message, I tried even in markdown but it doesn’t work. This is in HTML and doesn’t work even when putting the a tag.
Hi , I tried with Markdown format and see that the link preview works for my case. Would you mind updating your message follow my example?
Hi, I notice that as a test you always have the same links, my message takes the two links from the rss trigger which always generates new ones and not always the same ones. That’s probably why it’s showing it to you now. For me too, if I test the same link it works, but then when the flow is deployed it doesn’t show me the previews of the links taken from the rss trigger.
I can give you my rss feed if you want to test. Let me know
then I suspect the link in your RSS feed might not be available for preview. Because if it’s because of the action has bug, no preview would be show for all links
As I said when I test them from step it works, so seems strange
when I say “test from step” I mean this one https://pipedream-users.slack.com/files/U053LRJUTPB/F067MMG6TBR/screenshot_2023-11-30_at_5.45.47_pm.png