Telegram Support Handler
ACTIONSends draft response previews to admin via Telegram with Accept/Edit/Reject inline buttons. Handles callback queries from Telegram. Stores pending responses persistently in a JSON file. Removes inline keyboard buttons after callback click to prevent double-clicks. Notifies Events pipeline on callback via internal chat API.
Endpoints
· 3POST/send-draftSends a draft support email response to the admin via Telegram, optionally with inline accept/edit/reject buttons
Input Schema
{
"type": "object",
"required": [
"emailFrom",
"emailSubject",
"draftResponse",
"emailId",
"workflowId"
],
"properties": {
"chatId": {
"type": "string",
"description": "Optional Telegram chat ID, falls back to ADMIN_CHAT_ID env var"
},
"emailId": {
"type": "string",
"description": "UUID of the original email"
},
"emailFrom": {
"type": "string",
"description": "Sender email address"
},
"workflowId": {
"type": "string",
"description": "UUID of the workflow — passed by the Events pipeline"
},
"emailSubject": {
"type": "string",
"description": "Email subject line"
},
"draftResponse": {
"type": "string",
"description": "The drafted response text"
},
"includeButtons": {
"type": "boolean",
"description": "Whether to include inline Accept/Edit/Reject buttons (defaults to true)"
}
}
}POST/handle-callbackHandles an admin callback decision (accept/edit/reject) for a pending draft, answers the Telegram callback query, and notifies the Events pipeline
Input Schema
{
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "Decision action: accept, edit, or reject"
},
"chatId": {
"type": "string",
"description": "Telegram chat ID"
},
"emailId": {
"type": "string",
"description": "UUID of the email"
},
"required": [
"action",
"emailId"
],
"messageId": {
"type": "number",
"description": "Telegram message ID"
},
"callbackQueryId": {
"type": "string",
"description": "Telegram callback query ID to dismiss loading"
}
}
}GET/pending-response/:emailIdRetrieves the pending draft response for a given emailId from the in-memory store
Required Secrets
· 2TELEGRAM_BOT_TOKENADMIN_CHAT_ID
✦
Similar ACTION Pieces
File Explorer
Web-based file explorer for browsing the workspace directory structure and viewing file contents with syntax highlighting. Read-only.
Voiceover Service
ElevenLabs-powered voiceover, sound effects, and music generation service. Used to add spoken narration and audio to media content.
R2 Asset Manager
Cloudflare R2-backed asset storage service. Handles uploads, URL imports, and file serving with globally accessible shareable URLs.