Auto-generate Lessons Learned reports from Jira Epics to Google Docs
Jira Epic marked Done → fetch related issues and comments → AI generates structured Lessons Learned report → write to designated Google Docs document
- Who
- Agile teams using Jira Epics who want automated retrospective documentation
- You get
- When an Epic closes, the workflow collects linked issues and comments, uses AI with a fixed Markdown format to generate a report, and inserts it into Google Docs
- You need
- n8n · jira · google-docs
Constraints
Requires an n8n instance, Jira Cloud API credentials, OpenAI API credentials, Google Docs OAuth2 credentials, and a target Google Docs document ID. The template uses gpt-4o-mini by default and supports switching to other models in the same family. The AI Agent relies on a System Message to define output format; Simple Memory provides a conversational window.
What they did
Author tarekadam published a workflow template in the n8n template library. The template uses a Jira Trigger listening for issue_updated, filters for Epic status becoming Done via an If node, then chains Jira Get All Issues, Jira Get All Comments, Edit Fields, Summarize, AI Agent (OpenAI Chat Model + Simple Memory), and Google Docs nodes to automate delivery from trigger to document.
How it went
The template is published in the n8n official template library with 7930 views (source report, author_report). It provides a complete System Message to standardize AI output and includes Google Docs compatibility formatting rules.
Worth knowing
1. Default model is gpt-4o-mini; you can switch to gpt-4o or others in the OpenAI Chat Model node. 2. The Jira Trigger additionalFields.filter is empty; consider adding a JQL filter if you have a large Jira instance to reduce noise. 3. The Google Docs node requires you to supply a documentURL; the template ships with an empty string there. 4. The Edit Fields node extracts Comment via $json.body.content[0].content[0].text, which may not capture complex comment structures. 5. This site has not imported or run the template (reproduction=not_tested); validate with test data during setup.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Jira Get All Issues node: connect jiraSoftwareCloudApi credentials.
- Jira Get All Comments node: connect jiraSoftwareCloudApi credentials.
- OpenAI Chat Model node: connect OpenAI API credentials.
- Google Docs node: connect googleDocsOAuth2Api credentials.
- Jira Trigger node: connect jiraSoftwareCloudApi credentials.
Configuration to replace
- Source template is n8n public workflow #3934 (~13 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Configure trigger and Done filter
Add a Jira Trigger node and select the jira:issue_updated event. Then add an If node with the condition changelog.items[0].toString equals Done, so the workflow only proceeds when an Epic transitions to Done.
Fetch Epic issues and comments, then summarize fields
Add Jira Get All Issues and Jira Get All Comments nodes using the same Jira credential. Use an Edit Fields (Set) node to extract EpicName, EpicStatus, Title, Description, and Comment, where Comment is pulled from the comment body text. Then use a Summarize node to group by EpicName/EpicStatus/Title/Description and concatenate Comment values with newlines into concatenated_Comment.
Configure AI Agent for report generation
Add an AI Agent node, connect OpenAI Chat Model (default gpt-4o-mini) and Simple Memory. In the AI Agent Text field, paste the user input template. In Options > System Message, paste the full System Message provided by the source. The System Message defines the Lessons Learned Markdown structure, Google Docs compatibility rules (asterisk bullets, double-space line breaks, backtick code), and content requirements.
Execution prompt · Source text。AI Agent node Text input field (user message template when promptType=define)
=comments = {{ $json.concatenated_Comment }} description = {{ $json.Description }} title = {{ $json.Title }} status = {{ $json.EpicStatus }} epic_name = {{ $json.EpicName }}Execution prompt · Source text。AI Agent node Options > System Message field
=You are an AI assistant specialized in creating comprehensive Agile retrospective documents. Your task is to analyze the provided information about a completed task and generate an insightful **Lessons Learned** report formatted in **clean Markdown**, optimized for seamless conversion to Google Docs. --- ### 📥 Input Format You will receive structured input containing: * `epic_name`: The broader initiative or project category * `title`: The specific task or user story name * `description`: A concise explanation of what the task involved --- ### 📤 Output Instructions Generate a detailed **Lessons Learned** report using the following **Markdown** structure: # LESSONS LEARNED REPORT **Epic:** {epic_name} **Date:** {{$today.format('yyyy-MM-dd')}}} **Task:** {title} **Description:** {description} ## Key Findings * Clear, specific insight about a technical challenge encountered * Process-related discovery that impacted delivery * Team dynamics observation or workflow improvement identified * {Add more if needed} ## Comments & Observations {Write 2–3 paragraphs with:} * Specific examples from task execution * Feedback or quotes from team members (if available) * Comparisons to prior approaches * Unexpected challenges or positive surprises ## Actionable Recommendations 1. Specific, implementable action to address a finding 2. Concrete suggestion for process improvement 3. Recommendation for knowledge sharing or team development 4. {Add more as needed} ## Metrics & Impact {When possible, include:} * Time saved or efficiency gained * Quality improvements * User/customer feedback * Cost implications ## Tags `#lessons-learned` `#{normalized_epic_name}` `#{relevant_technology}` `#{improvement_area}` --- ### 📝 Guidelines 1. **Be specific** – use real details, not vague statements 2. **Stay relevant** – stick to the task and its broader context 3. **Focus on learning** – prioritize transferable insights 4. **Balance** – include both wins and challenges 5. **Actionability** – make every suggestion doable 6. **Concise yet clear** – avoid fluff; write for impact 7. **Formatting Guidelines for Google Docs compatibility:** * Use only asterisks (*) for bullet points, never hyphens (-) * Add two spaces after each line in lists for proper line breaks * Always leave a blank line before and after headings * Avoid using underscores (_) in text; use hyphens (-) instead * For emphasis, use consistently **bold** for important points and *italics* for supplementary information * When mentioning code or technical terms, use `single backticks`, never triple backticks * Use a pipe-separated format for tables as shown in the template * Keep paragraphs short (3-5 sentences) for better readability 8. **Metadata Handling:** Include the epic name and task title exactly as provided in the input, without modification 9. **Date Format:** Use YYYY-MM-DD format for the date for consistent sorting and display 10. **Tags:** Keep tags lowercase, with hyphens instead of spaces, and relevant to the content ---Configure Google Docs output node
Add a Google Docs node, select operation update, and enter the target document link or ID in documentURL. In actionsUi > actionFields, set action to insert and text to {{ $json.output }} to insert the AI Agent output into the document.
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
You are setting up an n8n workflow: when a Jira Epic status changes to Done, automatically collect all issues and comments under that Epic, have AI generate a structured Lessons Learned report, and write it to a designated Google Docs document. Pre-flight checklist: - [ ] Accessible n8n instance (self-hosted or Cloud) - [ ] Jira Cloud API credential created (jiraSoftwareCloudApi) - [ ] OpenAI API credential created (openAiApi) - [ ] Google Docs OAuth2 credential created (googleDocsOAuth2Api) - [ ] Target Google Docs document prepared and its ID/URL obtained - [ ] Confirmed that your Jira workflow includes a Done status for Epics Recommended approach: import the template workflow.json, then verify node parameters against the steps above, especially the AI Agent System Message and the Google Docs documentURL. Test with a dummy Epic before production use.
To adjust report style, modify the AI Agent System Message; do not change node connections.
Source
Generate lessons learned reports from Jira epics with AI and Google Docs · tarekadam · n8n.io · 2025-05-08
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.