# AI Timesheet Generator with Gmail and Calendar: n8n workflow

> Started by a clock, and works across GitHub, Gmail, Google Calendar and Google Sheets. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/ai-timesheet-generator-with-gmail-and-calendar (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Scheduling](https://millionrounds.com/workflows?category=Scheduling#library)

# AI Timesheet Generator with Gmail and Calendar

Started by a clock, and works across GitHub, Gmail, Google Calendar and Google Sheets. It hands the judgement calls to OpenAI. 24 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-timesheet-generator-with-gmail-and-calendar)

**24 steps** Large: read it before trusting it with anything live

**4** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 1 Model 1 Logic 15 Service 7

The steps in the order they run, from what starts it.

- 1 **Daily at 7PM** Cron *Starts it*
- 2 **Set Variables** Set *Logic*
- 3 **Get Today's Emails** Gmail *Service*
- 4 **Get Today's Calendar Events** Google Calendar *Service*
- 5 **Create Sheet If It Doesn't Exist** Google Sheets *Service*
- 6 **Split Out1** Split Out *Logic*
- 7 **Split Out2** Split Out *Logic*
- 8 **Aggregate** Aggregate *Logic*
- 9 **Aggregate1** Aggregate *Logic*
- 10 **If it didn't exist** If *Logic*
- 11 **Get Commits From Github** Http Request *Service*
- 12 **Get GitHub PRs** Github *Service*
- 13 **Merge** Merge *Logic*
- 14 **Init Sheet Headers** Set *Logic*
- 15 **If Authors Commit** If *Logic*
- 16 **If it's created today** If *Logic*
- 17 **If it's closed today** If *Logic*
- 18 **Format All Data** Code *Logic*
- 19 **init Sheet Columns** Google Sheets *Service*
- 20 **Aggregate3** Aggregate *Logic*
- 21 **Aggregate2** Aggregate *Logic*
- 22 **Generate Journal Summary** Open Ai *Model*
- 23 **Split Out** Split Out *Logic*
- 24 **Insert Sheets Entry** Google Sheets *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 24, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** GitHub, Gmail, Google Calendar, Google Sheets
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own GitHub, Gmail, Google Calendar and Google Sheets accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 24 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 24 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-timesheet-generator-with-gmail-and-calendar)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[GitHub](https://millionrounds.com/workflows?service=GitHub#library)[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Calendar](https://millionrounds.com/workflows?service=Google+Calendar#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also scheduling, with the same services where possible, closest in size first.

- [**Agent personnel with OpenAI and Gmail** 24 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/agent-personnel-with-openai-and-gmail)
- [**Automate meeting summaries from Fireflies transcripts** 24 steps · calls a model · Gmail](https://millionrounds.com/workflow/automate-meeting-summaries-from-fireflies-transcripts)
- [**Automate tenant rent collection with Sheets and Gmail** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-tenant-rent-collection-with-sheets-and-gmail)
- [**Deploy a Google Gemini AI assistant on WhatsApp with Gmail** 24 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/deploy-a-google-gemini-ai-assistant-on-whatsapp-with-gmail)
- [**Handle healthcare appointments on WhatsApp with Gemini** 24 steps · calls a model · Google Calendar, Google Sheets](https://millionrounds.com/workflow/handle-healthcare-appointments-on-whatsapp-with-gemini)
- [**Send rent reminders and weekly AI summaries with OpenAI** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/send-rent-reminders-and-weekly-ai-summaries-with-openai)
