Automated employee attendance & salary deduction with Google Sheets and GPT-4
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs on a schedule (every month). Along the way it connects Google Sheets and OpenAI Chat Model.
How it runs
Trigger: On a schedule (every month).
- Employees Attendant Sheet (Google Sheets): uses Google Sheets
- Calculate hours per day (Code): runs custom JavaScript code
- Employees Salary Sheet (Google Sheets): uses Google Sheets
- Merge: merges the data from its input branches
- Calculate Salary Deduction (Code): runs custom JavaScript code
- Adding the report to new sheet (Google Sheets): append
- Generate AI Summary Report (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- Convert the result to JSON format (Code): runs custom JavaScript code
- Send Salary Deduction Report Email (Send Email): sends an email over SMTP
- Save Email Log to Sheet (Google Sheets): append
Services it uses
Other OpenAI + Google Sheets templates (2,011)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Merge
n8n-nodes-base.merge - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Send Email
n8n-nodes-base.emailSend
From the author
Overview This workflow is designed for HR teams and payroll department to automate the monthly process of calculating employee attendance, salary deductionsm and personalized email notification. It seamlessly integrates Google Sheets, internal attendance data…