๐ Log Jira worklogs nightly from Google Sheets with Gmail and GPT-4o-mini
โก 9 views ยท ๐ Project Management
Description
Jira Daily Worklog Automation โ Auto-log Time from Google Sheets to Jira Every Night
Automatically logs time to Jira every night from a Google Sheet. No manual worklog entries needed โ just fill in your sheet and the workflow handles the rest at 10 PM.
Built for developers and teams who track their daily tasks in a spreadsheet and want their Jira time entries done automatically, with a clean email report.
How It Works
- Runs every night at 10 PM via a Schedule Trigger
- Reads all rows from your Google Sheet and filters rows where
status = Pendinganddate <= today - Loops through each pending row one at a time using
splitInBatches - Builds the Jira worklog payload โ normalises time format, constructs the ISO timestamp from
date+started_at - Calls the Jira REST API (
POST /rest/api/3/issue/ticket_id/worklog) with Basic Auth - Updates the sheet row status to
Completedor keeps itPendingwith an error message and incrementedretry_count - After all rows are processed, reads results from static data and builds a summary
- GPT-4o-mini writes a friendly 2โ3 sentence team update
- Sends a formatted HTML email report via Gmail with success count, fail count, total time logged, and the AI summary
How to Use
Step 1 โ Set up your Google Sheet
Create a sheet with these exact column headers in row 1:
| ticket_id | log_text | date | started_at | log_time | status | error_message | retry_count |
|---|
ticket_idโ your Jira issue key e.g.PROJ-123log_textโ worklog comment e.g.Reviewed PR and fixed unit testsdateโ date to log against e.g.2026-04-02started_atโ time the work started e.g.09:30log_timeโ time spent e.g.1h,30m,1h30mstatusโ set topendingfor rows to be processederror_messageโ auto-filled on failureretry_countโ auto-incremented on failure
Step 2 โ Add credentials in n8n
- Google Sheets OAuth2 โ connect your Google account
- Gmail OAuth2 โ connect your Gmail account for email reports
- HTTP Basic Auth โ your Jira email + API token (get token at id.atlassian.com/manage-profile/security/api-tokens)
- OpenAI API โ for the AI summary (GPT-4o-mini)
Step 3 โ Update the workflow
- Open the
Read Log Sheetnode and select your spreadsheet and sheet tab - Open the
Update Sheetnode and do the same - Open
Jira: Add Worklogand update the Atlassian domain in the URL:https://YOUR-DOMAIN.atlassian.net/... - Open both Gmail nodes and update the
sendToemail address - Select your HTTP Basic Auth credential in
Jira: Add Worklog
Step 4 โ Activate
Toggle the workflow to Active. It will run automatically every night at 10 PM.
To test immediately, open the workflow and click Test Workflow.
Requirements
- n8n (self-hosted or cloud)
- Google account with Google Sheets + Gmail
- Jira Cloud account with an API token
- OpenAI API key (free tier works for low volume)
Customising This Workflow
- Change the schedule โ edit the cron expression in the trigger node. Examples are in the sticky note
- Change the Jira domain โ update the URL in
Jira: Add Worklogto your Atlassian subdomain - Use Telegram instead of Gmail โ replace both Gmail nodes with a Telegram node using
chatIdandtext - Skip the AI summary โ delete the
AI Summarynode and wireBuild Summarydirectly to the Gmail node; update the email template to remove$json.message.content - Add multiple projects โ the sheet supports any mix of ticket IDs from different Jira projects in the same run
- Catch missed past days โ the filter already picks up rows where
date < today, so any past pending rows are automatically retried on the next run
๐ Nodes Used
Google Sheets, HTTP Request, Gmail, Schedule Trigger, OpenAI
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File