A recent project requirement led me on a path of collecting timesheets from a timekeeping platform, and generating reports so clients can see a weekly per person view of hours worked on various projects. Now, you might think that a quick pivot table or power query in Excel might do the trick. That's until we add in the fact that this is a weekly report. Nobody has time to pull reports every week. And what would the client think if we missed a week. That's where this automation comes in. I'll now be able to collect, process, build, and send these reports to the clients all without lifting a finger. No user errors. No missed weekly reports.
In this guide, I’ll walk through how I automated the process using Power Automate, saving hours of manual work each week.
My team tracks time in ClickTime, but we needed a way to:
✔ Aggregate hours by Job ID for billing.
✔ Sync summarized data to Airtable for reporting.
✔ Avoid duplicate entries when reprocessing weeks.
Here’s how the flow works at a high level:
The flow starts by pulling all active users from Airtable, then processes each one in a loop.
Parse the returned JSON
For each user, the flow:
Calls the ClickTime API to fetch entries for the specified week.
Parses the JSON response to extract JobIDs, Hours, and Dates.
This is where the magic happens! The flow:
Uses Select
to extract unique JobID
s.
Converts the dataset to XML for XPath queries.
Sums hours per job with:
"Select – JobID Repeating" action (showing unique JobIDs).
XML conversion setup
Finally, the flow:
Formats the data for Airtable.
Uses a composite key (JobID | WeekNumber | UserID
) to prevent duplicates.
Performs a PATCH request to upsert records.
Airtable PATCH action
XPath is powerful but tricky: Converting data to XML enabled flexible aggregations.
Concurrency matters: Running loops sequentially (repetitions: 1
) avoided API throttling.
Cleanup is critical: Resetting variables after each run prevented data leaks.
Metric | Before (Manual) | After (Automated) |
---|---|---|
Time Spent | 3 hours/week | 10 minutes/week |
Error Rate | ~5% | 0% |
Got questions? Ask in the comments!
Micah Groom is an IT Consultant who automates everything. Connect on LinkedIn.
Final Flow Screenshot: