The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Passing raw JSON object using {{webhookData}}

RobotGizmo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 26, 2021

We are using JIRA Automation and we have a rule setup to create an issue. We're using the "Additional fields" section but we want to pass the raw JSON from our server to the webhook. It looks like {{webhookData}} can only read string values, is this correct? I can do {{webhookData.fields.summary}} to read the summary but I want to just treat {{webhookData}} as actual JSON and not a string. That way we can control what gets set from our server that is calling the webhook.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Mark B Wager
Contributor
August 12, 2021

Hi @RobotGizmo 

Did you find an answer to your question?  I have been using Automations with both Incoming and Outgoing webhooks lately.  I've been unable to find a way to use a straight up {{webhookData}} smart value.  (My question is here.)

I can access fields within the JSON webhookData payload, as you suggested (e.g., {{webhookData.somefield}}. 

So, to send an outgoing webhook from Jira, I've had to manually format my JSON, pulling values from the incoming webhook (i.e., "description": "{{webhookData.somefield}}").

And to use the Additional Fields to create an issue, I've had to (i.e., "description": "{{webhookData.somefield}}") as described in the Atlassian Docs, replacing values with {{webhookData.field}} smart values from the webhook.

I'd love to know how you handled your issue.

Mark

Bill Dou
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 29, 2024

Hi Mark, I encountered same issue. Same as you, I want the automation wook to be as a middle hook to forward the original request to anther one. Have you found a good way to do it? I expect it would be like {{webhookData.toJson()}}.

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events