Pinterest to Dropbox

Hello,
I have made a workflow that works perfectly up until one point. The issue is clearly me. My talent ran out.

Basically I have made a JSON that has two properties: an url property that contains the link to a Pinterest image, and a filename property (parsed using js).

Inspired by this thread: Pinterest Node

How can I transform the JSON in a way that it downloads the images from the url property in a Dropbox folder?

I have tried the http request component but it doesn’t have a Pinterest auth type.
I have tried converting the url to a binary file but I am not smart enough.

Please help.
Thank you in advance.

Hi @mateitudor, welcome to the community :tada:

I am not sure that’s a question of talent, many websites make it intentionally hard to extract content from them (to get real visitors instead of bots simply downloading a file). Unfortunately, you didn’t provide example data (and I am not a Pinterest user) so I am not 100% sure how your URLs look like.

However, on a general level I think downloading multiple files and then passing them on to Dropbox could work like so (assuming you are running the most recent version of n8n):

Hey @MutedJam, thank you so much for being so kind!

First, I am reading the RSS of a Pinterest board:

Then I am iterating through them, replacing the low res url with the full res one:

The urls are valid, check this one for example:

After this step I tried using the http request with GET but I am met with an authentication error.

I am afraid I don’t get any error when trying to download the example URL you have provided using n8n. Any chance you can provide an example workflow using which your problem can be reproduced?

Sure, here you go:

1 Like

Thank you! I could see the problem and it seems that one of the URLs you are reading is not publicly accessible. Opening https://i.pinimg.com/originals/8d/ca/63/8dca6337923e829f5ad6c22d5988de97.jpg will also result in an error outside of n8n:

You can account for this by having the HTTP Request node ignore errors and storing the response status code, then checking this in the next step.

For example like so:

This will split the downloaded files in a “good” (24 items) and “bad” (1 item) branch:

Hope this helps!

PS: I have created this workflow using a recent version of n8n. You didn’t specify which version you are running, so you might need to upgrade your n8n instance before you can import my example workflow.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.