Hello,
I want to send a slack message with webhook from JMWE app like it is in Jira native automation on a certain trigger.
How is it possible to post the webhook.
Hi @Tarieli Gvritishvili Good day!
In this case, you can use a Build-your-own (JMWE app) post-function, and use the callRest filter: https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465242995/callRest
Please find below example.
{% set payload = {
"channel": "#test-001",
"username": "webhookbot",
"text": "This is posted for #test-001 and comes from a bot named webhookbot.",
"icon_emoji": ":ghost:"
} %}
{% set webhook_url = "https://hooks.slack.com/services/T013H6GS22J/XXXXXX/XXXXXXXXXXoBJutA185uAWF" %}
{{ webhook_url | callRest(verb="post", body=payload) | dump(2) }}
I hope this helps!
BTW, I'm from Appfire, the vendor of JMWE app.
Thanks,
Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it possible to call issue fields into the body of the text? This is working well except that it is showing "... for {{issue.fields.customfield_10100}} was transitioned..." in the body of the slack message instead of the value of that field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is, but not using {{}} since you're building a string, not the output. So you would do:
"text":"for "+issue.fields.customfield_10100+" was transitioned"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.