Passing raw JSON object using {{webhookData}}

RobotGizmo 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

0 votes
Mark B Wager 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

Suggest an answer

Log in or Sign up to answer