<p>I want my Jenkins Pipeline to have a user input step where it posts to a slack channel and waits for user input then uses the input to user enters (button in the slack message).</p>

<p>So at the input step it posts to slack with a message that has buttons.</p>

<p>Then when a user clicks a button in slack a rest call or something hits Jenkins with the value of the button user pressed.</p>

<p>Is this possible?</p>

CC BY-SA 4.0
2019-02-05T19:41:06.107Z
Hi! Try this: https://stackoverflow.com/a/50606237/8442153  , or this: https://stackoverflow.com/a/49493403/8442153
dalmo.santos
CC BY-SA 4.0
2019-12-20T08:54:33.057Z
@dalmo.santos could you post this as an answer?
030
CC BY-SA 4.0
2019-12-20T16:51:29.980Z
This I think is just linking back to the jenkins job- user still needs to login to jenkins https://stackoverflow.com/a/49493403/8442153. This requires a POST https://stackoverflow.com/a/50606237/8442153 - how can you have slack send a POST request when a user clicks a button?
red888
CC BY-SA 4.0
2019-12-24T18:49:32.350Z
@red888 please clarify the flow. E.g. jenkins job runs and then it shows a button, the user clicks on the button, a message appears in Slack. Please verify whether this is correct. Please explain what you mean with `So at the input step it posts to slack with a message that has buttons`. Does this mean that a button should appear in Slack?
030
CC BY-SA 4.0
2019-12-24T19:15:37.323Z
yes so they dont have to log into jenkins at all. jenkins sends them a slack message with a button. they press the button in slack it sends jenkins some value
red888
<jenkins><jenkins-pipeline><jenkins-plugins><api><slack>
Can I use the Jenkins REST API with user input?
red888
# Can I use the Jenkins REST API with user input?

(Asked by: username_0 on 2019-01-31)

I want my Jenkins Pipeline to have a user input step where it posts to a slack channel and waits for user input then uses the input to user enters (button in the slack message).

So at the input step it posts to slack with a message that has buttons.

Then when a user clicks a button in slack a rest call or something hits Jenkins with the value of the button user pressed.

Is this possible?

**Tags:** jenkins, jenkins-pipeline, jenkins-plugins, api, slack

> **Comments:**
> **username_1**: Hi! Try this: https://stackoverflow.com/a/50606237/8442153  , or this: https://stackoverflow.com/a/49493403/8442153  
> **username_2**: @username_1 could you post this as an answer?  
> **username_0**: This I think is just linking back to the jenkins job- user still needs to login to jenkins https://stackoverflow.com/a/49493403/8442153. This requires a POST https://stackoverflow.com/a/50606237/8442153 - how can you have slack send a POST request when a user clicks a button?  
> **username_2**: @username_0 please clarify the flow. E.g. jenkins job runs and then it shows a button, the user clicks on the button, a message appears in Slack. Please verify whether this is correct. Please explain what you mean with `So at the input step it posts to slack with a message that has buttons`. Does this mean that a button should appear in Slack?  
> **username_0**: yes so they dont have to log into jenkins at all. jenkins sends them a slack message with a button. they press the button in slack it sends jenkins some value  

---

## 0 answers

