Issue
The "Invoke Webhook or API" feature in Red Canary is failing with a "wrong array length" error when attempting to send a valid JSON payload to a Zoom webhook, even though the same payload works successfully using an external tool (Bruno).
The user is attempting to configure an API call within Red Canary to send a rich-text notification to a Zoom chat channel via a webhook using Zoom's Incoming Webhook Chatbot. The webhook is configured with the ?format=full query parameter to accept a structured JSON payload containing a head and a body with sections and actions. The API call fails consistently with the error message "wrong array length at 0 (expected 2, was 1)".
The user verified the same API call, URL, headers, and JSON payload in a third-party tool (Bruno), where it executes successfully, indicating the issue is specific to the Red Canary platform's handling of the webhook payload. This was tested on a personal Zoom account and can verify that Red Canary just doesn't handle the JSON for whatever reason, and throws an error even with very basic JSON such as: {"test": "ok"}
Steps to reproduce:
Navigate to the "Playbooks" page in Red Canary
Create a new "Invoke Webhook or API" action.
Set the HTTP Method to
POST.Enter the URL:
https://integrations.zoom.us/chat/webhooks/incomingwebhook/cHcVyuLxRey*******?format=fullAdd the following HTTP Headers (each on a new line):
Authorization: EKYkz7ubQL******Content-Type: application/json
6. Select "Custom Payload" and paste a simple, valid JSON object (e.g., {"test": "ok"}).
7. Click Save
8. Run the playbook
Actual behavior: The API call fails with the error "wrong array length at 0 (expected 2, was 1)".
Expected behavior: The API call should execute successfully, and a message containing the JSON payload should appear in the configured Zoom chat channel.
Environment
Red Canary - Automation
Zoom Incoming Webhook Chatbot
Resolution
TLDR: headers need to be formatted as header=value.
The issue was with the headers and not the payload. In the example you can see the headers are getting saved in the form like this (note the =****** which the form adds in after saving):
The form wants the headers to be in the header=value format like so
After saving the form they look like this (note the values correctly being rendered as ****** this time ):
Saving the form as so and executing resulted in a successful run:
Comments
0 comments
Please sign in to leave a comment.