Anyone know if it would be possible to add an image directly to a google sheets cell?

Just curious if anyone can think of a way to do this. I suspect it would involve http request and apps script, in which case, I’ll probably not bother but in case there’s some method of handling image files that I’m not aware of I’d love to hear some suggestions.

Cheers!

From checking this SO thread it seems there is no API functionality for this, but that a workaround might be possible through a formula. I’ll see if I can come up with something :slight_smile:

1 Like

Thanks @MutedJam!

Looks like this works:

Make sure to:

  1. Send a formula value such as ==IMAGE("https://www.thomasmartens.eu/wp-content/uploads/2022/08/snapbythree-my-g6e641CiHFQ-unsplash-scaled.jpg") to Google Sheets and the image appears in the sheet. You’d need a double equal sign == as a single one would be interpreted by n8n as an expression value.
  2. Use the “User Entered” value input mode:

Hope this helps!

@MutedJam very nice! This works via public URL though right? Sorry I should have specified that I’m working with an actual jpegs of receipts that need to remain private. Do you think that would be possible?

Probably not, the documentation page for this formula says they don’t even allow Google Drive URLs:

So, with their API not supporting uploading binary data directly I think a public URL for the image would be the only option unfortunately.

Ah okay, thanks for the info in any case - good hustle. I’ll set your other method as a solution in case it helps others. Cheers!

1 Like

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