I think I have a simple formatting issue, but after hours of moving stuff around, I just can’t get the syntax right. I bet someone out there will see the error verry quickly. I’m working in “developer tools” | “actions” to test an api to slack. Connections aren’t a problem and the api, when called from curl works fine. Here’s the way I have formatted a test call to the API. Payload syntax appears to be the issue. The X’s below just hide my real channel ID.
action: rest_command.slack_api
data_template:
api: 'chat.postMessage'
payload: >
{
"channel": "XXXXXXXXXXX",
"text": "This is from actions",
"attachments": '[]'
}
When I run the action I get:
content:
ok: false
error: invalid_arguments
response_metadata:
messages:
- "[ERROR] missing required field: channel"
status: 200
1 post - 1 participant