Skip to content

Unable to add variables to SLACK_CUSTOM_PAYLOAD #205

Open
@jdrcodes

Description

@jdrcodes

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:

SLACK_CUSTOM_PAYLOAD: { "author": "jdrcodes", "ticket_link": "Example text", "pr_link": "Example text", "description": "Example text", "title": "Example text" }

Any ideas?

Error sending message: Error on message: 400 Bad Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions