For those who joyously use Trello, you know that graphics attached in cards recently got a security makeover - meaning those graphics can no longer be referenced or linked to publicly. It requires any viewer to have specific member access to that content within Trello. Ugh.
We need to pull the graphic (attachment) from the card in Trello and upload it to GDrive (or other cloud storage) for public distribution, in our case by email. As a migrant from Integromat/Make, I reminisce over the ease of use with this option:
I need to do essentially the same thing in n8n now. Will this require a third (intermediary) step, using the Write Binary File node? Or can I simply grab the binary from the Trello request, and pass it to GDrive?
Does someone have a guide/video/tutorial for this? I’m a bit out of my element and unable to get this working. I think I’m doing several things wrong here. My end result is a PNG file with binary text inside, saved into my main G Drive directory (not the intended folder).
Hi @Entrepositive, downloading a binary file and then storing it on Google Drive wouldn’t require an additional node.
I suspect your Trello HTTP request might not return what you expect it to return. Check this example for downloading an image and then storing it on Google Drive:
Can you check the file coming from Trello is the file you are expecting? You can view it like so (or alternatively download it if there is no built-in viewer for it):
Thanks for your response. I was able to successfully run your model, with no auth, using your own image link you used. However, when I replaced the URL with my own (Trello) image link, it did not work.
I tried using my Trello auth, which has access to the graphic, but that did not work either.
In both cases, the binary summary populates correctly, and the “View” button functions but no graphic is displayed. I tend to suspect this is an authorization issue with Trello, unless it seems I’m clearly executing this incorrectly.
I recall there was a big drama when Trello made the attachments private. Make/integromat scrambled to come up with the “Download Attachment” node for the Trello connection.
To venture a guess, perhaps that integromat function is handling more than one step… I think it handled the authorization, pulling the graphic data (I guess that’s the “binary”?) and it made it an object within the workflow.
I have a feeling this is a critical piece. I’ll check back in here after a little digging:
…specifically this part:
Making a GET request with the key and token will return a 302 that redirects to the URL of the hosted file. You will always be 302’ed so long as the tokened user has access to the attachment. The route you are redirected to is only valid for 1 hour.
I am using a different URL format now, but forgot to mention earlier, from this comment onward. With the URL format you mentioned, I would get such a response. Interestingly enough, with the below URL format, I still get txt/html content-type.
I’m using this URL format: https://api.trello.com/1/cards/{id}/attachments/{idAttachment}?key=APIKey&token=APIToken
and presumably, n8n is loading the API key and token automatically, when I set up the auth creds. Could that be a bad assumption?
It will be if you don’t add the ?key= part otherwise it will add it again. So if you use https://api.trello.com/1/cards/nekAAA7H/attachments/62f6c50fe4ba56837b626d57 what do you get back in the full response json?
If I run that, I get a application/json content type in a 200 response, with different headers than discussed before. Binary dialog:
Further, I tried following this article, with the “newer” URL format that includes “/download/” and got the below binary output. It seems I have 1 hour to access the graphic, and push it to Drive/cloud, otherwise it’s no longer accessible.
But even so I still can’t view the graphic from the binary dialog box, as I could with your public image link from before.