AutomationFlowsSlack & Telegram › Automate Payroll Processing with Gpt-4, Google Sheets, PDF Payslips & Slack…

Automate Payroll Processing with Gpt-4, Google Sheets, PDF Payslips & Slack…

Original n8n title: Automate Payroll Processing with Gpt-4, Google Sheets, PDF Payslips & Slack Alerts

ByOneclick AI Squad @oneclick-ai on n8n.io

Automate your payroll process with this efficient workflow. Triggered monthly on the 28th, it fetches employee data from a Google Sheet, uses AI to calculate net salaries with tax and deductions, structures payslip data, generates PDF payslips, and notifies employees via email…

Cron / scheduled trigger★★★★☆ complexity14 nodesGoogle SheetsHTTP RequestEmail SendSlack
Slack & Telegram Trigger: Cron / scheduled Nodes: 14 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #10107 — we link there as the canonical source.

This workflow follows the Emailsend → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "DxYWzfjdkoT4gsJP",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Payroll Automation & Employee Salary Notification System for Finance",
  "tags": [],
  "nodes": [
    {
      "id": "3cb9d411-385c-4aba-889a-dfc0739b4f17",
      "name": "Monthly Payroll Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1296,
        96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "monthDays"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "39234bd7-8085-40fc-859a-6f33b7e04299",
      "name": "Get Employee Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1088,
        96
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Employees"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_EMPLOYEE_SPREADSHEET_ID"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c4944ba0-64d6-45eb-b1bd-8cd715be4906",
      "name": "AI Calculate Salary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -896,
        96
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/chat/completions",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-4"
            },
            {
              "name": "messages",
              "value": "=[{\"role\":\"system\",\"content\":\"Calculate net salary with deductions (tax, insurance, provident fund). Return JSON format.\"},{\"role\":\"user\",\"content\":\"Employee: {{$json.Name}}, Base Salary: {{$json.BaseSalary}}, Allowances: {{$json.Allowances}}, Deductions: {{$json.Deductions}}\"}]"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "b940216a-b05d-4614-baa4-6c066d74ba0d",
      "name": "Format Payslip Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -688,
        96
      ],
      "parameters": {
        "jsCode": "const response = JSON.parse($input.item.json.choices[0].message.content);\nconst employee = $input.first().json;\n\nreturn {\n  employeeName: employee.Name,\n  employeeEmail: employee.Email,\n  employeeId: employee.EmployeeId,\n  baseSalary: employee.BaseSalary,\n  allowances: employee.Allowances || 0,\n  deductions: response.totalDeductions || 0,\n  netSalary: response.netSalary,\n  taxDeducted: response.tax || 0,\n  month: $now.format('MMMM YYYY'),\n  paymentDate: $now.format('YYYY-MM-DD')\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "4631a9fd-8c74-4c37-8bd8-41ed04ad4a09",
      "name": "Log to Payroll Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -496,
        -16
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Payroll"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_PAYROLL_SPREADSHEET_ID"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3f324479-109f-4ac7-93ae-0280449bfee3",
      "name": "Generate PDF Payslip",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        192
      ],
      "parameters": {
        "url": "https://api.pdfmonkey.io/api/v1/documents",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "document",
              "value": "={\"template_id\":\"YOUR_TEMPLATE_ID\",\"payload\":{\"name\":\"{{$json.employeeName}}\",\"employee_id\":\"{{$json.employeeId}}\",\"month\":\"{{$json.month}}\",\"base_salary\":{{$json.baseSalary}},\"allowances\":{{$json.allowances}},\"deductions\":{{$json.deductions}},\"net_salary\":{{$json.netSalary}}}}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "9f4d32d1-27f7-46c7-b365-635880f02edb",
      "name": "Email Payslip to Employee",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -288,
        96
      ],
      "parameters": {
        "options": {
          "attachments": "payslip_{{$json.employeeId}}_{{$json.month}}.pdf"
        },
        "subject": "=\ud83d\udcb0 Salary Credited - {{$json.month}}",
        "toEmail": "={{$json.employeeEmail}}",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e00da244-b83e-4dda-af10-1a3324efd26b",
      "name": "Notify HR on Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        -96,
        96
      ],
      "parameters": {
        "text": "=\u2705 *Payroll Processed*\n\n*Employee:* {{$json.employeeName}} ({{$json.employeeId}})\n*Month:* {{$json.month}}\n*Net Salary:* \u20b9{{$json.netSalary}}\n*Status:* Payment notification sent",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "4d930483-8b0c-4a0c-a2f4-a7b0ff078e42",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -112
      ],
      "parameters": {
        "color": 3,
        "width": 164,
        "height": 388,
        "content": "## Runs monthly on 28th\n\nAutomated payroll trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "17061c8c-052e-4ca4-8127-d04b2e58c8bb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1136,
        -112
      ],
      "parameters": {
        "color": 4,
        "width": 164,
        "height": 388,
        "content": "## Fetches employee data\n\nRetrieves salary info from sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "3a70d888-a681-4e60-a3af-c584d14a717c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -112
      ],
      "parameters": {
        "color": 2,
        "width": 180,
        "height": 388,
        "content": "## AI calculates net salary\n\nApplies tax & deductions"
      },
      "typeVersion": 1
    },
    {
      "id": "274935a9-a136-491a-8414-929f4a1a5923",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -112
      ],
      "parameters": {
        "color": 6,
        "width": 180,
        "height": 388,
        "content": "## Structures payslip data\n\nPrepares for distribution"
      },
      "typeVersion": 1
    },
    {
      "id": "ac826f4e-5b65-4ec9-a825-11158a001151",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        -208
      ],
      "parameters": {
        "width": 196,
        "height": 580,
        "content": "## Records & generates docs\n\nLogs payroll + creates PDF"
      },
      "typeVersion": 1
    },
    {
      "id": "7671884f-e6bc-4355-96fd-da5c65b17ff6",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -112
      ],
      "parameters": {
        "color": 5,
        "width": 356,
        "height": 452,
        "content": "## Multi-channel notification\n\nEmployee email + HR Slack alert"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "98d132d3-d691-4de4-a19e-0d1f5b3dfeb0",
  "connections": {
    "Get Employee Data": {
      "main": [
        [
          {
            "node": "AI Calculate Salary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Calculate Salary": {
      "main": [
        [
          {
            "node": "Format Payslip Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Payslip Data": {
      "main": [
        [
          {
            "node": "Log to Payroll Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate PDF Payslip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate PDF Payslip": {
      "main": [
        [
          {
            "node": "Email Payslip to Employee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Payroll Sheet": {
      "main": [
        [
          {
            "node": "Email Payslip to Employee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monthly Payroll Trigger": {
      "main": [
        [
          {
            "node": "Get Employee Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Payslip to Employee": {
      "main": [
        [
          {
            "node": "Notify HR on Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Automate your payroll process with this efficient workflow. Triggered monthly on the 28th, it fetches employee data from a Google Sheet, uses AI to calculate net salaries with tax and deductions, structures payslip data, generates PDF payslips, and notifies employees via email…

Source: https://n8n.io/workflows/10107/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

N8N Nodes Scrapegraphai, HTTP Request, Google Sheets +2
Slack & Telegram

Simplify financial oversight with this automated n8n workflow. Triggered daily, it fetches cash flow and expense data from a Google Sheet, analyzes inflows and outflows, validates records, and generat

HTTP Request, Google Sheets, Email Send +3
Slack & Telegram

This workflow automatically monitors competitor affiliate programs twice daily using Bright Data's web scraping API to extract commission rates, cookie durations, average order values, and payout term

HTTP Request, Google Sheets, Slack +1
Slack & Telegram

Use cases are many: send recurring market updates to investors, distribute new listings context to buyers, or push periodic area snapshots to your client base — all without touching it manually after

HTTP Request, N8N Nodes Exa Official, Slack +1
Slack & Telegram

Automated garden and farm irrigation system that uses weather forecasts and evapotranspiration calculations to determine optimal watering schedules, preventing water waste while maintaining healthy pl

OpenWeatherMap, Google Sheets, HTTP Request +1