Deputy and MySQL: Weekly Hours Worked Export Template
This Spojit template pulls each week's approved Deputy timesheets and writes the hours worked into a MySQL table for reporting and payroll.
What It Builds
A Schedule trigger fires once a week and a Deputy Connector node fetches all approved timesheets for the period. A Loop node walks each entry, and a MySQL Connector node inserts the employee, date, and hours worked into a reporting table. The result is a clean weekly snapshot your payroll and analytics tools can read directly.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every Monday at 6am, pulls all approved timesheets from Deputy for the previous week, and for each one inserts a row into my MySQL "weekly_hours" table with the employee name, work date, and total hours worked.
Connectors Used
- Schedule trigger - runs the export on a weekly cron.
- Deputy - reads approved timesheets for the reporting period.
- MySQL - inserts each row into your reporting table.
Customize It
Change the day and time in the prompt to match your pay cycle, swap weekly_hours for your own table name, and adjust the period (for example, last two weeks) for fortnightly payroll. You can also add columns like cost or location by naming the extra fields you want written.
Tips
- Use a Deputy connection with permission to read timesheets, and filter to approved entries only so unconfirmed shifts never reach payroll.
- Run the MySQL node in Direct mode for a predictable insert with no AI cost per row.
- Create the target table with the right column types before the first run so writes do not fail.