workflows.fit
Back to n8n workflows
n8n template$49By Khairul Muhtadin

Generate and email PDF payslips from Google Sheets with Gmail

This workflow automates the entire payslip process by pulling payroll data directly from Google Sheets, generating a professional and secure PDF for each employee, and emailing it to them instantly. Save hours of manu...

Data & StorageProductivityCommunicationHITLDevelopmentCore NodesManual TriggerSet
Open checkout
Loading interactive preview...

Template notes

This workflow automates the entire payslip process by pulling payroll data directly from Google Sheets, generating a professional and secure PDF for each employee, and emailing it to them instantly. Save hours of manual HR administration, eliminate human error, and ensure timely, confidential delivery of payslips every month.

![Screenshot 20251109 at 15.44.02.png](fileId:3254)

Why Use This Workflow?

Time Savings: Reduces the entire payslip generation and distribution process from hours of manual work to under 5 minutes. Cost Reduction: Avoids monthly subscription fees for dedicated payroll software, potentially saving $50-$200 per month. Error Prevention: Ensures 100% data accuracy by pulling data directly from the source sheet, eliminating risky copy-paste mistakes. Scalability: Effortlessly handles payroll for 10 or 1,000+ employees without any changes to the core process.

Ideal For

- HR Departments: For automating the monthly payslip distribution cycle, freeing up teams to focus on more strategic tasks. - Small Business Owners: For managing payroll professionally and efficiently without a dedicated HR team or expensive software. - Finance & Operations Teams: For streamlining a critical financial communication process, ensuring accuracy and creating an audit trail.

How It Works

1. Trigger: The workflow is initiated manually, giving you full control over when to run payroll. 2. Configuration & Data Fetch: It loads company-specific details (name, address) and fetches the complete payroll dataset from your designated Google Sheet. 3. Filter Unsent: The workflow intelligently filters the list to process only employees who have not yet been sent a payslip, checking a status column in your sheet. 4. Iterate & Process: It processes one employee record at a time in a loop. 5. Prepare Payslip Data: A Code node dynamically formats all financial data into local currency, generates itemized lists for income and deductions (only showing non-zero values), and even converts the final take-home pay amount into words (specifically in Indonesian). 6. Generate PDF: The prepared data is injected into a beautifully designed HTML template. Puppeteer then converts this HTML into a high-quality, print-ready A4 PDF document. 7. Email Delivery: The generated PDF is attached to a personalized email and sent directly to the employee using your Gmail account. 8. Update Status: Finally, the workflow updates the Google Sheet, marking the employee's payslip as "sent" to prevent duplicate emails in future runs.