Extract Timesheet Data with Mistral OCR & Gmail Human Verification

📖 Description

🔹 How it works
This workflow introduces an AI + Human-in-the-Loop pipeline for employee timesheet management. It combines the power of Google Drive, AI (OCR + LLM), and Gmail with a human review step to ensure accuracy and compliance.

AI-Powered File Discovery
Scans a Google Drive folder for new or updated timesheet files (PDF, Word, Excel, Images).

AI Data Extraction
Uses OCR and LLM (Mistral) to intelligently read and extract structured data. Supports multiple formats: PDF, Word (DOC/DOCX), Excel (XLS/XLSX), and Image files (JPG, PNG, scanned documents).
Creates clean JSON with file details and timesheet logs (date, hours worked, tasks, notes).

Smart Data Formatting
Converts AI output into a clear HTML summary table for easy review.
Flags potential anomalies (missing hours, duplicate dates, irregular entries).

Human-in-the-Loop Verification
Sends an approval email via Gmail containing:
File metadata
AI-generated HTML summary
JSON attachment of raw extracted data
HR/Managers review the summary and approve/reject before final actions occur.

Post-Approval Automation (optional)
Approved records can be saved in a separate Google Drive folder.
Employees or HR receive confirmation emails.

⚙️ Set up steps

Connect Credentials
Add Google Drive and Gmail credentials in n8n.
Configure Mistral (or any LLM) API credentials.

Configure Google Drive
In the “Search files and folders” node, replace the folderId with your company’s timesheet folder ID.

Customize Extraction Schema
Sticky notes explain how JSON output is structured.
Adapt it for your organization’s needs (e.g., overtime, project codes).

Set Up Human Verification Emails
Update Gmail node recipients to your HR or approval team.
Customize the email body (AI summary + JSON file attached).

Activate & Test
Enable the workflow.
Upload a sample timesheet to trigger the AI + human verification loop.

⚡ Result: A robust AI + Human-in-the-Loop workflow that reduces repetitive data entry, prevents payroll errors, and gives HR full confidence before final approval.

0
Downloads
0
Views
8.64
Quality Score
intermediate
Complexity
Author:Rajeet Nair(View Original →)
Created:9/22/2025
Updated:10/6/2025

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments