Templates / Automate invoice processing with OCR, GPT-4 & Salesforce opportunity creation

Automate invoice processing with OCR, GPT-4 & Salesforce opportunity creation

Ready for 3.0

by Le Nguyen ✓ · 2,346 views · created 2025-10-22 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 11 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive, OpenAI, Microsoft OneDrive and Salesforce.

How it runs

Trigger: On Google Drive events (file created).

  1. Download File From Google (Google Drive): download
  2. Extract from File: extracts data from a file (pdf)
  3. Update File to One Drive (Microsoft OneDrive): uses Microsoft OneDrive
  4. Message a model (OpenAI): uses OpenAI
  5. Create or update an account (Salesforce): create or update (account)
  6. Create an opportunity (Salesforce): work with opportunity
  7. Build SOQL (Code): runs custom JavaScript code
  8. Query PricebookEntries (Salesforce): work with search
  9. Code: runs custom JavaScript code
  10. Create Opportunity Line Items (HTTP Request): calls an HTTP API (POST)

Services it uses

Google DriveOpenAIMicrosoft OneDriveSalesforce

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

PDF Invoice Extractor (AI) End-to-end pipeline: Watch Drive ➜ Download PDF ➜ OCR text ➜ AI normalize to JSON ➜ Upsert Buyer (Account) ➜ Create Opportunity ➜ Map Products ➜ Create OLI via Composite API ➜ Archive to OneDrive. --- Node by node (what it does &…

Excerpt from Le Nguyen's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.