<Short description>Telegram inline button callbacks fail with missing_message_id because callback_data is missing messageId segment
Have you checked for existing requests?
- [x] I have searched the existing issues and found no similar request.
Affected Component
⚡ Triggers & Webhooks
Deployment Environment
Self-Hosted (Docker Compose)
ChatbotX Version
latest
Describe the bug
When a user presses an inline button on a Telegram message sent by ChatbotX, the callback processing fails with missing_message_id, and the flow does not advance to the next node.
Environment:
ChatbotX self-hosted via chatbotx-docker-compose
Images: ghcr.io/chatbotxio/chatbotx-builder:latest, ghcr.io/chatbotxio/chatbotx-worker:latest (also reproduced on :main)
PostgreSQL 18 + pgvector
Telegram channel connected via BotFather token
Steps To Reproduce
Create a Flow with a Send Message node that contains inline buttons. Each button is configured with Start Another Node and points to the next node. Publish the Flow. Send any message to the Telegram bot to trigger the Flow. The bot sends the message with inline buttons. Press any inline button.
Expected behavior
The flow should advance to the target node.
Screenshots or Error Logs
Actual behavior:
The flow does not advance. The following error appears in worker-integration:
{"level":"WARN","module":"worker","workspaceId":"11726005393733708","conversationId":"11727157273376003","contactId":"11727157272704778","buttonId":"11727044723907199","reason":"missing_message_id","msg":"[rich-response] cannot resolve rich button payload"} {"level":"ERROR","module":"worker","err":{"type":"ModelNotfoundException","message":"Flow not found",...},"msg":"Job 15 has failed"}
Root cause analysis:
We inspected the Redis queue and the database to compare what ChatbotX sends to Telegram versus what it stores locally.
1. What ChatbotX stores in the database (Message.contentAttributes):
{ "type": "template", "flowId": "11727386099137343", "nodeId": "11726413056834080", "stepId": "11727044553989119", "payload": { "buttons": [ { "id": "11727044723907199", "label": "СТО", "postback": "11727386099137343::11727044723907199:::11727468808970927", "buttonType": "postback" }, { "id": "11727044868298766", "label": "стоматология", "postback": "11727386099137343::11727044868298766:::11727468808970927", "buttonType": "postback" } ], "templateType": "button" } }
Note the postback format: flowId::buttonId:::messageId (three segments, separated by :: and :::).
2. What Telegram actually sends back in the callback (callback_query.data):
From Redis queue bull:integration:109:
{ "type": "incomingMessage", "data": { "integrationType": "telegram", "integrationIdentifier": "8448745860", "payload": { "update_id": 274706810, "callback_query": { "id": "2591295110279923850", "from": { "id": 603332908, ... }, "message": { "message_id": 61, "from": { "id": 8448745860, "is_bot": true, "username": "infoBezByBot" }, "chat": { "id": 603332908, ... }, "text": "что вас интересует?" }, "data": "11727386099137343::11727044868298766" } } } }
Note the data format: flowId::buttonId (two segments, no messageId).
3. The mismatch:
The callback_data that ChatbotX sends to Telegram does not include the messageId segment that it stores locally and expects when processing the callback. As a result, worker-integration cannot resolve the button payload and fails with missing_message_id.
Additional notes:
The same Flow works correctly in Webchat (buttons advance to the next node).
Reproduced on both
:latestand:mainimage tags.The issue is specifically in the Telegram integration:
callback_datais constructed without themessageIdsegment, but the worker expects it.
Possible fix:
Ensure that the callback_data sent to Telegram includes the messageId segment in the same format as stored in Message.contentAttributes.postback (flowId::buttonId:::messageId). Alternatively, adjust the worker to parse the two-segment format that Telegram actually returns.
Impact:
Inline buttons are unusable in Telegram, which blocks all interactive flows (menus, branching, multi-step dialogs) for Telegram channels.
Additional findings — format mismatch confirms root cause:
According to the official ChatbotX Dynamic Content documentation, button payloads should be structured with an actions array to trigger flows :
{"actions":[{"action":"send_flow","flow_id":"5854739484"}]}The documentation explicitly states: "Since the payload property of a button or Quick Reply requires a string data type, you need to serialize the object containing the actions array into a JSON string" .
However, in our self-hosted instance, the Message.contentAttributes stores the button payload in a legacy postback format:
"postback": "11727386099137343::11727044723907199:::11727468808970927", "buttonType": "postback"
This postback format uses delimiters :: and ::: to encode flowId, buttonId, and messageId as a single concatenated string.
The mismatch:
The Telegram integration constructs callback_data without the messageId segment, while the worker expects the full postback string stored in the database. This inconsistency — likely a regression where the Telegram adapter was not updated alongside the new actions-based payload format described in the documentation — is the direct cause of the missing_message_id error.
Reference: https://chatbotx.io/docs/automation/dynamic-content
Thanks for the detailed report. We looked into it, but we can't reproduce it: on current main, inline buttons on Telegram ("Start Another Node", "Send Message") move the flow to the next node as expected.
A few corrections to the analysis:
- The last segment of the postback is not a
messageId. The payload is positional,flowId:flowVersionId:buttonId:broadcastId:sequenceStepId:contactInboxId:…. So11727386099137343::11727044723907199:::11727468808970927means flowId + buttonId + contactInboxId. Telegram'scallback_data(flowId::buttonId) leaves out the contactInboxId on purpose. The flow needs only flowId and buttonId to continue, and both are there. messageIddoesn't come fromcallback_data. It's the id of the incoming message we store for the tap. Also, themissing_message_idline is just a warning on the AI rich-response path. The flow keeps going after it.- The
actionsJSON format is only for Dynamic Content. It's for payloads returned by an external API or an AI agent. It doesn't replace flow-builder button payloads, so there's no legacy/new format mismatch. ModelNotfoundException: Flow not foundcomes from the ref-link handler (e.g./start <ref>), not from the button handler. It looks like a separate job (Job 15) where a ref link points to a flow that doesn't exist in that workspace.
When a button is tapped, the flow follows the edge drawn from that button on the canvas. If the published version has no such edge, the tap does nothing and logs no error, which matches what you describe. Could you please:
- Check that each button has an edge to its target node, then publish the flow again
- Share the exact image digest (
docker inspect <container> --format '{{.Image}}') - Share the full worker logs for the tap job, especially any
runFlowPostback: …lines - Tell us whether the bot was opened via a
t.me/<bot>?start=…link - If it still fails, attach an export or screenshot of the flow
Re: inline buttons on Telegram do not advance the flow
Thanks for the detailed reply. I went through the checks you asked for. I believe I can now show exactly where the chain breaks. Below is the evidence, step by step.
- The callback reaches Builder
Builder logs show the tap arriving from Telegram:
text {"level":"INFO","time":"2026-10-10T16:39:10.882Z","module":"builder","integrationType":"telegram","contentLength":903,"msg":"Webhook request body"} {"level":"INFO","time":"2026-10-10T16:39:11.942Z","module":"builder","integrationType":"telegram","contentLength":903,"msg":"Webhook request body"} contentLength: 903 is the callback_query payload. So the tap is delivered to ChatbotX.
- The job is created in Redis and is marked as finished
bull:integration:149:
text name: incomingMessage data: {"type":"incomingMessage","data":{"integrationType":"telegram","integrationIdentifier":"8448745860","payload":{"update_id":274706842,"callback_query":{..., "message":{"message_id":81, ...}, "data":"11731781619249419::11727044868298766"}}}} processedOn: 1791650351955 finishedOn: 1791650352190 So Builder enqueues incomingMessage with the callback_query, and the worker consumes it and marks it as finished. The job is not stuck in the queue.
- The published version contains the correct edge
FlowVersion for flowId = 11731781619249419, latest published version (isLatest = t):
text {"id":"11727044723907199","source":"11726413056834080","target":"11727044839364640","sourceHandle":"11727044723907199","targetHandle":"11727044839364640"} {"id":"11727045828451077","source":"11727044839364640","target":"11727045950134858","sourceHandle":"11727045828451077","targetHandle":"11727045950134858"} {"id":"11727045981543151","source":"11727044839364640","target":"11727046099344256","sourceHandle":"11727045981543151","targetHandle":"11727046099344256"} {"id":"11727046468376671","source":"11727044999600276","target":"11727046880238013","sourceHandle":"11727046468376671","targetHandle":"11727046880238013"} {"id":"11727046912317758","source":"11727044999600276","target":"11727047010196060","sourceHandle":"11727046912317758","targetHandle":"11727047010196060"} {"id":"11727044868298766","source":"11726413056834080","target":"11727044999600276","sourceHandle":"11727044868298766","targetHandle":"11727044999600276"} The edge sourceHandle = 11727044723907199 (button "СТО") is present and points to target = 11727044839364640 (Send Message #2). The button and edge are correctly configured and published.
- The worker logs nothing
text $ docker compose -p chatbotx logs worker-integration --since 20m (no output) No runFlowPostback, no missing_message_id warning, no error, no ModelNotfoundException, nothing. The job is consumed, finishedOn is set, and yet the worker does not emit a single line about what it did with the callback_query.
- runFlowPostback is never enqueued
After the tap:
text $ docker compose -p chatbotx exec redis redis-cli keys "bull:*" | grep -i postback (no output) The follow-up job that should advance the flow is not created.
- callback_data matches what you described
text
data: "11731781619249419::11727044868298766"
This is flowId::buttonId — the exact positional format you described. There is no contactInboxId segment, as you said there wouldn't be, and no messageId. Both flowId and buttonId are correct and both resolve to real, published objects. The job that fails is not a ref-link job (/start ); it is a callback_query, and no ref link was used — the bot was opened via t.me/
- Image digest
text builder: sha256:7d59e07a3d495c961b993010e9ba7ba00a94ad73a41c2ddaeddeb92d3288cdd4 Where the chain breaks
text Telegram → Builder ✅ (contentLength: 903) Builder → Redis (incomingMessage) ✅ (bull:integration:149) Worker → consume job ✅ (finishedOn set) Worker → enqueue runFlowPostback ❌ (not in Redis) Worker → advance flow ❌ (no log line, no next node, no error) Everything up to "worker consumed the job" is provably correct: the published version has the edge, the button has a valid sourceHandle, the flowId and buttonId in callback_data match published rows, and the job is finished rather than stuck. What does not happen is the transition itself — the worker consumes the callback_query, does not enqueue runFlowPostback, and returns without logging why.
Could you help me with a few questions, so I can rule out a configuration issue on my side?
Under what conditions does the integration worker enqueue runFlowPostback after processing a Telegram callback_query?
Which log line is expected when it does? I'd like to grep for it to confirm whether that branch is reached at all.
Are there any environment or configuration prerequisites (a Redis key, a contact-inbox link, a channel/inbox setting, a webhook field, an allowed_updates entry) that, if missing, would cause the worker to silently skip enqueueing runFlowPostback without logging an error?
I can attach the full flow export, docker inspect output, and a longer worker log capture if useful.
Thanks, this is much more useful. It rules out a missing edge.
One thing to clarify: the incomingMessage job only receives and stores the tap. It doesn't advance the flow. When the tap is accepted, that job enqueues a separate job named runFlowPostback, delayed by about 2 seconds, and that job moves the flow to the target node. So finishedOn on job 149 is expected even when the flow doesn't advance. The question is whether runFlowPostback was created and what happened to it.
Some of the paths that drop a tap don't log at the default info level, so an empty log doesn't tell us much yet. Could you capture the logs once more with debug enabled?
- Set
LOG_LEVEL=debugon all worker services and restart them. - Send a message to the bot, then tap a button.
- Send us all the logs from every service for that window, unfiltered.
Please attach the full logs rather than grepping them. The line we care about may not contain runFlowPostback or telegram.
Thanks a lot for the detailed help and for pointing me in the right direction. It turned out to be a mistake on my side: the flow was not published after my last edits, so the published version did not contain the edge I was expecting. Once I re-published the flow, the button tap advanced to the next node as intended.
Everything is working now. I really appreciate the time and patience you put into helping me diagnose this — the hints about runFlowPostback and LOG_LEVEL=debug were especially useful and helped me understand how the tap is actually processed.
Closing this issue as resolved. Thanks again, and sorry for the noise.