Open jdrcodes opened 1 month ago
Hello there! I took a look at this payload and it doesn't seem quite right. Might help taking a look at Slack's Advanced Message Formatting, and for further reading, it might help looking at Slack's Message Payloads.
For some of the variables you're trying to set, there are equivalent environment variables such as for author, you can use SLACK_MSG_AUTHOR
to specify author. You can find a reference list of all the variables in the readme.
You can specify them using environment variables in the following manner:
env:
SLACK_MESSAGE_AUTHOR: "${{ steps.set-payload.outputs.PAYLOAD_AUTHOR }}"
Hello!
I am trying to make an automation when a user creates a pull request that sends a message to a Slack Channel.
SLACK_CUSTOM_PAYLOAD only admits an string that has to be a JSON, but when I use variables it always returns an 400 error and it does not work, even though the log replaces correctly the variables.
SLACK_CUSTOM_PAYLOAD: | { "author": "${{ steps.set-payload.outputs.PAYLOAD_AUTHOR }}", "ticket_link": "Example text", "pr_link": "Example text", "description": "Example text", "title": "Example text" }
Log:
Any ideas?
Error sending message: Error on message: 400 Bad Request