-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
When using Teable's automation feature to execute an HTTP request, specifically targeting a WeCom (Enterprise WeChat) bot webhook, the JSON request body containing arrays of objects is incorrectly re-parsed. Instead of sending the actual array of objects, Teable appears to transform structures like [{...}] into [0] and [{}, {}] into [0, 1].
To Reproduce
Steps to reproduce the behavior:
- Go to 'Automations' section within Teable.
- Click on 'Create Automation'.
- Add an 'HTTP Request' action to the automation workflow.
- Configure the HTTP request:
- Set the request method to
POST. - Set the Request URL to WeCom bot webhook URL(Or any other URL).
- In the "Body" section, select "raw (JSON)" and provide a JSON payload that includes an array of objects. For example, according to the WeCom documentation (文本通知模版卡片), a
template_cardwith ajump_listorhorizontal_content_listmight be used:{ "msgtype": "template_card", "template_card": { "card_type": "text_notice", // ... other template_card fields "jump_list": [ { "type": 1, "url": "[https://www.example.com](https://www.example.com)", "title": "More" } ], "horizontal_content_list": [ { "keyname": "Item 1", "value": "Detail 1" }, { "keyname": "Item 2", "value": "Detail 2" } ] // ... other template_card fields } }
- Set the request method to
- Test the automation.
- Observe the request received by the WeCom bot.
- See error: The WeCom say Warning: wrong json format. invalid Request Parameter, you will see that the
jump_listwas sent as[0](if it had one item) orhorizontal_content_listwas sent as[0, 1](if it had two items), instead of the actual object data.
Expected behavior
The HTTP request action in Teable should send the JSON request body exactly as configured. Arrays of objects, such as [{ "type": 1, "url": "https://www.example.com", "title": "More" }], should be transmitted as is, without Teable re-parsing or transforming them into arrays of indices like [0]. The WeCom bot webhook should receive the full, correct JSON structure as defined in the WeCom API documentation.
Screenshots
Client (please complete the following information):
- OS: windows 10
- Browser: Edge
- Version: 136.0.3240.64
Platform (Please tell us which deployment version you are using)
Both teable.io and docker-standalone
Additional context
The core issue is the unexpected re-parsing of JSON arrays within the HTTP request body by Teable's automation. If the request body is configured with an array like [{ "key": "value" }], Teable sends [0]. If configured with [{ "key1": "value1" }, { "key2": "value2" }], Teable sends [0, 1]. This behavior makes it impossible to correctly send structured data to APIs, such as the WeCom bot API, which rely on specific array-of-object formats.

