Automate invoice processing with OCR, GPT-4 & Salesforce opportunity creation
Ready for 3.0What 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).
- Download File From Google (Google Drive): download
- Extract from File: extracts data from a file (pdf)
- Update File to One Drive (Microsoft OneDrive): uses Microsoft OneDrive
- Message a model (OpenAI): uses OpenAI
- Create or update an account (Salesforce): create or update (account)
- Create an opportunity (Salesforce): work with opportunity
- Build SOQL (Code): runs custom JavaScript code
- Query PricebookEntries (Salesforce): work with search
- Code: runs custom JavaScript code
- Create Opportunity Line Items (HTTP Request): calls an HTTP API (POST)
Services it uses
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)
- Extract from File
n8n-nodes-base.extractFromFile - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - OpenAI
@n8n/n8n-nodes-langchain.openAi - Google Drive
n8n-nodes-base.googleDrive - Microsoft OneDrive
n8n-nodes-base.microsoftOneDrive - Salesforce
n8n-nodes-base.salesforce - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest
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 &…