1 year ago
#358044
Anisha Gupta
creating slack modals using / commands not working
Hi i have been learning to create modals in slack using python flask. Can anybody help me with opening a model, basic enough using a /command. Thankyou !
#@app.route("/raise_issue", methods=\["POST"\])
def open_modal():
trigger_id = request.form\['trigger_id'\]
client.views_open(trigger_id=trigger_id, view={
"type": "modal",
'callback_id': 'first_view',
"title": {
"type": "plain_text",
"text": "First View"
},
"submit": {
"type": "plain_text",
"text": "Submit"
},
"close": {
"type": "plain_text",
"text": "Cancel"
},
'blocks': []
} )
return '', 200
python
flask
slack
slack-api
slack-commands
0 Answers
Your Answer