slack-github-action icon indicating copy to clipboard operation
slack-github-action copied to clipboard

Unable to send custom Emojis in message payload

Open grndvl1 opened this issue 1 year ago • 1 comments

Description

Unable to use custom emojis in a message. Is there a technique I am missing? Not sure why I can get this to work with the API but not with this action.

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [ ] enhancement (feature request)
  • [x] question
  • [ ] documentation related
  • [ ] example code related
  • [ ] testing related
  • [ ] discussion

Requirements (place an x in each of the [ ])

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

grndvl1 avatar May 29 '24 19:05 grndvl1

Hey @grndvl1 👋 Thanks for writing in about this! This seems unexpected to me, so I'm curious about the method you're using to post the message?

I'm finding that including custom emojis in either payload and slack-message seem to both work for me, both from a bot token and incoming webhook, so any other details would be helpful for troubleshooting!

zimeg avatar May 29 '24 19:05 zimeg

👀 Going to close this as stale - the latest @v2 version is now released! - since you're noticing this works with the API but not this action, though I'm still curious if this continues to happen in the latest release.

For future reference, this step sends a message with custom emoji in the current version:

- name: Send a message with custom emoji
  uses: slackapi/[email protected]
  with:
    errors: true
    method: chat.postMessage
    token: ${{ secrets.SLACK_BOT_TOKEN }}
    payload: |
      channel: ${{ env.SLACK_CHANNEL_ID }}
      text: "greetings :octocatted:"

Please feel free to comment or open a new issue if this seems to not continue to not work for you. I'd be interested in knowing of errors that might be returned too! 🙏

zimeg avatar Nov 16 '24 04:11 zimeg