Skip to content

🐛 Issue: Cannot remove inline keyboard (attachments) when editing message #12

@vanovarderesyan

Description

@vanovarderesyan

Hi 👋

Thanks for maintaining this node — it’s very useful for integrating MAX bots into n8n 🙌

I’m encountering an issue when trying to remove inline keyboard buttons (attachments) after editing a message.


❗ Problem

When using the Edit Message operation in the MAX node:

  • Updating the text field works correctly
  • However, existing inline keyboard buttons remain attached to the message
  • There is no reliable way to remove them via the node

🔁 Expected Behavior

According to the MAX API:

  • Sending:
"attachments": []

should remove all attachments (including inline keyboard)

  • Sending:
"attachments": null

or omitting the field should keep existing attachments

After editing, the message should no longer display buttons.


🧪 Steps to Reproduce

  1. Send a message with inline_keyboard (Approve / Reject buttons)
  2. Capture mid (message_id)
  3. Use MAX node → Edit Message
  4. Try to remove buttons:
    • Set attachments to []
    • Or use expression: {{ [] }}

📌 Actual Behavior

  • Node throws error:
The value "[Array: []]" is not supported!

OR

  • Edit succeeds but:
    • attachments are not sent
    • previous buttons remain visible

🔍 Root Cause (likely)

It appears that:

  • The node does not support array-type input for attachments
  • Or it does not serialize empty arrays properly
  • Or it skips sending attachments when empty

As a result, MAX API treats the request like:

{
  "text": "Updated text"
}

Which keeps existing attachments.


🔧 Workaround

Using a raw HTTP Request node works correctly:

PUT https://platform-api.max.ru/messages?message_id=mid.xxxxx
{
  "text": "Updated text",
  "attachments": []
}

This correctly removes inline keyboard buttons.


💡 Suggested Fix

It would be great if the MAX node:

  • Supports attachments as an array input
  • Properly sends attachments: []
  • Does not convert arrays into invalid strings like [Array: []]
  • Or provides an option:
    • "Clear attachments"

📎 Additional Context

  • Use case: approval flow (Approve / Reject buttons)
  • After user clicks → message should update and buttons should disappear
  • This is a standard chatbot pattern (similar to Telegram inline keyboards)

🙏 Thanks!

Happy to provide:

  • request/response logs
  • workflow export
  • additional testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions