Hi, I’m trying to re-create a workflow that I already have in Integromat. Which simply uploads images from URL field to Attachments field. Like this:
Is it possible? how?
Thanks!
Hi, I’m trying to re-create a workflow that I already have in Integromat. Which simply uploads images from URL field to Attachments field. Like this:
Is it possible? how?
Thanks!
Yes, that seems to be a bug. I have a look at it.
Found the bug and fixed it.
https://github.com/n8n-io/n8n/commit/8b1e3d7ba95502c2b756c74db1803f2373537a1b
Will release it with the next versions. Will update here once it is out.
Released a new version [email protected] which contains the fix.
@jan maybe you could help me with this ?
I am also trying to upload images from URL field to Attachments field. I tried with an HTTP node but couldn’t succeed; based on this workflow https://n8n.io/workflows/591 I am trying to fetch the image via an Http request and send it to a Set node to upload it to Airtable.
It seems like I am messing up the set Node because I am not able to get the picture file from the HTTP request.
I have no error when running the script.
Set node config :
I have the feeling that the Http node might just get the values already in the Airtable table and input them again.
Regards
The HTTP Request Node should not be needed because an attachment can be set directly as URL.
If we assume you have a table with at least the fields URL and Attachments. Then you could use the following workflow:
That will:
Ok, I was far away from the solution. Coding knowledge needed …
Thanks a lot that worked perfectly ! And thanks for n8n for this amazing work
Really great to hear that it was helpful and that you enjoy n8n!
Have fun!
Hi everyone.
I can’t figure out how to send the URL attachment to my attachment field.
When I try to set ‘Attachment’ from Airtable with an URL, I get an error saying that Attachment should be an object and not a string.
So I tried top wrap the URL within an object but no luck.
Just trying to add an attachment to my airtable…
I already have the URL inside n8n nodes.
Ok, got it working, I leave the answer here for the next ones.
So as simple as that it worked, just keep the URL field, otherwise it throws you an error.
@jan Im into a similar problem I’m 99% there I think just something is not sitting right.
My attachment field is called “n8n_image”, and also has its own id.
I tried to add the id in the attachment too, I keep getting the same error.
Would you know what I’ve missed by any chance?
Hi @Vince,
Not an expert but my JS is a bit different as I have filter code in the 2nd line of code:
My MainImage is the attachmnent of Airtable and MainImage1 is my field in Airtable that has the URL to fetch the image. Not sure if it helps you.
return items
.filter(item => item.json.fields.MainImage1 && !item.json.fields.MainImage)
.map(item => {
return {
json: {
id: item.json.id,
MainImage: [
{
url: item.json.fields.MainImage1,
},
],
}
}
})
Hi thanks! It was similar to my code already.
Just understood: the Function and name of the Attachement column in Airtable needs to have a capital letter (don’t ask me why…).
So instead of calling it n8n_image (doesn’t work), N8n_image works…
Haha, nice, at least you found the solution.
I have resolved the issue.
In my case, I needed to display an image as an attachment in Airtable using its URL. Here’s the code I used:
const myobj = {
F_Attachment: [{
url: $('Image Generation').item.json.url
}]
};
return myobj;
I replaced the placeholder URL with my own.
The resulting array is then sent back to Airtable, as it requires an array for input.
Fun Fact: (Airtable will subsequently generate a URL for the image. )
The above was helpful to help me find a solution that I can implement on the n8n UI.
To make it work on the UI paste the below updated with:
{{
[{ url: “https://drive.google.com/uc?export=download&id=” + $(‘Replace With Your Google Drive Node’).item.json.id,
filename: “” + $(‘Replace With Your Google Drive Node’).item.json.id}]
}}