Hi all,Can you pass action dynamics fields to custom api webhook callFor example https://HIDDE...

  • 6 August 2020
  • 4 replies
  • 19 views

Badge

Hi all,

Can you pass action dynamics fields to custom api webhook call


For example https://HIDDEN.atlassian.net/rest/api/3/issue/{{action6.Response.key}}/transitions

Is this a valid use of dynamic fields?
image.png?pub_secret=48282e8286



🗨 Link to Slack thread

4 replies

Userlevel 2
Badge +2

I don’t think I understand the question @dalfonzo. You mean the URL as a dynamic field?

Badge

Hey JB, Oh sorry, I mean build custom integration webhook, specifically the destination URL using dynamic field that comes from a workflow action.

In this case, try to call an transition on a ticket, the webhook will look like this:

https://.../rest/api/3/issue/*<ticket-number>*/transition.

I create my custom integration with the payload and everything works, the problem is that the ticket number changes every time the workflow runs.

So I wanted to see if I can pass the ticket number that I got as response for Action #1

to the webhook URL on Action#2

Badge

We manage to solve this with help of the BC team. The secret sauce was you can call out the {{payload.<field>}} on the webhook URL and that "field" can be in your playload.

For example:

Webhook URL: https://api.com/v2/{{payload.servicedeskticket}}/transitions

Payload:
{"servicedeskticket":"SD-1234"}

and the url will change to

Thanks again guys!

@dalfonzo , This is exactly what I need to do (Jira, but on-prem instead of cloud) but I am wondering how you got the “Run Test” to work when there was no context for the dynamic field?  Did you have to add the context to the payload area before testing?  if so, would you mind sharing the syntax of the payload area with both the ticket and transition ids?

Reply