Analyze Legal Documents with GPT & o4-mini plus Gmail & Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model, Gmail and Google Sheets.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Extract from File: extracts data from a file (pdf)
- Respond to Webhook: sends the response back to the webhook caller
- Code: runs custom JavaScript code
- Basic LLM Chain: sends a prompt to an LLM, with model: OpenAI Chat Model
- Code: runs custom JavaScript code
- AI Agent: runs an AI agent, with model: OpenAI Chat Model
- Gmail: uses Gmail
- Google Sheets: append
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
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 (9)
- Extract from File
n8n-nodes-base.extractFromFile - Webhook
n8n-nodes-base.webhook - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Gmail
n8n-nodes-base.gmail - Code
n8n-nodes-base.code - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Respond to Webhook
n8n-nodes-base.respondToWebhook - Google Sheets
n8n-nodes-base.googleSheets
From the author
Description This workflow lets you upload a PDF document and automatically analyze it with AI. It extracts the text, summarizes the content, flags key clauses or risks, and then delivers the results via Gmail while also storing them in Google Sheets for…