My ChatGPT is able to scan my PDF invoices and then put some info about them in Google Spreadsheet but I don’t know how to use it in N8N. I made such an automation in Zapier but cannot create it in N8N.
Tried to use AI Agent connected with OpenAI Chat Model (latest 4o) and also tried to chat with a model directly but it acts like it can’t scan PDF files - gives me some random invoice output data (invoice number, net value, etc.)
Is it because the API? As far I know Zapier use Responses API and N8N use Chat Completions API.
My invoices are PDFs - some of them are original PDFs from suppliers and some of them are PDF scanned by Adobe Scan.
As what I said before. If you just working with OpenAI and not using memory etc., you can use directly to OpenAI node. There’s so much option when you type OpenAI in node search bar.
After the “Download file” node, add a PDF Extract node (community node) if your invoices are native PDFs with selectable text.
If that node isn’t available, use a Function node with the pdf-parse package to extract the text.
For scanned/image-based PDFs, use Tesseract OCR (community node) or an HTTP Request node to send the file to an OCR API like:
OCR.Space
Google Vision OCR
AWS Textract
(You’ll need to send the file as base64 or form-data, depending on API requirements.)
Take the extracted text and pass it to the AI Agent or OpenAI Chat Model like this:
4.Prompt:* "You are reading raw text from an invoice. Extract and return the invoice number, issue date, supplier name, and total amount from the text below:\n\n[PASTE TEXT HERE]"
Use a “Set” node or Structured Output Parser to format the extracted values from the response.
Send that clean data to the “Append row in sheet” node.
The key is: OpenAI in n8n can’t read the PDF itself. You must extract the text or OCR it first, then pass the clean text to the model.