# Automate agile refinement prep with Gmail and OpenAI: n8n workflow

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

Source: https://millionrounds.com/workflow/automate-agile-refinement-prep-with-gmail-and-openai (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)

# Automate agile refinement prep with Gmail and OpenAI

Started by a clock, and works across Gmail, Google Calendar, Google Drive and Google Sheets. It hands the judgement calls to OpenAI. 42 steps, 1 branch, 3 loops or waits: 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%2Fautomate-agile-refinement-prep-with-gmail-and-openai)

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

**1** Branch: places the flow splits

**3** Loops or waits

**4** Services it connects to

## The flow

Starts it 3 Model 10 Logic 15 Service 14

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

- 1 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 2 **Schedule Trigger** Schedule trigger *Starts it*
- 3 **OpenAI Business Analyst** Lm Chat Open Ai *Model*
- 4 **OpenAI Technical Analyst** Lm Chat Open Ai *Model*
- 5 **OpenAI Scrum Master Emailer** Lm Chat Open Ai *Model*
- 6 **OpenAI Scrum Master Story Feedback** Lm Chat Open Ai *Model*
- 7 **OpenAI Scrum Master DoR Check** Lm Chat Open Ai *Model*
- 8 **Error Trigger** Error trigger *Starts it*
- 9 **Start Here: Set Environment Variables** Set *Logic*
- 10 **Business Validation** Agent *Model*
- 11 **Development Team Validation** Agent *Model*
- 12 **Draft Email for Refinement** Agent *Model*
- 13 **Provide Scrum Master Feedback on the story** Agent *Model*
- 14 **Compare User Story to DoR Criterium** Agent *Model*
- 15 **Send Error Email** Gmail *Service*
- 16 **No Operation, do nothing** No Op *Logic*
- 17 **Update Business Validation in Backlog** Google Sheets *Service*
- 18 **Update Technical Validation in Backlog** Google Sheets *Service*
- 19 **Ask Approval to Scrum Master** Gmail *Service*
- 20 **Update Scrum feedback in Backlog** Google Sheets *Service*
- 21 **Aggregate DoR check to User Story Level** Aggregate *Logic*
- 22 **Load Calendar of Scrum Master** Google Calendar *Service*
- 23 **Loop Over Items Business Feedback** Split In Batches *Logic*
- 24 **Loop Over Items Technical Feedback** Split In Batches *Logic*
- 25 **If Email content is Approved** If *Logic*
- 26 **Loop Over Items for DoR check** Split In Batches *Logic*
- 27 **Add DoR feedback to User Story** Merge *Logic*
- 28 **Check for Refinement Project A** Filter *Logic*
- 29 **Add Business feedback to Story** Merge *Logic*
- 30 **Add Technical feedback to the story** Merge *Logic*
- 31 **Send Email to Attendees** Gmail *Service*
- 32 **Create Draft in Scrum Master Email** Gmail *Service*
- 33 **Add Scrum Feedback to Story** Merge *Logic*
- 34 **Read DoR criteria** Google Sheets *Service*
- 35 **If no event do nothing** No Op *Logic*
- 36 **Combine stories into one list** Aggregate *Logic*
- 37 **Make aware the draft is ready to be adjusted manually** Gmail *Service*
- 38 **Take DoR link for further referral** Google Drive *Service*
- 39 **Take backlog link for further referral** Google Drive *Service*
- 40 **Select Stories Ready for Refinement from Backlog** Google Sheets *Service*
- 41 **Select Stories High Prio To Do from Backlog** Google Sheets *Service*
- 42 **Join Potential Stories for Refinement** Merge *Logic*

## How it's built

- **Starts on:** A clock
- **Steps:** 42, with 1 branch, 3 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Calendar, Google Drive, Google Sheets
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Calendar, Google Drive 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 42 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 42 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%2Fautomate-agile-refinement-prep-with-gmail-and-openai)
- **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.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Calendar](https://millionrounds.com/workflows?service=Google+Calendar#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#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.

- [**Automate sprint planning with OpenAI and Google Calendar** 42 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automate-sprint-planning-with-openai-and-google-calendar)
- [**Generate and schedule themed social posts with Notion** 44 steps · calls a model · Google Drive, Notion](https://millionrounds.com/workflow/generate-and-schedule-themed-social-posts-with-notion)
- [**Priya AI Virtual Assisstant Version 2 with Gemini and OpenAI** 40 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/priya-ai-virtual-assisstant-version-2-with-gemini-and-openai)
- [**AI-powered Telegram business assistant with OpenAI and Google** 45 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/ai-powered-telegram-business-assistant-with-openai-and-googl)
- [**Automated marketing campaign email system with HubSpot** 39 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automated-marketing-campaign-email-system-with-hubspot)
- [**Integrate Google Workspace with OpenAI** 39 steps · Gmail, Google Calendar](https://millionrounds.com/workflow/integrate-google-workspace-with-openai)
