❄️ Winter Sale: 40% OFF AIWU
WINTER_SECRET
Valid until Mar 1st
Telegram: Send, Edit & Delete Message - AIWU – AI Plugin for WordPress
Table of Contents
< All Topics

Telegram: Send, Edit & Delete Message

Introduction

This article explains how to use the Send MessageEdit Message, and Delete Message Telegram actions in AIWU. These actions allow you to automate sending, editing, and deleting messages in Telegram channels and groups.

Why use these actions?

  • Automated customer notifications
  • Time-limited promotions and promo codes
  • Dynamic message updates
  • Auto-deletion of outdated content

Send Message

The Send Message action sends a new message to Telegram.

Send Message action settings panel showing Account selector, Text field with HTML support, Parse Mode, Web Page Preview and Notification options

Settings:

FieldDescription
AccountSelect your connected Telegram bot
TextMessage text (supports variables and HTML formatting)
Parse ModeText format: None (plain text), HTML, or Markdown
Disable Web Page PreviewDisable link previews in the message
Disable NotificationSend message silently (no sound)

Output Variables:

After Send Message executes, you get these variables for use in subsequent nodes:

  • Message Sent Successfully — delivery status (true/false)
  • Message ID — unique message identifier (required for Edit/Delete)
  • Chat ID — chat identifier
  • Chat Type — type of chat (private/group/supergroup/channel)
  • Message Date — send time (Unix timestamp)
  • Message Text — the sent message text

Edit Message

The Edit Message action modifies the text of an already sent message.

Edit Message action settings panel with Account selector, Message ID field and New Text input

Settings:

FieldDescription
AccountThe same Telegram bot that sent the original message
Message IDID of the message to edit
New TextNew message text
Parse ModeText format

How to get Message ID?

Click Variables next to the Message ID field. A popup will appear with available variables from previous nodes:

Variables popup showing Message ID option from Send Message node with arrow pointing to the selection Select Message ID from the Send Message node. This inserts a variable in the format: {{node#2.message_id}}

Select Message ID from the Send Message node. This inserts a variable in the format: {{node#2.message_id}}


Delete Message

The Delete Message action removes a message from the chat.

Delete Message action settings panel with Account selector and Message ID field using variable reference

Settings:

FieldDescription
AccountTelegram bot
Message IDID of the message to delete

Use the same approach as Edit Message — click Variables and select the Message ID from the Send Message node.


Example Workflow

Here’s a workflow that demonstrates all three actions working together:

Complete workflow with 7 nodes: Manually trigger, Send Message, Delay, Edit Message, Delay, Delete Message, and final Send Message

Structure:

[1] Manually (trigger)
    ↓
[2] Send Message — initial message
    ↓
[3] Delay — wait until specific time
    ↓
[4] Edit Message — update message content
    ↓
[5] Delay — wait 30 minutes
    ↓
[6] Delete Message — remove the message
    ↓
[7] Send Message — new message

Key Points:

  1. Send Message [2] sends the initial message and outputs message_id
  2. Edit Message [4] uses {{node#2.message_id}} to reference that message
  3. Delete Message [6] uses the same {{node#2.message_id}} to delete it
  4. Send Message [7] creates a completely new message (new message_id)

Important Notes

  • Message ID is only available within a single workflow run
  • Use the same bot for Edit and Delete that originally sent the message
  • Telegram allows editing messages only within 48 hours
  • Bots can only delete their own messages (or any message in a group if the bot is an admin)
  • The Delay node is useful for scheduling edits or deletions at specific times
Scroll to Top