Forums

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

Send object with multiples keys in custom payload in jira automation

nik_shivamprajapati February 21, 2022

I have added automation in Jira to create issue events. I want to send attachment details of the issue in the format:

{

    "files":[ {

                    url:<url>,

                    filename:<filename>

                   }]

}

How to use smart values to create the above payload?

1 answer

1 accepted

3 votes
Answer accepted
Sebastian Krzewiński
Community Champion
February 22, 2022

Hi @nik_shivamprajapati 

 

Attachments field is a list and you need work with lists. Please take a look on this doc - https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-lists/

Also please take a look on this sample smart value. I didn't test it but with docs above you should be able to do this.

[{{#issue.attachment}}{"url":"{{url}}","filename":"{{filename}}"}{{^last}},{{/}}{{/}}]

Regards,

Seba 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events