Question : I want to send a message in my slack channel and get that text back from the bot present in the channel using github actions.
Tried: I have used the slack send github action where I have a github action workflow with the following code.
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.18.0
with:
channel-id: 'C032NCAKJPR'
slack-message: "Does it Work"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
With this whatever I enter in the slack-message will be sent in the channel by the bot. I am not sure how to proceed with getting the data from the channel and then passing that into this workflow so the bot sends the same text back.