Opening Problem Statement
Meet Sarah, a customer support manager at a fast-growing software company. Every day, she faces the daunting task of managing numerous unresolved JIRA issues that have been pending for more than a week. These long-lived tickets often get overlooked, leading to frustrated customers, wasted agent time following up manually, and ultimately, delayed resolutions that can cost the company both time and money.
Sarah estimates that handling these zombie tickets manually wastes her team several hours every week and increases the risk of poor customer satisfaction scores due to delays in responses. With the volume of tickets continuously rising, she needs a smart, automated way to manage these long-standing issues efficiently and effectively.
What This Automation Does
This n8n workflow leverages AI integration with JIRA to automatically identify, analyze, and act on long-lived unresolved issues. When triggered, it performs the following specific tasks:
- Searches for unresolved JIRA issues older than 7 days (long-lived tickets).
- Retrieves and compiles all comments for each issue to create a detailed conversation history.
- Uses AI text classification to determine the current issue state: whether resolved, pending more information, or still waiting for a response.
- Automatically attempts to resolve issues by querying a knowledge base and finding similar resolved tickets.
- Sends personalized reminder comments to encourage resolution or follow-up on pending issues.
- Performs sentiment analysis on resolved issues to assess customer satisfaction and decides on closing the ticket or escalating it via Slack notifications.
- Closes issues automatically if resolved or sends a feedback request for customer reviews.
Overall, this workflow saves Sarah’s team hours of manual work daily, reduces forgotten tickets, and enhances customer satisfaction through timely and intelligent issue handling.
Prerequisites ⚙️
- n8n account — the automation platform to build and run the workflow.
- JIRA Software Cloud account — to access and manage issue data.
- OpenAI account — for AI-powered text classification, sentiment analysis, and smart responses.
- Slack account — to send notifications about unresolved negative tickets or reminders.
- Notion account — used as a knowledge base source for the AI agent.
Step-by-Step Guide
Step 1: Trigger the Workflow Daily
Navigate to the Schedule Trigger node. Set it to run at an interval that suits your team’s needs, typically once a day. This ensures the workflow checks for long-lived unresolved JIRA issues every day automatically.
Common Mistake: Forgetting to set the trigger interval properly can result in no data being processed or too many executions.
Step 2: Fetch Long-lived Unresolved Issues
Use the Get List of Unresolved Long Lived Issues node configured with the JQL query: status IN ("To Do", "In Progress") AND created <= -7d which filters for tickets older than 7 days still open. Connect this node from the trigger.
You should see a list of issues meeting this criteria after execution.
Step 3: Process Each Issue in Parallel
The Execute Workflow node runs the main workflow logic for each ticket separately, enhancing performance by parallelizing the processing steps.
Step 4: Gather Issue Metadata and Comments
The Get Issue Metadata node extracts key details like issue key, title, reporter info, and description for context.
Following this, the Get Issue Comments node retrieves all comments associated with the issue.
Then, the Join Comments node aggregates all comment data into a single combined dataset for analysis.
Step 5: Simplify Thread for AI
Here, the Simplify Thread For AI node uses JavaScript to transform the comment history into a formatted text thread. Each comment is reshaped into a readable string that concatenates author names with their messages, stripping any complex content for clean AI input.
={{
$json.data.map(comment => {
const { accountId, displayName } = comment.author;
const message = comment.body.content.map(item =>
`<${item.type}>${item.content
.filter(c => c.text || c.content)
.map(c => c.content
? c.content
.filter(cc => cc.text || cc.content)
.map(cc => cc.text)
.join(' ')
: c.text
).join(' ')}${item.type}>`
).join('');
return `${displayName} (accountId: ${accountId}) says: ${message}`;
})
}}This gives the AI a consistent, digestible conversation format.
Step 6: Classify Current Issue State with AI
Using the Classify Current Issue State node powered by OpenAI GPT-4, the workflow examines the issue topic and comments to classify whether the issue is:
- Resolved
- Pending more information
- Still waiting with no response
This smart classification enables targeted next actions.
Step 7: Analyze Customer Sentiment on Resolved Issues
If resolved, the Customer Satisfaction Agent (a sentiment analysis node) checks if the customer's tone is positive or negative.
If positive, the workflow posts a feedback request comment on the ticket.
If negative, it notifies the support team on Slack to take immediate action.
Step 8: Attempt Automated Resolution for Unresolved Issues
For issues still unresolved, an AI-powered KnowledgeBase Agent attempts to find answers by searching similar JIRA tickets via the Find Similar Issues node and the company’s product documentation in Notion via the Query KnowledgeBase node.
If a solution is found, it is posted as a comment on the issue, and the issue is automatically closed.
If no solution is found, an automated message is added, then the issue is closed to keep the queue clean.
Step 9: Re-engage Open Issues with Pending Actions
If there are pending responses or the issue is blocked, the Issue Reminder Agent drafts a reminder message based on the last non-bot message in the thread and posts it to the ticket to prompt user action.
Step 10: Notify Slack for Unresolved Negative Sentiment Tickets
For tickets flagged with negative sentiment but left unresolved, this workflow posts a detailed notification in a designated Slack channel to alert the support team, ensuring urgent tickets get human attention.
Customizations ✏️
- Adjust Issue Age Filter: In the Get List of Unresolved Long Lived Issues node, modify the JQL
created <= -7dto a shorter or longer duration to change "long-lived" criteria. - Change AI Models: In all OpenAI Chat Model nodes, switch the
modelparameter from "gpt-4o-mini" to a more advanced or cost-effective version depending on your subscription. - Customize Feedback Links: Update the feedback request URL in the Ask For Feedback Message node to your own review platform.
- Enable Slack Notifications on More Events: Extend the Notify Slack Channel node logic to include reminders for pending tickets or escalations.
- Modify Reminder Message Style: Adjust the prompt in the Issue Reminder Agent node to change tone or add more instructions.
Troubleshooting 🔧
Problem: "No issues returned by JIRA node"
Cause: The JQL query in the Get List of Unresolved Long Lived Issues node may be too restrictive or malformed.
Solution: Review and test your JQL directly in JIRA’s search interface to confirm it returns results. Adjust query syntax or parameters as needed.
Problem: "AI agent returns no solution found"
Cause: The knowledge base might not contain relevant data or AI prompt setup is insufficient.
Solution: Ensure your Notion documents and JIRA tickets are well indexed and descriptive. Also, verify the OpenAI API key is valid and has sufficient quota.
Problem: "Slack notifications not sent"
Cause: Slack credentials or channel ID may be incorrect or permissions missing.
Solution: Double-check Slack API credentials in n8n and confirm the bot has access to the correct channel. Test sending simple messages manually before automation.
Pre-Production Checklist ✅
- Verify OpenAI, JIRA, Slack, and Notion credentials are correctly configured in n8n.
- Test the JQL query for fetching unresolved issues in JIRA manually first.
- Run the workflow with a test issue to observe AI classifications and automated responses.
- Backup any critical JIRA data or workflows prior to deploying in production.
- Enable logging in n8n to monitor API calls and node status during execution.
Deployment Guide
Activate the Schedule Trigger node to run the workflow daily. Monitor the execution logs in n8n to ensure issues are being processed and handled appropriately.
Regularly review Slack notifications and closed tickets to validate the automation is functioning as expected. Adjust parameters or AI prompts as needed for better accuracy.
FAQs
Q: Can I use other AI providers instead of OpenAI?
Currently, this workflow is designed specifically around OpenAI’s GPT models integrated with n8n nodes. Using alternatives would require adapting the AI nodes.
Q: Will this automation consume API credits?
Yes, all OpenAI API calls and other integrations consume credits based on usage. Monitor your subscription limits accordingly.
Q: Is this workflow secure for sensitive customer data?
Data travels through your configured APIs. Ensure you comply with your organization's data policies and use secure credentials.
Q: Can this handle large volumes of JIRA tickets?
The workflow uses parallel processing for issues, making it scalable for moderate to high volume—but watch your API call limits.
Conclusion
By implementing this advanced n8n workflow, Sarah has automated the tedious job of managing long-lived JIRA tickets using cutting-edge AI. The solution automatically classifies issue states, attempts AI-driven resolutions, reminds users for pending actions, and closes tickets while monitoring customer sentiment.
This automation not only saves her team hours every week but also improves customer support quality by preventing forgotten or ignored tickets. As a next step, you might consider extending this to automate onboarding ticket categorization or integrating with your CRM for richer customer insights.
Give this workflow a try and transform your JIRA issue management today!