Quick Overview
This workflow runs on a weekday morning schedule (or manually) to pull the active Jira sprint and its issues, compute sprint health metrics, use an OpenRouter-hosted OpenAI model to assess slip risk, and post a motivating alert to a Slack channel when the sprint is behind.
How it works
- Runs every weekday at 08:00 (or when executed manually).
- Calls the Jira Software Cloud Agile API to fetch the board’s active sprint and all issues in that sprint, including status, labels, and story points.
- Calculates sprint timing, completion percentage, slip margin, velocity gap, and a list of potentially blocked issues based on labels or status.
- Sends the computed metrics to an OpenRouter (OpenAI) chat model to return a structured JSON risk assessment (on_track, at_risk, or critical) with recommendations and tickets to watch.
- Parses the model output into JSON and merges it with the computed sprint metrics for reporting.
- If the risk level is not on_track, a second OpenRouter (OpenAI) agent drafts a team-focused status update and posts it to the configured Slack channel.
- If the risk level is on_track (or parsing fails and defaults to on_track), the workflow ends without posting to Slack.
Setup
- Add Jira Software Cloud credentials in n8n with access to your board and sprint data.
- Add an OpenRouter API credential and select a chat model that supports agent tool-calling.
- Add Slack API credentials and ensure the bot is allowed to post in the target channel.
- In the workflow’s configuration values, set your Jira domain, board ID, story points custom field ID, and the Slack channel name.
- Adjust the schedule trigger cron expression if you want the check to run at a different time.