# Telegram node: Possible to send flexible data for 'Reply Markup' = 'Inline Keyboard'?

**URL:** <https://community.n8n.io/t/telegram-node-possible-to-send-flexible-data-for-reply-markup-inline-keyboard/3835>\
**Category:** Questions\
**Created:** [January 16, 2021, 11:23am UTC](https://community.n8n.io/t/telegram-node-possible-to-send-flexible-data-for-reply-markup-inline-keyboard/3835 "2021-01-16T11:23:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrey-42](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/shrey-42/32/3437_2.png) [@shrey-42](https://community.n8n.io/u/shrey-42)\
**Post date:** [January 16, 2021, 11:23am UTC](https://community.n8n.io/t/telegram-node-possible-to-send-flexible-data-for-reply-markup-inline-keyboard/3835/1 "2021-01-16T11:23:31Z")

</div>

Hi.  
I would like to know if it’s possible to send custom data for ‘Inline Keyboard’?

Currently, to send data for Inline Keyboard, one has to fix the rows & buttons using the ‘Add Keyboard Row’ and ‘Add Button’ options.

What i would like to achieve is to send a varying set of rows and buttons everytime. This can currently be done via HTTP node by creating the Inline Keyboard payload programatically.

But, is this option also available in the current Telegram node and i’m not able to figure it out?  
Or, if it isn’t, could this feature be added to the node?

This is how i’m doing it currently:

```auto
{
  "nodes": [
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://api.telegram.org/bot<BOT_TOKEN>/sendMessage",
        "options": {},
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "chat_id",
              "value": <CHAT_ID>
            },
            {
              "name": "text",
              "value": "Test message"
            },
            {
              "name": "reply_markup",
              "value": "={{ JSON.stringify({inline_keyboard:[[{text:\"a\",callback_data:\"a\"}]] }) }}"
            }
          ]
        }
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        650,
        600
      ]
    }
  ],
  "connections": {}
}

```

Thanks.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [January 16, 2021, 6:39pm UTC](https://community.n8n.io/t/telegram-node-possible-to-send-flexible-data-for-reply-markup-inline-keyboard/3835/2 "2021-01-16T18:39:04Z")

</div>

No sorry. Currently, it is sadly only possible to define a fixed number of rows and buttons. So a HTTP Request node would be the only way to make that work currently.

What could be added in the future is an option to define them as JSON on the Telegram-Node. But it is always hard to keep the balance of making such things possible for the 1% and making at more confusing for the 99%.

A better solution would probably be adding something more generic to all nodes as described here:

> [@Custom API call for every service](http://community.n8n.io/t/custom-api-call-for-every-service/2990):
>
> Integromat team has nice habit: almost each service has API call module - if some action module is missing, I can read service’s API docs and make custom call. Example for HubSpot: It is like the HTTP module, but with working authentication and credentials reuse for specific service. If this will be in n8n it could be used for crowdcoding new modules - you see in analytics more users using it for specific endpoint, so ou can semi-automatically create …

---

<div class="post-metadata">

**Author:** ![shrey-42](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/shrey-42/32/3437_2.png) [@shrey-42](https://community.n8n.io/u/shrey-42)\
**Post date:** [January 17, 2021, 1:37am UTC](https://community.n8n.io/t/telegram-node-possible-to-send-flexible-data-for-reply-markup-inline-keyboard/3835/3 "2021-01-17T01:37:34Z")

</div>

> [@jan](#):
>
> What could be added in the future is an option to define them as JSON on the Telegram-Node.

Indeed, a quick solution could be something like what the HTTP node has: “JSON/RAW Parameters”.

This should certainly allow the flexibility required for advanced use while keeping the interface simple enough for most users.

Because, otherwise, everytime a HTTP node has to be used as a replacement, it creates a bit of a mess as the bot token:

- gets exposed, and

- has to be managed in the workflow.

Looking forward to whenever this feature can be added as well to the Telegram node.  
Thanks.
