How do I create or update an issue with ATTACHMENTS from incoming WEBHOOK trigger
Asked by Mark B Wager:

#### ++**My Situation:**++ {#toc-hId--571152729}

I have an **Automation with an Incoming webhook trigger** set-up. I'm receiving form-data from Cognito forms and creating new Jira issues, populating fields using the webhook form content.

This works great, but **I can't find a way to attach the attachments coming in** from Cognito on the webhook.

**++I can see/log the attachment information:++**

* {ContentType=application/pdf, Id=F-z333dkeEeurKk83p9E, IsEncrypted=true, Name=Project-Roadmaps.pdf, Size=105369, File=<https://www.cognitoforms.com/gd/U66ilZz88ekdhIjYlTTk854w5Q?token=a3dkKHjug_ZzXekdh66Xx4$$R$$>}

**++I can parse the file data:++**

* File Name is "Project-Roadmaps.pdf"
* File Location is "<https://www.cognitoforms.com/gd/U66ilZz88ekdhIjYlTTk854w5Q?token=a3dkKHjug_ZzXekdh66Xx4$$R$$>"

Note: The above links don't work here for obvious reasons.

#### **++Attachments:++** {#toc-hId-1916360104}

1. I select "Attachment" in the "Choose fields to set..."
2. Then I see only "Copy value from" -- but nothing related to the webhook.

**Is there a way to save attachments coming into the webhook?** {#toc-hId--592158937}
-------------------------------------------------------------------------------------

![2021-02-17 15_58_50-Project automation - incoming webhook - JIRA.png](https://community.atlassian.com/t5/image/serverpage/image-id/130974i046E8979A42892A5/image-size/large?v=v2&px=999 "2021-02-17 15_58_50-Project automation - incoming webhook - JIRA.png")![2021-02-17 16_00_25-Project automation - Create and Attach - JIRA.png](https://community.atlassian.com/t5/image/serverpage/image-id/130975i8CAD090D15309B3E/image-size/large?v=v2&px=999 "2021-02-17 16_00_25-Project automation - Create and Attach - JIRA.png")


Answers:
author: Bill Sheboy
body: Hi [@Mark B Wager](/t5/user/viewprofilepage/user-id/3628976)

I cannot tell from your post if you are using Jira Cloud or Server, and I have not done what you suggest before...And looking at this post from the Atlassian Developer Community, your success may depend upon what Cognito's interface supports for adding the attachment:

<https://community.developer.atlassian.com/t/how-do-i-send-a-jira-attachment-using-webhook/365/12>

So, you may want to check Cognito's documentation for ideas. If you can get at the attachment, you can probably use the Jira REST API to add it:

<https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/issue/{issueIdOrKey}/attachments-addAttachment>

Best regards,

Bill

comments: author: Simmo
body: Hi [@Mark B Wager](/t5/user/viewprofilepage/user-id/3628976)

I'm afraid that this isn't possible at the moment.

Cheers,

Simeon.


author: Mark B Wager
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) and [@Simmo](/t5/user/viewprofilepage/user-id/3608665)

Thanks guys for responding so quickly!

I have both a Cloud and an Onprem/Server instance. So, need to know both. (Although they seem to look the same.)

I'm trying to do this withOUT any scripting. (Especially since the cloud doesn't support it.)

I'll check out the Cognito docs, but seems more like it wouldn't matter -- incoming is incoming from any source.

[@Simmo](/t5/user/viewprofilepage/user-id/3608665) so you're saying this simply isn't possible? Would this be possible using a Jira email listener? Could I send an email to Jira to create the ticket that way? If so, then I could act upon it via Automation to do my other work.

??

Mark


author: Simmo
body: Hey [@Mark B Wager](/t5/user/viewprofilepage/user-id/3628976)

I'm afraid it isn't possible with Automation to get the attachment from the incoming webhook and attach it to an issue. I'd definitely try exploring the email sending approach. You can act on issues created that way with Automation.

Cheers,

Simeon.


Tags: webhook