Automated Payroll Slip Sender on WhatsApp

HR Automation

n8n
n8n
Google Sheets
Google Sheets
Google Drive
Google Drive
+3
Gmail, Twilio, PDFCrowd API
Download Template
workflow-detail-img

Automatically generate employee salary slips in PDF format, upload to Google Drive, send via WhatsApp and Email, and update payroll status in Google Sheets every month.

Main use cases:

  1. Automatically generate monthly salary slips for employees.
  2. Convert payroll data into professional PDF payslips.
  3. Send salary slips via WhatsApp and Email instantly.
  4. Store payslips securely in Google Drive.
  5. Update payroll status automatically in Google Sheets.

How it Works:

This workflow fully automates the payroll slip generation and delivery process using n8n. Here’s how it works step by step:

1. Monthly Payroll Trigger

  • The workflow runs automatically every month using a schedule trigger.
  • It ensures payroll processing happens without manual intervention.

2. Fetch Pending Payroll Data

  • Connects to Google Sheets.
  • Retrieves employees whose status is marked as Pending for the current month.
  • Filters payroll data dynamically based on the current month.

3. Process Employees One by One

  • Uses batch processing to handle each employee individually.
  • Prevents system overload and ensures reliable execution.

4. Generate Salary Slip (HTML → PDF)

  • Builds a professional salary slip in HTML format.
  • Converts the HTML file into a PDF using an external PDF conversion API.
  • Ensures clean formatting with earnings, deductions, and net pay summary.

5. Upload PDF to Google Drive

  • Checks if the “Staff Salary Receipts” folder exists.
  • Creates the folder automatically if not found.
  • Uploads the generated PDF into the folder.

6. Generate Public Receipt Link

  • Creates a shareable Google Drive link.
  • Sets permission to read-only access.

7. Send Salary Slip via WhatsApp

  • Sends a WhatsApp message using Twilio.
  • Includes:
    • Employee name
    • Month
    • Net pay amount
    • Download link to the PDF

8. Send Salary Slip via Email

  • Sends a professionally designed HTML email using Gmail.
  • Attaches the PDF salary slip.
  • Includes salary summary inside the email body.

9. Update Payroll Status

  • Updates Google Sheets:
    • Marks status as Sent
    • Stores receipt PDF link
  • Prevents duplicate sending.

By combining this workflow with our n8n Workflow Automation Services, you can scale outreach while keeping it highly personalized.