Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

MS Logic App to Trello Attachment

Edited

Hi!

I'm using an Azure Logic App as middleware between a front-end task submission form and a Trello to-do board. Trello/Atlassian has built a few built-in actions that work great.

They're missing attaching files to cards. So, I figured I'd do it myself.

I have followed the Trello REST API documentation and am using a `multipart/form-data; boundary=----boundary` POST.

Here's the body of the POST:

------boundary
Content-Disposition: form-data; name="key"

<key string>
------boundary
Content-Disposition: form-data; name="token"

<token string>
------boundary
Content-Disposition: form-data; name="file"; filename="filename.pdf"
Content-Type: application/pdf

@{base64ToBinary(body('ActionToGetPDFAsBase64')?['$content'])}
------boundary
Content-Disposition: form-data; name="mimeType"

application/pdf
------boundary
Content-Disposition: form-data; name="name"

filename.pdf

------boundary--

 

When it gets submitted to Trello, it displays the attachment on the card, but the attachment itself doesn't work -- it just shows a blank PDF.

That would indicate there's something wrong with the binary that's sent to Trello?

Does anyone see anything I'm doing wrong?

I've tried changing the mimeType to application/octet-stream too, and get the same thing.

I've tried sending my localhost the POST request, and it comes correctly formatted -- which is why I'm asking after Trello knowledge.

Thanks!

Joe

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Trello

Taco Tuesday: New years' resolutions with Trello

Congratulations to @Laura Holton , our latest winner of Taco Tuesday! And thanks to @Kristjan Geir Mathiesen - Origo for sharing the picture of Taco having fun with his new friend...

481 views 19 19
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you