👥 Generate HR offer letters and contracts with GPT-4.1-mini and Google Docs

92 views · 👥 HR & Recruitment

💡 Pro Tip — HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it — it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

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 final Offer Letter or Employment Contract directly to Google Docs—all in seconds.


What this workflow does

This automation handles your complete HR onboarding document pipeline:


Setup requirements

Tools you’ll need:

Estimated setup time: 15–20 minutes


Step-by-step setup

1. Connect Google Docs

2. Add OpenAI API credentials

3. Customize document templates

The workflow includes two pre-built templates. You can customize them:

Offer Letter Template:

Employment Contract Template:

Important: Keep all placeholders in square brackets [Placeholder Name] exactly as shown. The AI will replace them automatically.

4. Configure form fields (optional)

5. Test the workflow

6. Activate the workflow


How it works

1. Form submission

HR opens the form link and uploads candidate documents (Identity card + Resume as PDFs), enters job details, and selects document type (Offer Letter or Contract).

2. Document processing

The workflow splits uploaded files into separate items and auto-generates two dates:

3. Text extraction

Extracts text from both PDF documents using n8n’s built-in Extract From File node. The candidate’s name is typically pulled from the Resume.

4. Data aggregation

Combines extracted text from both documents into a single data item for processing.

5. Template routing

Checks the selected document type:

6. AI template filling

The AI Agent receives:

GPT-4.1-mini fills every placeholder with actual data while strictly preserving:

7. Google Docs save

The final filled document is inserted into your Google Docs document. Each submission appends a new document, so you can maintain a running archive or clear the doc periodically.


Key features

Zero manual typing: Extract candidate name automatically from Resume PDF—no copy-paste needed

Smart date calculation: Joining date auto-set to 1st of next month based on submission date

Dual document types: Choose between simple Offer Letter or detailed Employment Contract with terms

AI preserves formatting: GPT-4.1-mini maintains exact line breaks, emojis, and structure from templates

Google Docs integration: Documents saved directly—no downloads, conversions, or file juggling

Customizable templates: Edit both templates to match your company’s tone, policies, and branding

Form-based workflow: Share one URL with HR team—no n8n access needed for daily use


Troubleshooting

Google Docs not saving

Candidate name not extracting correctly

AI not filling placeholders

Joining date incorrect

Form not accepting file uploads


Use cases

HR teams at growing companies: Onboard 5-10 new hires per week without spending hours on document preparation. Generate consistent, professional documents in seconds.

Recruitment agencies: Send offer letters to multiple candidates daily. Maintain brand consistency while scaling operations without adding admin staff.

Startups and small businesses: Automate HR paperwork from day one. Focus on candidate experience instead of document formatting.

Remote-first companies: Enable distributed HR teams to generate documents without shared drives or email chains. Single form link, instant output.

Consulting firms: Create client-specific employment contracts with custom templates. Switch between contract types based on project requirements.


Expected results


Workflow customization

Add more form fields

Open “Receive Candidate Details via Form” node and add custom fields:

These values automatically populate in templates if placeholders are added.

Create additional templates

Duplicate one of the “Load Template” nodes and create:

Add a corresponding option in the form Type dropdown.

Send documents via email

Add an Email node after “Save Document to Google Docs”:

Multi-language support

Create template variations in different languages. Add a “Language” dropdown to the form and route to appropriate template.


Support

Need help or custom development?

📧 Email: info@isawow.com
🌐 Website: https://isawow.com/

🔗 Nodes Used

Google Docs, AI Agent, OpenAI Chat Model, n8n Form Trigger, Extract from File

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup