Google Sheets + Slack: clean attendance reports sent out
Your attendance data is probably “in Google Sheets”… which really means it’s scattered, inconsistent, and always a little late. Someone exports rows, fixes names, filters today’s date, double-checks departments, then pastes a summary into Slack and emails leadership. Again.
This Sheets Slack reports automation hits HR leads first, but ops managers and team leads feel it too. If you’ve ever chased down who’s actually out today (and whether it’s a one-off or a pattern), this workflow turns your logs into clean reports without the manual cleanup.
You’ll see how the workflow pulls attendance plus employee master data, flags anomalies, and sends polished email reports and Slack summaries on a schedule, without spamming leadership when nothing’s wrong.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets + Slack: clean attendance reports sent out
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n1@{ icon: "mdi:database", form: "rounded", label: "Fetch Attendance Records", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Fetch Employee Master Data", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Analytics Engine"]
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Records Available", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Critical Alerts", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Format Email"]
n7@{ icon: "mdi:message-outline", form: "rounded", label: "Send Email", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Format Slack"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Post to Slack"]
n10@{ icon: "mdi:database", form: "rounded", label: "Log Summary", pos: "b", h: 48 }
n6 --> n7
n8 --> n9
n5 --> n6
n3 --> n4
n0 --> n1
n0 --> n2
n4 --> n5
n4 --> n8
n4 --> n10
n1 --> n3
n2 --> n3
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n4,n5 decision
class n1,n2,n10 database
class n3,n6,n8 code
classDef customIcon fill:none,stroke:none
class n3,n6,n8,n9 customIcon
The Problem: Attendance reporting turns into daily cleanup
Attendance tracking usually starts simple. A sheet, a few columns, maybe a “late” note when someone messages in. Then the business grows. People move departments, managers change, shifts get added, and suddenly your “simple sheet” becomes three tabs that don’t quite match. The real pain shows up when you need answers fast. Who’s absent today? Is one department trending late? Are you missing check-ins because someone typed “WFH” instead of “Remote”?
It adds up fast. Here’s where it breaks down in real teams.
- You end up merging attendance logs with employee details by hand, because the attendance tab doesn’t include department, manager, or shift.
- Weekly patterns get missed since you’re only looking at today’s rows, and nobody has time to run the same filters every hour.
- Manual summaries introduce errors, like mismatched EmployeeIDs or duplicate names, which makes leadership distrust the report.
- Leaders either get flooded with “FYI” emails or get nothing until the situation is already messy.
The Solution: Hourly attendance analytics with smart Slack + email alerts
This n8n workflow runs on an hourly schedule and does the work your team keeps repeating. It pulls fresh attendance logs from Google Sheets, pulls your employee directory from a separate sheet, then merges them so every attendance record has context (department, manager, shift, contract type, email). From there, a built-in analytics processor calculates the numbers you actually care about: attendance rate, punctuality rate, absenteeism rate, plus department-level rollups. It also detects anomalies using thresholds, so you only escalate to management when something crosses the line. Finally, it sends a clean HTML email report and a structured Slack summary, and logs a daily snapshot to a summary sheet for trend tracking.
The workflow starts with a schedule trigger, then runs two parallel fetches from Google Sheets (attendance logs and employee master data). After the merge and analytics, it validates record count, routes alerts based on severity, posts a Slack summary, sends email when it matters, and appends a daily summary for later dashboards.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you have 120 employees across 6 departments and you send a morning update plus a mid-day check. Manually, it’s easy to burn 20 minutes per update cleaning the sheet, merging in department info, and rewriting a Slack summary, so you’re at about 40 minutes a day. With this workflow, you spend maybe 5 minutes setting a threshold or updating recipients, and the hourly run handles the rest. The “time cost” becomes reviewing exceptions instead of doing spreadsheet gymnastics.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store attendance logs and employee directory.
- Slack to post department-friendly summaries and alerts.
- SMTP email account (get it from Gmail App Passwords or your company SMTP admin).
Skill level: Intermediate. You’ll connect credentials, update sheet IDs, and tweak thresholds inside a code node if you want custom alerting.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
An hourly schedule kicks things off. n8n runs the workflow automatically, so you’re not relying on someone remembering to “send the update.” You can keep it hourly, or change it to mornings only if that fits your culture better.
Two sheets get pulled in parallel. One Google Sheets node fetches the AttendanceLogs tab. Another loads the Employees master data. That second sheet is what turns a raw “EMP001” row into something leadership can act on.
Analytics, validation, then smart routing. The workflow merges data by EmployeeID, calculates key metrics (present, absent, late), and checks you actually received records for the current day. If the dataset looks wrong, it can stop early instead of sending nonsense. If the numbers are real, it decides whether management should be alerted based on thresholds like “late hits about 10%” or “absent hits about 15%.”
Reports go out in the right format. A formatted HTML email is generated for inbox readers, and a structured Slack message is built for quick scanning in channels. A DailySummary row is appended back into Google Sheets so you can chart trends later.
You can easily modify alert thresholds to department-specific rules based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the workflow to run on a recurring schedule so the attendance report is generated automatically.
- Add the Scheduled Automation Start node and open its settings.
- Keep the default rule or adjust the interval as needed (the workflow is set to run every hour).
- Confirm that Scheduled Automation Start outputs to both Retrieve Attendance Logs and Load Employee Directory in parallel.
Step 2: Connect Google Sheets
Connect the attendance and employee data sources and prepare the daily summary output sheet.
- Open Retrieve Attendance Logs and set Document ID to
[YOUR_ID]and Sheet Name toAttendanceLogs. - Credential Required: Connect your googleApi credentials in Retrieve Attendance Logs.
- Open Load Employee Directory and set Document ID to
[YOUR_ID]and Sheet Name toEmployees. - Credential Required: Connect your googleApi credentials in Load Employee Directory.
- Open Append Daily Summary and set Operation to
append, Document ID to[YOUR_ID], and Sheet Name toDailySummary. - Credential Required: Connect your googleApi credentials in Append Daily Summary.
AttendanceLogs, Employees, and DailySummary match the data structure expected by the workflow to avoid missing fields in downstream processing.Step 3: Set Up Attendance Processing and Validation
Analyze daily attendance data and ensure the workflow proceeds only when records are available.
- Open Attendance Analytics Processor and keep the provided JavaScript Code that calculates daily metrics, alerts, and summary fields.
- Confirm that Retrieve Attendance Logs and Load Employee Directory both connect to Attendance Analytics Processor.
- Open Validate Records Count and set the condition to Number with Value 1 as
={{ $json.recordsProcessed }}, Operation aslarger, and Value 2 as0. - Confirm that Attendance Analytics Processor outputs to Validate Records Count.
recordsProcessed is 0, the downstream alerts, Slack summary, and append actions will not run. Verify your attendance sheet has entries for today’s date.Step 4: Configure Alert Routing and Parallel Outputs
Route management alerts and fan out the daily summary to email, Slack, and Google Sheets simultaneously.
- Open Management Alert Check and set the condition to Boolean with Value 1 as
={{ $json.shouldNotifyManagement }}and Value 2 astrue. - Confirm that Validate Records Count outputs to Management Alert Check, Build Slack Summary, and Append Daily Summary in parallel.
- Keep the Compose Email Report JavaScript code that builds
emailHtmlandemailSubject. - Confirm that Management Alert Check outputs to Compose Email Report.
Step 5: Configure Email and Slack Outputs
Deliver the formatted report to email and Slack with the correct credentials and message settings.
- Open Dispatch Email Alert and set Subject to
={{ $json.emailSubject }}, To Email to[YOUR_EMAIL], and From Email to[YOUR_EMAIL]. - Credential Required: Connect your smtp credentials in Dispatch Email Alert.
- Open Slack Channel Dispatch and set Text to
=Daily Attendance Reportand Channel ID to[YOUR_ID]. - Credential Required: Connect your slackApi credentials in Slack Channel Dispatch.
- Confirm that Build Slack Summary connects to Slack Channel Dispatch.
Step 6: Test and Activate Your Workflow
Verify the workflow runs end-to-end and then enable it for production use.
- Click Execute Workflow to run Scheduled Automation Start manually.
- Confirm that Retrieve Attendance Logs and Load Employee Directory both output data and feed Attendance Analytics Processor.
- Check that Dispatch Email Alert sends an email with a subject generated by
={{ $json.emailSubject }}and that Slack Channel Dispatch posts to the selected channel. - Verify a new row is appended in Append Daily Summary on the
DailySummarysheet. - Toggle the workflow to Active so it runs on the schedule.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the Google Cloud service account access and confirm all three sheets are shared to that service account email first.
- If you’re using scheduled hourly runs, timezone mismatches can make today’s “Date” filter look empty. Check the Schedule Trigger timezone and the sheet locale so you don’t get “No records found” during early hours.
- Slack messages fail more often than people expect because the bot wasn’t invited to the channel. If you see chat:write errors, confirm the bot is installed, has chat:write scope, and is in the target channel ID (it starts with C).
Frequently Asked Questions
About 30–60 minutes if your Sheets and Slack are ready.
No, not for the basic setup. You only touch code if you want to change how metrics or thresholds are calculated.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in SMTP email costs (often $0 if you use an existing mailbox, or whatever your provider charges).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but you’ll want to edit the logic inside the Attendance Analytics Processor code node. Common tweaks include different “late” thresholds by shift, excluding approved leave statuses from alerts, and routing department-specific summaries to different Slack channels. You can also adjust the email HTML in the Compose Email Report node to match your branding.
Usually the bot token is wrong, expired, or missing chat:write permissions. Make sure the Slack app is installed to the workspace, the token starts with xoxb-, and the bot is invited to the target channel (channel IDs start with C). If you copied a channel name like #attendance, that won’t work here because the node expects the channel ID.
Plenty for most small and mid-sized teams, and it scales further with pagination and a bigger n8n plan.
It depends on how deep you want the analysis to go. Zapier and Make are great for “when row added, send message,” but this workflow is doing multi-source joins, calculations, conditional routing, and formatted outputs, which gets awkward (and expensive) in simpler tools. n8n also gives you the self-hosted route, which means you can run hourly checks without worrying about every step costing extra. If you just want a two-step notification, use what’s simplest. If you want analytics plus alert discipline, this is a better fit. Talk to an automation expert if you’re not sure which fits.
Once this is running, attendance reporting stops being a daily task and becomes a background system you can trust. Honestly, that alone is a relief.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.