Overview

The Attendance Shortfall Notifier will automatically read the attendance report, recognize which employees have shortfalls and send timely notification emails. Now, instead of HR having to go manually checking hundreds of documents, the process is end-to-end with very little input.

Here’s a glance at how it works:

Objective

The objective is to increase the accuracy, efficiency, and productivity in tracking employee attendance by reducing manual efforts, preventing frauds, and providing real time insights for better workforce and operational management.

Main goals include saving time for HR and payroll, minimizing errors and time theft, integrating with other HR functions like generating reports for analytics, and ensuring compliance with labor laws.

How does it work?

Step 1: PDF To Google drive Folder Upload

It all begins when attendance PDFs are sent to a specific folder in Google Drive. This upload is also the workflow trigger in n8n, so we don’t have to start the workflow by hand in n8n.

Step 2: PDF Text Extraction

When the document is uploaded, the PDF content is parsed using the ‘Extract from File’ node. And a ‘Code Node’ is used to find the names of any employees mentioned in the text. This strategy helps the system successfully to reconcile between the records of attendance and the employee without needing HR intervention.

Step 3: Lookup Payroll Date

The employee name extracted is matched against a Google Sheet containing:

  • Employee details (including registered email)
  • Payroll schedule (dates)

This lookup ensures the appropriate employee is notified and is in conjunction with the processing of payroll.

Step 4: Validate Payroll Timeline

The flow determines if the date is within 3 days of the payroll date. If not it will stop the workflow to avoid sending emails to false addresses. This intelligent state prevents alerts from being issued when no attending action is necessary.

Step 5: Attendance Shortfall Detection

The workflow is then parsing the “Total Hours” field of the posted PDF. If work falls 
< 8hr it is marked as a shortfall. Employee specific dates are kept in an array so that when employees receive the attendance gaps they will know the specific details, not just a general warning.

Step 6: Conditional Check (If Node)

The process then tests for any shortfalls:

Yes – Proceed to notification.

No – Exit(no need to intervene)

Step 7: Email Notification

Last but not least, a Gmail Node sends out an email to the responsible employee. Each email includes:

  • Employee name
  • Payroll date
  • A prompt to regularize attendance prior to payroll closure

So that the staff knows their skills gap and corrects right away.

Technology Stack Included

Key Benefits

Closure

Challenges like attendance shortfalls can be automated with n8n and also it helps in smoothly managing the business workflow. Making sure that HR’s manual workload is less and allowing them to focus on strategic and critical tasks.