Automate Invoice Processing with OCR, GPT-4 & Salesforce Opportunity Creation — n8n Workflow
Overview
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 & key setup)
- Google Drive Trigger Purpose**: Fire when a new file appears in a specific Google Drive folder. Key settings**: Event: fileCreated Folder ID: google drive folder id Polling: everyMinute Creds: googleDriveOAuth2Api Output**
Nodes used
Workflow Preview
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 11 nodes, connecting code, extractfromfile, googledrive.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (11)
HTTP Request
httpRequest
Google Drive
googleDrive
Microsoft OneDrive
microsoftOneDrive
Salesforce
salesforce
Code
code
OpenAI
n8n-nodes-langchain.openAi
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows → New → Import from file.
- 3Select the downloaded
automate-invoice-processing-with-ocr-gpt-4-salesforce-opportunity-creationfile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n → Import from JSON:
Integrations
Created by
Le Nguyen
@leeseifer
Tags
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free →