Generate AI-powered contracts with OpenAI, e-signature, Gmail and Sheets
Needs changesWhat this workflow does
This AI workflow has 26 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.
- Validate Contract Request (If): checks a condition and branches into true / false
- Prepare Contract Data (Edit Fields (Set)): sets 9 fields: contractId, contractType, parties…
- Invalid Request Response (Edit Fields (Set)): sets 2 fields: error, message
- Route by Contract Type (Switch): routes items into 3 branches
- Respond to Webhook: sends the response back to the webhook caller
- NDA Template Base (Edit Fields (Set)): sets 2 fields: templateType, baseTerms
- Service Agreement Base (Edit Fields (Set)): sets 2 fields: templateType, baseTerms
- Employment Contract Base (Edit Fields (Set)): sets 2 fields: templateType, baseTerms
- Generic Contract Base (Edit Fields (Set)): sets 2 fields: templateType, baseTerms
- Merge: merges the data from its input branches
…plus 14 more steps. See the full node list below.
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
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Contract Advisor (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Contract Advisor (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (14)
- Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Merge
n8n-nodes-base.merge - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Code
n8n-nodes-base.code - Markdown
n8n-nodes-base.markdown - HTTP Request
n8n-nodes-base.httpRequest - Gmail
n8n-nodes-base.gmail - Wait
n8n-nodes-base.wait - Google Sheets
n8n-nodes-base.googleSheets - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Contract Template Generator with E-Signature Integration What this workflow does This workflow automates the full contract lifecycle—from request intake to document generation and electronic signature completion. It receives contract requests via webhook,…