Attaching a file/image to a Jira issue with Power Automate HTTP

Erin DeFosse October 29, 2024

Hello!

 

Apologies if I'm posting this in the wrong spot. I'm working on integrating dataverse into our Jira workflow and have hit a bit of a snag. I'm not sure how setup the http action in power automate to successfully add an image attachment to the jira issue i created in the flow. 

 

I've tried multiple setups, this is the most recent based off this resource i've found. I either get the issue not found error, a status 500 error (after letting the flow run for 4 hours) or a timeout. Any and all help would be greatly appreciated!

 

ps. does the body image content need to be in base64 or binary?

flow.JPG

 

 

 https://www.sharepointed.com/2022/11/use-power-automate-to-create-jira-tasks/ 

3 answers

1 vote
Chi Am _Addon-Solutions_
Atlassian Partner
October 29, 2024

Hi @Erin DeFosse

You can try to add in your header ->
Content-Type : multipart/form-data

But from the error 500 you are seeing, it would tend to indicate that either the parameters are incorrect or that the json package is incorrect.

Sometimes copy/paste with power automate will generate a 500 error since it cannot format the json correctly.

Erin DeFosse October 29, 2024

hmmm ill play around with the format to see if I can get something to work. still getting the not found error adding the 2 headers, at least it's not the 500 error though.

{ "errorMessages": [ "Issue does not exist or you do not have permission to see it." ], "errors": {} }

Chi Am _Addon-Solutions_
Atlassian Partner
October 29, 2024

have you checked your basic auth?

Chi Am _Addon-Solutions_
Atlassian Partner
October 29, 2024

You can put your authorization directly in the header with a base64 encoding of your @Mail:api_token

1 vote
Jim Knepley - ReleaseTEAM
Atlassian Partner
October 29, 2024

Hi @Erin DeFosse, welcome to the community.

I don't have any great answers, but you might try adding another header to the POST request:

Accept: application/json

 

Are you able to access the raw outputs of your request? That might be insightful for debugging.

Erin DeFosse October 29, 2024

Still getting the not found error :/ thank you for the possible fix though!

 

{ "errorMessages": [ "Issue does not exist or you do not have permission to see it." ], "errors": {} }

0 votes
Isabel Bueno
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!
November 11, 2024

I recently got the same error and it was a token error. You can try putting the token and removing some of its characters and you will see that it still gives you the same error.
At first I tried to convert the email:API-token string to Base64 using any online encoder but it didn't work for me, and I wasn't sure if it was the connection, the json or something else. So I decided to try to make the connection from postman first by doing a simple get of a Jira issue. When I succeeded I saw that the token that Postman was using (it converts it to Base64) was different than mine so I copied it into my flow and it worked perfectly. It's not a very scientific procedure but now I connect without problems.

potman1.JPGpotman2.JPG

I hope it helps you

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events