Hey everybody, I'm trying to implement a notificat...
# ask-community
t
Hey everybody, I'm trying to implement a notification with a Custom Webhook to perform actions in a JIRA system. Sadly the documentation lacks notifications and especially the Custom Webhook ones. Is there anyone who implemented a Custom Webhook and can give me a example how to pass things such as Flow name, link to the flow run etc.? Thanks you
j
Hi Timo.

This video

showing how to set up a custom webhook might be helpful. Below is an example with an email block that uses Jinja templating to dynamically populate content from my webhook fields (in this example GitHub issue info). If you want a flow run to serve as an automation trigger instead of a webhook, you can run your flow. Then, on the Event Feed tab you can click on the name of the event (e.g. flow run scheduled), then click on the three dot menu in the top right of the page and select Automate. Set the trigger as you desire and on the next screen, if you select Call a webhook you’ll see a bunch of dynamic flow_run Jinja:
Copy code
{
  "message": "Flow run {{ flow.name }}/{{ flow_run.name }} observed in state `{{ flow_run.state.name }}` at {{ flow_run.state.timestamp }}.\nFlow ID: {{ flow_run.flow_id }}\nFlow run ID: {{ flow_run.id }}\nFlow run URL: {{ flow_run|ui_url }}\nState message: {{ flow_run.state.message }}"
}
This is assuming you have a webhook for your Jira task. You might want to get your info into Jira another way. We don’t have a prebuilt notification block type for Jira. Please let me know if you have any questions.
I also made a PR to the Jinja templating section of the docs referenced above to improve clarity.