Read PDF File with ChatGPT

I’m trying to create a workflow that:

  1. reads a PDF from Google Drive,
    2. Extracts some information from it using OpenAI
  2. Uses the extracted information to update as Google Sheet

I have no problem with uploading the file to N8N or updating a google sheet, but how do I configure an OpenAI node to read the file and extract details, just like I can do with ChatGPT interactively?

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 @matmuleme
welcome to the n8n community :wave::wave:

Depending on the type of PDF file you could try extracting the content with the “Extract from File” node and then send the content to the AI model. See an example here:

It seems like the Open AI APIs don’t allow the same type of interaction with files as the Chat GPT interface does. The Chat completion API allows to just add an Image to the request and not a generic file.

Let me know if this helps.