diff --git a/workflows/Automate Agile Refinement Prep with Gmail, OpenAI & Google Sheets-3909/readme-3909.md b/workflows/Automate Agile Refinement Prep with Gmail, OpenAI & Google Sheets-3909/readme-3909.md new file mode 100644 index 000000000..bc4fc52fa --- /dev/null +++ b/workflows/Automate Agile Refinement Prep with Gmail, OpenAI & Google Sheets-3909/readme-3909.md @@ -0,0 +1,597 @@ +Automate Agile Refinement Prep with Gmail, OpenAI & Google Sheets + +https://n8nworkflows.xyz/workflows/automate-agile-refinement-prep-with-gmail--openai---google-sheets-3909 + + +# Automate Agile Refinement Prep with Gmail, OpenAI & Google Sheets + +### 1. Workflow Overview + +This workflow automates the preparation for Agile backlog refinement sessions using Google Sheets, Gmail, OpenAI, and Google Calendar. Targeted at Scrum Masters, Agile Coaches, and Product Owners, it ensures high-quality, validated user stories are ready ahead of refinement meetings, streamlining collaboration and communication. + +The workflow consists of the following logical blocks: + +- **1.1 Trigger and Initialization:** Manual or scheduled start, environment setup. +- **1.2 Calendar Event Check:** Query Google Calendar for upcoming refinement events. +- **1.3 Backlog Retrieval and Filtering:** Extract user stories from Google Sheets backlog, filter by readiness and priority. +- **1.4 Definition of Ready (DoR) Validation:** Validate stories against DoR criteria using AI agents. +- **1.5 Multi-Perspective AI Feedback:** Obtain Scrum Master, Business, and Technical feedback on each story from OpenAI. +- **1.6 Feedback Aggregation and Backlog Update:** Merge AI feedback and update the backlog in Google Sheets. +- **1.7 Email Composition and Approval Flow:** Generate a structured HTML email summarizing refinement content, send for Scrum Master approval, and then either send or create a draft email. +- **1.8 Error Handling:** Capture failures and send error notifications via email. + +--- + +### 2. Block-by-Block Analysis + +#### 1.1 Trigger and Initialization + +**Overview:** +Starts the workflow manually or via a scheduled trigger and sets up environment variables required for the entire flow. + +**Nodes Involved:** +- When clicking ‘Test workflow’ +- Schedule Trigger (disabled) +- Start Here: Set Environment Variables +- No Operation, do nothing + +**Node Details:** + +- **When clicking ‘Test workflow’** + - Type: Manual trigger node + - Role: Allows manual start for testing or ad-hoc runs + - Inputs: None + - Outputs: Connects to environment variable setup + - Edge Cases: None significant + +- **Schedule Trigger** + - Type: Schedule trigger node (disabled) + - Role: Intended for scheduled runs (e.g., periodic checks) + - Inputs: None + - Outputs: Connects to environment variable setup if enabled + - Edge Cases: Disabled, no effect unless enabled and configured + +- **Start Here: Set Environment Variables** + - Type: Set node + - Role: Defines workflow-wide variables such as sheet names, statuses, and other parameters + - Inputs: Trigger nodes + - Outputs: Connects to No Operation and calendar loading + - Edge Cases: Misconfiguration could break downstream logic + +- **No Operation, do nothing** + - Type: NoOp node + - Role: Placeholder allowing parallel path to calendar loading + - Inputs: Environment setup node + - Outputs: Connects to Load Calendar of Scrum Master node + - Edge Cases: None + +--- + +#### 1.2 Calendar Event Check + +**Overview:** +Checks the Scrum Master's Google Calendar for upcoming refinement events to trigger the backlog processing only if relevant events exist. + +**Nodes Involved:** +- Load Calendar of Scrum Master +- Check for Refinement Project A (Filter) +- If no event do nothing (NoOp) +- Take DoR link for further referral (Google Drive) +- Take backlog link for further referral (Google Drive) + +**Node Details:** + +- **Load Calendar of Scrum Master** + - Type: Google Calendar node + - Role: Fetches calendar events for the Scrum Master to detect refinement meetings + - Configuration: Uses OAuth2 credentials for Google Calendar; queries for events with specific naming conventions + - Inputs: No Operation node + - Outputs: Filter node to check for refinement event + - Edge Cases: API rate limits, auth failures, no events found + +- **Check for Refinement Project A** + - Type: Filter node + - Role: Filters calendar events to find a refinement session for a specific project + - Inputs: Calendar events node + - Outputs: If event found, continues workflow; else triggers no-op + - Edge Cases: No matching event leads to no further processing + +- **If no event do nothing** + - Type: NoOp node + - Role: Terminates workflow path if no refinement event is found + - Inputs: Filter node negative output + - Outputs: Connects to DoR link retrieval for possible logging or reference + - Edge Cases: None + +- **Take DoR link for further referral** + - Type: Google Drive node + - Role: Retrieves the link to the Definition of Ready document for later reference + - Inputs: No Operation node after no event or calendar check + - Outputs: Passes link to backlog link retrieval node + - Edge Cases: Access permissions, file not found + +- **Take backlog link for further referral** + - Type: Google Drive node + - Role: Retrieves the backlog document link for further processing + - Inputs: DoR link retrieval node + - Outputs: Connects to Google Sheets nodes fetching backlog stories + - Edge Cases: Permissions, file availability + +--- + +#### 1.3 Backlog Retrieval and Filtering + +**Overview:** +Pulls user stories from the Google Sheets backlog and filters them by their readiness and priority status for refinement consideration. + +**Nodes Involved:** +- Select Stories Ready for Refinement from Backlog +- Select Stories High Prio To Do from Backlog +- Join Potential Stories for Refinement (Merge) + +**Node Details:** + +- **Select Stories Ready for Refinement from Backlog** + - Type: Google Sheets node + - Role: Reads user stories marked as ready for refinement based on configured criteria (e.g., status column) + - Configuration: Uses credentials with access to backlog sheet, queries rows filtered by status + - Inputs: Backlog link retrieval node + - Outputs: Merge node for combining with high priority stories + - Edge Cases: Sheet structure change, empty result sets + +- **Select Stories High Prio To Do from Backlog** + - Type: Google Sheets node + - Role: Reads user stories marked as high priority and to-do, ensuring critical items are included + - Inputs: Backlog link retrieval node + - Outputs: Merge node + - Edge Cases: Same as above + +- **Join Potential Stories for Refinement** + - Type: Merge node + - Role: Combines the two sets of stories (ready and high priority) into a single list without duplicates + - Inputs: Two Google Sheets nodes + - Outputs: Loop batches for DoR checking and Scrum feedback addition + - Edge Cases: Duplicate detection logic, large data sets + +--- + +#### 1.4 Definition of Ready (DoR) Validation + +**Overview:** +Validates each candidate user story against the Definition of Ready criteria using AI agents, ensuring stories meet the quality bar before refinement. + +**Nodes Involved:** +- Loop Over Items for DoR check (SplitInBatches) +- Read DoR criteria (Google Sheets) +- OpenAI Scrum Master DoR Check (LM Chat OpenAI) +- Compare User Story to DoR Criterium (Langchain Agent) +- Aggregate DoR check to User Story Level (Aggregate) +- Add DoR feedback to User Story (Merge) +- Provide Scrum Master Feedback on the story (Langchain Agent) +- Update Scrum feedback in Backlog (Google Sheets) + +**Node Details:** + +- **Loop Over Items for DoR check** + - Type: SplitInBatches + - Role: Processes user stories in batches to optimize API calls and resource use + - Inputs: Merged stories node + - Outputs: Parallel outputs to DoR criteria reading and Scrum feedback addition + - Edge Cases: Batch size misconfiguration leading to timeouts + +- **Read DoR criteria** + - Type: Google Sheets node + - Role: Retrieves the list of DoR criteria from a dedicated sheet for validation + - Inputs: Loop Over Items node (start) + - Outputs: Connects to AI agent for comparison + - Edge Cases: Criteria sheet changes or missing data + +- **OpenAI Scrum Master DoR Check** + - Type: LM Chat OpenAI node + - Role: Uses OpenAI to evaluate if the user story meets each DoR criterium + - Configuration: Uses OpenAI credentials, custom prompt for DoR check + - Inputs: DoR criteria and user story data + - Outputs: Connects to comparison node + - Edge Cases: API errors, prompt misconfiguration + +- **Compare User Story to DoR Criterium** + - Type: Langchain Agent node + - Role: Aggregates AI responses to determine compliance per story and criterium + - Inputs: AI DoR check node + - Outputs: Aggregation node for story-level summary + - Edge Cases: Data mismatch, aggregation errors + +- **Aggregate DoR check to User Story Level** + - Type: Aggregate node + - Role: Combines criterium-level checks into a consolidated story readiness rating + - Inputs: Comparison node + - Outputs: Merge node for adding DoR feedback + - Edge Cases: Aggregation logic errors + +- **Add DoR feedback to User Story** + - Type: Merge node + - Role: Attaches DoR feedback to the respective user story record + - Inputs: Aggregate node and Loop Over Items for Scrum feedback + - Outputs: Scrum Master feedback AI node + - Edge Cases: Data sync issues + +- **Provide Scrum Master Feedback on the story** + - Type: Langchain Agent node + - Role: Generates detailed Scrum Master perspective feedback on the story and DoR status + - Inputs: Merged story with DoR feedback + - Outputs: Google Sheets update node + - Edge Cases: API failures + +- **Update Scrum feedback in Backlog** + - Type: Google Sheets node + - Role: Writes back Scrum Master feedback into the backlog sheet to keep it up to date + - Inputs: Scrum Master feedback AI node + - Outputs: Loop Over Items for DoR check (cycle continuation) + - Edge Cases: Write permission, concurrent editing + +--- + +#### 1.5 Multi-Perspective AI Feedback + +**Overview:** +Collects business and technical validation from OpenAI agents on each user story to enrich refinement preparation with diverse expert feedback. + +**Nodes Involved:** +- Loop Over Items Business Feedback (SplitInBatches) +- OpenAI Business Analyst (LM Chat OpenAI) +- Business Validation (Langchain Agent) +- Update Business Validation in Backlog (Google Sheets) +- Loop Over Items Technical Feedback (SplitInBatches) +- OpenAI Technical Analyst (LM Chat OpenAI) +- Development Team Validation (Langchain Agent) +- Update Technical Validation in Backlog (Google Sheets) +- Add Scrum Feedback to Story (Merge) +- Add Business feedback to Story (Merge) +- Add Technical feedback to the story (Merge) +- Combine stories into one list (Aggregate) + +**Node Details:** + +- **Loop Over Items Business Feedback** + - Type: SplitInBatches + - Role: Processes stories batch-wise for business feedback generation + - Inputs: Scrum feedback merge node + - Outputs: Business AI node and merge node + - Edge Cases: Batch sizing, API throttling + +- **OpenAI Business Analyst** + - Type: LM Chat OpenAI + - Role: Generates business-related feedback on user stories + - Inputs: Business feedback loop + - Outputs: Business Validation agent node + - Edge Cases: API limits, prompt accuracy + +- **Business Validation** + - Type: Langchain Agent + - Role: Processes AI output for business validation insights + - Inputs: Business Analyst node + - Outputs: Updates backlog sheet node + - Edge Cases: Parsing errors + +- **Update Business Validation in Backlog** + - Type: Google Sheets node + - Role: Writes business feedback back to the backlog sheet + - Inputs: Business Validation agent + - Outputs: Loop Over Items Business Feedback continuation + - Edge Cases: Write conflicts + +- **Loop Over Items Technical Feedback** + - Type: SplitInBatches + - Role: Processes stories batch-wise for technical feedback generation + - Inputs: Business feedback merge node + - Outputs: Technical AI node and merge node + - Edge Cases: Same as business feedback + +- **OpenAI Technical Analyst** + - Type: LM Chat OpenAI + - Role: Provides technical feedback on user stories + - Inputs: Technical feedback loop + - Outputs: Development Team Validation agent node + - Edge Cases: API errors + +- **Development Team Validation** + - Type: Langchain Agent + - Role: Processes technical AI responses + - Inputs: Technical Analyst node + - Outputs: Google Sheets update node + - Edge Cases: Data format issues + +- **Update Technical Validation in Backlog** + - Type: Google Sheets node + - Role: Writes technical feedback back to backlog + - Inputs: Development Team Validation + - Outputs: Loop Over Items Technical Feedback continuation + - Edge Cases: Write permission issues + +- **Add Scrum Feedback to Story** + - Type: Merge node + - Role: Joins Scrum feedback with the story data for further processing + - Inputs: Batch loops and story data + - Outputs: Business feedback merge node and loop continuation + - Edge Cases: Data mismatch + +- **Add Business feedback to Story** + - Type: Merge node + - Role: Adds business feedback to story records + - Inputs: Business feedback loop and merge + - Outputs: Technical feedback loop node + - Edge Cases: Synchronization + +- **Add Technical feedback to the story** + - Type: Merge node + - Role: Adds technical feedback to stories + - Inputs: Technical feedback loop and merge nodes + - Outputs: Aggregate node to combine all feedback + - Edge Cases: Data consistency + +- **Combine stories into one list** + - Type: Aggregate node + - Role: Combines all feedback-enriched stories into a single collection for email drafting + - Inputs: Technical feedback merge node + - Outputs: Draft email AI node + - Edge Cases: Large data volume management + +--- + +#### 1.6 Feedback Aggregation and Backlog Update + +**Overview:** +After gathering all feedback, this block updates the backlog with all AI validations, ensuring the source of truth reflects the latest insights. + +**Nodes Involved:** +(Described above in feedback update nodes) +- Update Scrum feedback in Backlog +- Update Business Validation in Backlog +- Update Technical Validation in Backlog + +**Node Details:** +As described in previous block; each Google Sheets update node writes respective AI feedback back into the backlog to preserve data continuity and transparency. + +--- + +#### 1.7 Email Composition and Approval Flow + +**Overview:** +Generates a formatted email summarizing the refined backlog, requests Scrum Master approval, and upon approval, either sends the email or creates a draft for manual adjustment. + +**Nodes Involved:** +- Draft Email for Refinement (Langchain Agent) +- OpenAI Scrum Master Emailer (LM Chat OpenAI) +- Ask Approval to Scrum Master (Gmail) +- If Email content is Approved (If) +- Send Email to Attendees (Gmail) +- Create Draft in Scrum Master Email (Gmail) +- Make aware the draft is ready to be adjusted manually (Gmail) + +**Node Details:** + +- **Draft Email for Refinement** + - Type: Langchain Agent + - Role: Drafts a structured, HTML-rich email summarizing stories and feedback for the refinement session + - Inputs: Aggregated story list with feedback + - Outputs: Gmail node requesting approval + - Edge Cases: Prompt clarity affecting email quality + +- **OpenAI Scrum Master Emailer** + - Type: LM Chat OpenAI + - Role: Provides the text content or enhancements for the email draft + - Inputs: Aggregated stories + - Outputs: Draft Email node + - Edge Cases: API errors + +- **Ask Approval to Scrum Master** + - Type: Gmail node + - Role: Sends email to Scrum Master requesting content approval; linked to webhook for response + - Inputs: Draft Email node + - Outputs: If node for approval decision + - Edge Cases: Gmail API limits, webhook failures + +- **If Email content is Approved** + - Type: If node + - Role: Branches workflow based on Scrum Master's approval response + - Inputs: Approval Gmail node webhook + - Outputs: Sends email or creates draft + +- **Send Email to Attendees** + - Type: Gmail node + - Role: Sends finalized email to team members for refinement session + - Inputs: If node approval branch + - Edge Cases: Email sending failures, rate limits + +- **Create Draft in Scrum Master Email** + - Type: Gmail node + - Role: Creates an email draft in Scrum Master's mailbox for manual review/editing + - Inputs: If node rejection branch + - Outputs: Notification node + +- **Make aware the draft is ready to be adjusted manually** + - Type: Gmail node + - Role: Sends notification email to Scrum Master indicating the draft is ready for manual adjustment + - Inputs: Draft creation node + - Edge Cases: Email delivery issues + +--- + +#### 1.8 Error Handling + +**Overview:** +Monitors workflow errors and sends notification emails to administrators or operators for quick response. + +**Nodes Involved:** +- Error Trigger +- Send Error Email (Gmail) + +**Node Details:** + +- **Error Trigger** + - Type: Error Trigger node + - Role: Captures any unhandled errors in workflow execution + - Outputs: Sends error details to email node + - Edge Cases: None + +- **Send Error Email** + - Type: Gmail node + - Role: Sends detailed error report to predefined recipients + - Configuration: Uses Gmail credentials; retries enabled + - Edge Cases: Email sending failures + +--- + +### 3. Summary Table + +| Node Name | Node Type | Functional Role | Input Node(s) | Output Node(s) | Sticky Note | +|----------------------------------|---------------------------------|-------------------------------------------------|-----------------------------------|---------------------------------------------------|-------------------------------------------| +| When clicking ‘Test workflow’ | Manual Trigger | Manual start trigger | None | Start Here: Set Environment Variables | | +| Schedule Trigger | Schedule Trigger (disabled) | Scheduled start trigger (disabled) | None | Start Here: Set Environment Variables | | +| Start Here: Set Environment Variables | Set | Define environment variables | Manual/Scheduled Trigger | No Operation, do nothing | | +| No Operation, do nothing | NoOp | Placeholder for parallel execution | Set Environment Variables | Load Calendar of Scrum Master | | +| Load Calendar of Scrum Master | Google Calendar | Fetch Scrum Master's calendar events | No Operation | Check for Refinement Project A | | +| Check for Refinement Project A | Filter | Filter events for refinement meeting | Load Calendar | If no event do nothing, or continue workflow | | +| If no event do nothing | NoOp | End path if no refinement event found | Filter | Take DoR link for further referral | | +| Take DoR link for further referral| Google Drive | Retrieve DoR criteria document link | NoOp | Take backlog link for further referral | | +| Take backlog link for further referral| Google Drive | Retrieve backlog document link | DoR link retrieval | Select Stories Ready for Refinement from Backlog, Select Stories High Prio To Do from Backlog | | +| Select Stories Ready for Refinement from Backlog | Google Sheets | Extract stories ready for refinement | Backlog link retrieval | Join Potential Stories for Refinement | | +| Select Stories High Prio To Do from Backlog | Google Sheets | Extract high priority to-do stories | Backlog link retrieval | Join Potential Stories for Refinement | | +| Join Potential Stories for Refinement | Merge | Combine story lists without duplicates | Two Google Sheets nodes | Loop Over Items for DoR check, Add Scrum Feedback to Story | | +| Loop Over Items for DoR check | SplitInBatches | Batch processing of stories for DoR check | Merge node | Read DoR criteria, Add Scrum Feedback to Story | | +| Read DoR criteria | Google Sheets | Retrieve DoR criteria from sheet | Loop Over Items for DoR check | Compare User Story to DoR Criterium | | +| OpenAI Scrum Master DoR Check | LM Chat OpenAI | AI evaluation of user story against DoR criteria | Read DoR criteria | Compare User Story to DoR Criterium | | +| Compare User Story to DoR Criterium | Langchain Agent | Aggregate AI DoR evaluations | OpenAI DoR Check | Aggregate DoR check to User Story Level | | +| Aggregate DoR check to User Story Level | Aggregate | Consolidate DoR results per user story | Comparison node | Add DoR feedback to User Story | | +| Add DoR feedback to User Story | Merge | Attach DoR feedback to user story | Aggregate node, Loop Over Items | Provide Scrum Master Feedback on the story | | +| Provide Scrum Master Feedback on the story | Langchain Agent | Generate Scrum Master perspective feedback | Merge node | Update Scrum feedback in Backlog | | +| Update Scrum feedback in Backlog | Google Sheets | Write Scrum feedback back to backlog | Scrum Master feedback node | Loop Over Items for DoR check (cycle continuation) | | +| Loop Over Items Business Feedback | SplitInBatches | Batch processing for business feedback | Add Scrum Feedback to Story | OpenAI Business Analyst, Add Business feedback to Story | | +| OpenAI Business Analyst | LM Chat OpenAI | Generate business feedback AI responses | Loop Over Items Business Feedback | Business Validation | | +| Business Validation | Langchain Agent | Process business AI feedback | OpenAI Business Analyst | Update Business Validation in Backlog | | +| Update Business Validation in Backlog | Google Sheets | Write business feedback back to backlog | Business Validation | Loop Over Items Business Feedback (cycle continuation)| | +| Loop Over Items Technical Feedback | SplitInBatches | Batch processing for technical feedback | Add Business feedback to Story | OpenAI Technical Analyst, Add Technical feedback to the story | | +| OpenAI Technical Analyst | LM Chat OpenAI | Generate technical feedback AI responses | Loop Over Items Technical Feedback | Development Team Validation | | +| Development Team Validation | Langchain Agent | Process technical AI feedback | OpenAI Technical Analyst | Update Technical Validation in Backlog | | +| Update Technical Validation in Backlog | Google Sheets | Write technical feedback back to backlog | Development Team Validation | Loop Over Items Technical Feedback (cycle continuation)| | +| Add Scrum Feedback to Story | Merge | Combine Scrum feedback with story | Loop Over Items for DoR check | Loop Over Items Business Feedback, Add Business feedback to Story | | +| Add Business feedback to Story | Merge | Combine business feedback with story | Loop Over Items Business Feedback | Loop Over Items Technical Feedback, Add Technical feedback to the story | | +| Add Technical feedback to the story | Merge | Combine technical feedback with story | Loop Over Items Technical Feedback | Combine stories into one list | | +| Combine stories into one list | Aggregate | Aggregate all enriched stories into a single list | Add Technical feedback to the story | Draft Email for Refinement | | +| Draft Email for Refinement | Langchain Agent | Generate structured email content for refinement | Combine stories into one list | Ask Approval to Scrum Master | | +| OpenAI Scrum Master Emailer | LM Chat OpenAI | Assist in drafting email content | Combine stories into one list | Draft Email for Refinement | | +| Ask Approval to Scrum Master | Gmail | Send email requesting Scrum Master approval | Draft Email for Refinement | If Email content is Approved | | +| If Email content is Approved | If | Branch based on Scrum Master approval response | Ask Approval to Scrum Master | Send Email to Attendees, Create Draft in Scrum Master Email | | +| Send Email to Attendees | Gmail | Send finalized email to refinement attendees | If Email content is Approved | None | | +| Create Draft in Scrum Master Email| Gmail | Create draft email for manual adjustment | If Email content is Approved | Make aware the draft is ready to be adjusted manually | | +| Make aware the draft is ready to be adjusted manually | Gmail | Notify Scrum Master a draft is ready for review | Create Draft in Scrum Master Email | None | | +| Error Trigger | Error Trigger | Capture workflow errors | None | Send Error Email | | +| Send Error Email | Gmail | Send error notification email | Error Trigger | None | | + +--- + +### 4. Reproducing the Workflow from Scratch + +1. **Create Trigger Nodes:** + - Add a **Manual Trigger** node named “When clicking ‘Test workflow’” for manual runs. + - Optionally add a **Schedule Trigger** node (disabled by default) for periodic runs. + +2. **Set Environment Variables:** + - Add a **Set** node named “Start Here: Set Environment Variables”. Define variables such as sheet names, backlog and DoR document IDs/links, statuses (e.g., "Ready for Refinement", "High Priority"), and any email templates or AI prompt parameters. + +3. **Add No Operation Node:** + - Insert a **NoOp** node “No Operation, do nothing” connected from environment variables to allow parallel flow. + +4. **Calendar Event Check:** + - Add a **Google Calendar** node “Load Calendar of Scrum Master” configured to use OAuth2 credentials to fetch events in a relevant time window, filtering on naming patterns related to refinement meetings. + - Connect **NoOp** node output to this calendar node. + +5. **Check for Refinement Event:** + - Add a **Filter** node “Check for Refinement Project A” to detect if any calendar event matches the refinement criteria (e.g., event title). + - If no event, connect to a **NoOp** node “If no event do nothing” to end workflow path. + +6. **Retrieve DoR and Backlog Links:** + - From “If no event do nothing” node, add two sequential **Google Drive** nodes: + - “Take DoR link for further referral” to get the DoR document link. + - “Take backlog link for further referral” to get backlog document link. + +7. **Backlog Retrieval:** + - Add two **Google Sheets** nodes: + - “Select Stories Ready for Refinement from Backlog” to read stories with status “Ready for Refinement”. + - “Select Stories High Prio To Do from Backlog” to read stories marked as high priority and to-do. + - Both use the backlog link from the previous step. + +8. **Merge Stories:** + - Add a **Merge** node “Join Potential Stories for Refinement” to combine these two story sets. + +9. **Loop and Validate DoR:** + - Add a **SplitInBatches** node “Loop Over Items for DoR check” processing merged stories in batches. + - Connect one output to a **Google Sheets** node “Read DoR criteria” to fetch DoR criteria. + - Pass these to an **LM Chat OpenAI** node “OpenAI Scrum Master DoR Check” configured with a prompt to evaluate stories against each DoR criterium. + - Connect output to a **Langchain Agent** node “Compare User Story to DoR Criterium” for aggregation. + - Then use an **Aggregate** node “Aggregate DoR check to User Story Level” to consolidate results. + - Merge results back to the story data with a **Merge** node “Add DoR feedback to User Story”. + +10. **Scrum Master Feedback:** + - Use a **Langchain Agent** node “Provide Scrum Master Feedback on the story” to generate Scrum Master insights on stories with DoR feedback. + - Update backlog sheet with a **Google Sheets** node “Update Scrum feedback in Backlog”. + - Loop back output to “Loop Over Items for DoR check” for continuous processing. + +11. **Multi-Perspective AI Feedback:** + - Add a **SplitInBatches** node “Loop Over Items Business Feedback” connected from the Scrum feedback merge node. + - Connect it to an **LM Chat OpenAI** node “OpenAI Business Analyst” with business feedback prompt. + - Process output with a **Langchain Agent** “Business Validation”. + - Update backlog with “Update Business Validation in Backlog” Google Sheets node. + - Loop back to business feedback split node. + - Similarly, add a **SplitInBatches** node “Loop Over Items Technical Feedback” connected from business feedback merge node. + - Use “OpenAI Technical Analyst” LM Chat OpenAI node for technical feedback. + - Process with “Development Team Validation” Langchain Agent. + - Update backlog with “Update Technical Validation in Backlog” Google Sheets node. + - Loop back to technical feedback split node. + +12. **Merge All Feedback:** + - Use a chain of **Merge** nodes to sequentially add Scrum, Business, and Technical feedback to stories: + - “Add Scrum Feedback to Story” + - “Add Business feedback to Story” + - “Add Technical feedback to the story” + - Aggregate with “Combine stories into one list”. + +13. **Email Drafting and Approval:** + - Add a **Langchain Agent** node “Draft Email for Refinement” to create an HTML email body from combined stories. + - Assist with “OpenAI Scrum Master Emailer” LM Chat OpenAI node for tone and formatting. + - Use a **Gmail** node “Ask Approval to Scrum Master” to send email for approval with webhook enabled. + - Add an **If** node “If Email content is Approved” to branch on Scrum Master’s response. + - If approved, use **Gmail** node “Send Email to Attendees” to send the final email. + - If not approved, create a draft with **Gmail** node “Create Draft in Scrum Master Email”. + - Notify Scrum Master with “Make aware the draft is ready to be adjusted manually” Gmail node. + +14. **Error Handling:** + - Add an **Error Trigger** node to catch workflow errors. + - Connect it to a **Gmail** node “Send Error Email” configured to notify admins with error details. + +15. **Credentials Setup:** + - Configure Google Calendar, Google Drive, Google Sheets, and Gmail nodes with OAuth2 credentials. + - Configure OpenAI nodes with proper API key credentials. + +16. **Testing and Validation:** + - Use manual trigger to test workflow end-to-end. + - Verify AI prompt outputs, email formatting, and error handling. + +--- + +### 5. General Notes & Resources + +| Note Content | Context or Link | +|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| +| Use consistent event naming conventions in Google Calendar to ensure accurate refinement event detection. | Workflow setup instruction | +| Customize AI prompts in OpenAI nodes to align feedback tone and style with your team culture. | Workflow customization tip | +| Replace Google Sheets with Jira or Airtable by modifying data retrieval and update nodes accordingly. | Extensibility advice | +| Switch Gmail nodes to Outlook or SMTP nodes for email sending if preferred. | Integration flexibility | +| The workflow features retry and error handling with exponential backoff to improve robustness. | Operational resilience | +| For approval email webhook configuration, ensure the Gmail API is correctly set up with push notifications.| Gmail webhook integration details | +| Project credits and detailed blog post available at: https://example.com/automate-agile-refinement-prep | External resource for deeper understanding | +| AI-powered multi-perspective feedback is a unique selling point of this workflow, enhancing backlog quality.| Marketing point | + +--- + +This completes the comprehensive reference for the "Automate Agile Refinement Prep with Gmail, OpenAI & Google Sheets" workflow. \ No newline at end of file