How to send gmail attachments to OpenAI assistant?

Hi,

I am currently working with n8n and I have a requirement to extract attachments (usually images or PDFs) from Gmail emails, send these attachments to OpenAI assistant for processing, and then output the results. I am looking for guidance on which nodes to use and how to configure them to achieve this workflow.

If anyone has experience with this or can point me to relevant documentation or examples, I would greatly appreciate it.

Thank you!

1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @JedXie

Thanks for posting here and welcome to the community! :partying_face:

There are many ways to use the OpenAI nodes with n8n and to “feed” them with email attachments.
Perhaps this workflow will serve as an inspiration?

In general though, the PDF/image is passed to the OpenAI node as a binary file. There are many different ways to work with that. You could select one of the OpenAI nodes to work with files/images:

Or work with the more advanced AI nodes and provide the file as a user prompt:

Or even use vector stores to upload your attachments and make them retrieveable to be used by your further OpenAI processing…

So it really depends on what you are trying to build exactly. Would you like to share more on that?

we also have a bunch of very interesting community members publishing tutorials on youtube, you might want to check out: https://www.youtube.com/watch?v=e3iRwaudPoc

Let us know how you get on! :raised_hands:

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