Skip to content

Telegram Inline Keyboard Expression Issue #19955

Description

@Mati0n

Bug Description

When trying to provide an inline keyboard via expression in the Telegram node (e.g. Edit Message Text), n8n throws an issues:

The value "[[{"text":"Profile","callback_data":"profile"},{"text":"Retreats","callback_data":"retreats"}]]" is not supported!

I expect the node to accept a valid array of button rows as defined in the Telegram Bot API.

Actual behavior: n8n interprets the array as a string and rejects it.

To Reproduce

Create Telegram node - Edit a text message. Fill all creds and add code below for the Reply Markup expression (inline keyboard mode)

Minimal Example:

{{
(() => {
  return [
    [
      { text: "Profile",  callback_data: "profile" },
      { text: "Retreats", callback_data: "retreats" }
    ],
    [
      { text: "About", callback_data: "about" }
    ]
  ];
})()
}}

Expected behavior

The expression should evaluate to a JSON array and be passed directly to Telegram API as inline_keyboard.

Debug Info

Image Image

Operating System

Ubuntu Linux 22.04

n8n Version

1.112.4

Node.js Version

22.19.0

Database

PostgreSQL

Execution mode

main (default)

Hosting

self hosted

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions