Can I Create a Workflow in Pipedream to Edit Messages in My Telegram Channel?

This topic was automatically generated from Slack. You can find the original thread here.

can I create a workflow in pipedream that edit messages in my telegram channel ?

Yes, you can create a workflow in Pipedream that edits messages in your Telegram channel. To do this, you would use the Telegram Bot API and set up a workflow with a trigger that suits your needs (like an HTTP webhook or a schedule), followed by an action that sends an edit message request to Telegram. Here’s a step-by-step guide: 1. Set up a Telegram Bot: If you haven’t already, create a Telegram bot by talking to BotFather on Telegram and get your bot token. 2. Create a New Workflow in Pipedream: Go to your Pipedream dashboard and create a new workflow. 3. Choose a Trigger: Select the appropriate trigger for your workflow. This could be an HTTP request, a schedule, or another event source. 4. Add a Telegram Bot Action: Search for the Telegram app in the Pipedream UI and select the action that allows you to edit messages. If you don’t find a pre-built action for editing messages, you can use a custom code step to call the Telegram Bot API’s editMessageText method. 5. Configure the Action: Enter the necessary details such as the chat ID, message ID, and the new text for the message you want to edit. 6. Deploy the Workflow: Once you’ve set up your trigger and action, you can deploy the workflow. If you need further assistance or have any specific questions about setting up the workflow, please let me know!

I set as you said, but there is no option to choose between html and markdown to format the edited text ?

To assist you effectively, could you please specify the context or platform you’re referring to? Are you working within a Pipedream workflow or another application? If it’s related to Pipedream, could you clarify which component or action you’re using that you expect to have HTML or Markdown formatting options?

yes I’m talking about the “edit_text_message” action of telegram on Pipedream

To use the “edit_text_message” action of Telegram on Pipedream, you’ll need to follow these steps: 1. Search for the Telegram app within the Pipedream UI. 2. Find the “edit_text_message” action from the list of available actions for Telegram. Unfortunately, without access to the Pipedream documentation or the Pipedream UI at the moment, I can’t provide you with the exact steps or code. However, if you need further assistance or have specific questions about using this action, please visit Pipedream’s support page for more help.

in Pipedream I can’t find the parse mode option when edit my telegram message ?

Based on the information provided, it seems you’re looking for a way to edit a message in Telegram using Pipedream. If you’re looking to specify a parse mode (like Markdown or HTML) for formatting the text of your Telegram message, you’ll typically need to include that in the API request to Telegram’s editMessageText method. While I don’t have direct access to the Pipedream UI or live data, I can provide you with an example of how you might set the parse mode in a Pipedream component that edits a Telegram message: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { telegram: { type: "app", app: "telegram", }, }, async run({ steps, $ }) { const chatId = 'your-chat-id'; // Replace with your actual chat ID const messageId = 'your-message-id'; // Replace with the ID of the message you want to edit const text = 'Your new message text'; // Replace with the new text of the message const parseMode = 'Markdown'; // Or 'HTML', depending on your formatting needs return await axios($, { method: "post", url: `https://api.telegram.org/bot${this.telegram.$auth.oauth_access_token}/editMessageText`, data: { chat_id: chatId, message_id: messageId, text: text, parse_mode: parseMode, }, }); }, }); Please replace 'your-chat-id', 'your-message-id', and 'Your new message text' with the actual values for your use case. The parse_mode parameter can be set to 'Markdown' or 'HTML' to enable different text formatting options in your edited message. If you’re not seeing an option to set the parse mode in the Pipedream UI, it’s possible that the pre-built Telegram component for editing messages doesn’t expose this parameter. In that case, you might need to use a custom code step like the one above to include the parse_mode parameter in your request. If you need further assistance with this, or if there’s anything else you’d like to know, please let me know!

here it is the official documentation where is present the parse mode Telegram Bot API