Images uploaded to a Microsoft form connected to Jira by a Flow do not show up in Jira ticket.

Sarah Baldwin
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!
January 2, 2020

I have a simple form created in Office 365 where people can upload attachments, including images. This form is connected to Jira through a microsoft flow. The ticket creation is working great, however the image appears as an un-clickable URL rather than as an image. Is there any way to make this appear in the ticket?

3 answers

0 votes
David Gabaldón April 21, 2022

Hi Sarah.

In the Power Automate flow you can put in the 'Create a new issue' step that put what it retrieves from the Attachment field and it will write something like this:

[{"name":"image.png","link":"https://my.sharepoint.com/personal/user/Documents/Applications/Microsoft%20Forms/Create%20Issue%20(Jira)/Question/ image.png","id":"01K5HU62TE4MGT47UVC7JCKPHBUBVFDAYOP","type":null,"size":312201,"referenceId":"01K5HU262XESD3LAI6P7ND35VX3RPKGBU46","driveId":"b!8o22RPSOaAJ0qcracV3D5hmFBuJJu02MtOrTbn4g4lWYnc5jstatkdA"," uploadSessionUrl":null}]
Link paremeter is the URL to the image.

In Jira you can create a job with scriptrunner that is launched with the 'Crete Issue' event, which collects the previous text, takes the link value to put it in the description and that way it will be a working URL.

Jason D
Contributor
November 25, 2024

[{"name":"image.png","link":"https://my.sharepoint.com/personal/user/Documents/Applications/Microsoft%20Forms/Create%20Issue%20(Jira)/Question/ image.png","id":"01K5HU62TE4MGT47UVC7JCKPHBUBVFDAYOP","type":null,"size":312201,"referenceId":"01K5HU262XESD3LAI6P7ND35VX3RPKGBU46","driveId":"b!8o22RPSOaAJ0qcracV3D5hmFBuJJu02MtOrTbn4g4lWYnc5jstatkdA"," uploadSessionUrl":null}]

Can someone support with just extracting the https link from the string of text with power automate.  I was looking to use the "slice" function and point to the start of the string with "https:" and the end to the string with ".png" .   Is this a viable option to extract the https url?

 

0 votes
Sylvia Taube January 24, 2022

Having a similar issue due to the attachments being auto-saved in file structure through MS Forms- even unable to send file URL directly through API call to create/update Jira ticket. Any and all pointers to get the file from Sharepoint into Jira ticket would be greatly appreciated. 

(get '415 error for Unsupported media tye as soon as I try to access the MS Forms created file URL. )

 

Side notes

- API call works fine if I replace file URL with URL for public random picture

- All our Jira users have access to the file folder in Sharepoint 

Sylvia Taube May 5, 2022

ended up being able to parse the attachments collected using: 

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "name": {
                "type""string"
            },
            "link": {
                "type""string"
            },
            "id": {
                "type""string"
            },
            "type": {},
            "size": {
                "type""integer"
            },
            "referenceId": {
                "type""string"
            },
            "driveId": {
                "type""string"
            },
            "status": {
                "type""integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}
Then using the response 'id' in the 'Get file content module 
then used that in the Post call 
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=NAME"
},
"body": @{body('Get_file_content')}
}
]
}
0 votes
Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 2, 2020

We can't tell what text your submitting to the ticket. If you provide that information, it's possible someone here can be of some help.

Sarah Baldwin
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!
January 3, 2020

Sorry, do you mean you need to know what text is being submitted to the Jira ticket? The issue isn't the text but the images that are being submitted to the ticket that aren't showing up. 

Suggest an answer

Log in or Sign up to answer