Generate HR offer letters and contracts with GPT-4.1-mini and Google Docs
Ready for 3.0What this workflow does
This AI workflow has 10 nodes and runs when someone submits an n8n form (“Basic Details”). Along the way it connects Google Docs and OpenAI Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Basic Details”).
- Split Documents and Calculate Dates (Code): runs custom JavaScript code
- Extract Text from Aadhar and Resume (Extract from File): extracts data from a file (pdf)
- Merge Extracted Document Texts (Aggregate): combines items into one
- Check Document Type Selection (If): checks a condition and branches into true / false
- Load Offer Letter Template (Edit Fields (Set)): sets 1 field: template_offer
- Load Contract Template (Edit Fields (Set)): sets 1 field: template_contract
- Fill Template with AI (AI Agent): runs an AI agent, with model: OpenAI GPT-4.1 Mini Model
- Save Document to Google Docs (Google Docs): update
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 (9)
- Google Docs
n8n-nodes-base.googleDocs - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Aggregate
n8n-nodes-base.aggregate - Extract from File
n8n-nodes-base.extractFromFile - Code
n8n-nodes-base.code - n8n Form Trigger
n8n-nodes-base.formTrigger
From the author
Description An intelligent AI-powered workflow that automates HR document creation for new hires. Upload candidate documents via form, and the system extracts details, auto-calculates joining dates, fills professional templates using GPT-4, and saves the…