Tool or SaaS review
Someone wants to introduce a tool. Deliverable: an approval recommendation with conditions. This is the only agent with web search, because the request usually contains just a name.
case study · n8n automation with AI agents
Every 30 minutes an n8n dispatcher reads new and changed tasks from Jira, triages them with an AI model and hands each one to one of three specialist agents. The engineer gets a finished risk assessment, a tool review or a draft procedure, and when AI has nothing to add, an honest “this needs hands-on work in the systems”.
01 / starting point
The security engineer gets Jira tasks from the whole company: tool reviews, change risk assessments, procedures, checks in internal systems. Before the real work starts, someone has to understand the request, draft a checklist and assess the impact on the rest of the infrastructure. That step repeated for every task.
“We want to use tool X, is that OK?” is a typical description. The context has to be built from scratch: who is behind the tool, where it keeps data, what about SSO.
A tool review, a formal risk assessment and a policy draft are three different deliverables, yet in Jira they are all just a “Task”.
Key facts show up in the thread weeks after the task was created. A new comment should trigger the analysis again, with the full context.
A requirement from day one: the automation only reads. It never changes statuses, comments or assigns. The output goes to the engineer, not to the requester.
Checking MFA or inventorying devices is hands-on work in the systems. An AI essay on “why MFA matters” would be worse than no answer.
n8n runs only on the internal network and over VPN, so Jira Cloud cannot call a webhook. Polling on a schedule is the only option.
02 / numbers
Data from the analysis register, August to November 2026. The latest analysis of each task is counted.
The kind of work is the model’s judgement, not a Jira field. The same kind can go to different specialists or to none: whether a specialist runs depends on a separate AI contribution rating.
03 / corpus analysis
Instead of guessing which specialists were needed, a separate one-off workflow pulled all of the engineer’s tasks (38), closed ones included, and had a model cluster them by kind of work rather than by words in the title. For each cluster the model had to judge honestly what AI could do without access to the company’s systems.
Someone wants to introduce a tool. Deliverable: an approval recommendation with conditions. This is the only agent with web search, because the request usually contains just a name.
An in-house rollout, an infrastructure change, a partner integration. Deliverable: a risk table, acceptance conditions and an escalation recommendation, ready to defend in front of an auditor.
A procedure, policy, catalogue, SDLC control or a review of a submitted document. Five SDLC programme tasks did not justify a separate agent, so they run as a mode.
The largest cluster, 34% of the corpus: configuration, inventories, checks in admin panels and attachment contents. Here triage delivers a checklist and says plainly that AI will add nothing more.
04 / architecture
The dispatcher has 27 nodes. Specialists are separate sub-workflows called synchronously, so each can be developed and tested on its own while the report is assembled in one place.
Whether a specialist runs is computed by the validation code: the model has to declare a real contribution (a full deliverable or a draft) and name one of the three known agents. The n8n switch only routes, so the logic is not scattered across nodes.
Triage runs on the cheaper Claude Sonnet because it sees every task. Specialists run on Claude Opus because their output ends up in documentation. The triage model does not have to be the best, it has to be well calibrated.
The specialist gets everything: the description, all comments, attachment metadata and the triage findings. A complete request is not required, because the corpus analysis showed almost none are. The agent flags gaps in the deliverable.


05 / triage
Triage returns JSON to a schema. Most of the prompt work went into calibration: models like to default to medium risk out of caution and mark every request as incomplete.
Each level has a definition: LOW is a local, reversible impact; HIGH means personal data, privileged access or external exposure. Medium has to follow from the content, not from uncertainty.
If the first step is clear, the field is true and gaps go to a separate list. False is reserved for cases where nothing can move without an answer.
The question is not “will AI close the task” but “what useful artefact will it produce”. “none” is a valid and frequent answer. A platitude about security being important is worse than no answer.
The model only gets file metadata. It must not claim there is no attachment: it has to say the file needs human review and what to look for in it.

route field the switch acts on, on the right.
Once the model put a semicolon instead of a comma in a complete, good answer with a risk table. The parser now tries a few targeted repairs and notes in the report that a repair was needed. Across 50 register entries it helped twice.
When the answer cannot be repaired, the report states the failure instead of faking an assessment. The register gets an empty fingerprint, so the task returns on the next run instead of getting stuck as “processed”.
06 / specialists
A rule shared by all agents: separate what follows from the request from what is inference or assumption. An assessment built on an assumption nobody knows about is worthless.


07 / reliability
A workflow that works once in a demo and one that runs every 30 minutes for months without duplicates are two different things. Every row below is a bug caught on real runs.
n8n static data is saved only on production runs, so during manual tests the same tasks came back every time. The source of truth is a data table with a content fingerprint: a new comment or attachment changes the fingerprint and the task is analysed again.
The result is written at the end and analysis takes minutes. A scheduled run plus a manual one 36 seconds later produced two identical wiki pages. Now a task is reserved the moment it is picked, and the reservation expires if the run dies.
n8n community edition does not prevent concurrent runs. Triage takes about 60 s and a specialist up to 350 s, so three tasks take about 21 minutes in the worst case. Hence the 3-task limit and a 30-minute cycle: each run finishes before the next one.
| Symptom | Cause | Fix |
|---|---|---|
| 50 register rows for 21 tasks | The default insert operation ignores the configured matching columns. | An explicit upsert by task key in all three tables. |
| A second parent page for the same task in the wiki | The wiki API pages its list at 20 items and the existence check only read the first page. | An own page register as the source of truth and an explicit duplicate-risk flag instead of silent creation. |
| Three tasks merged into one | A node took the first input item instead of the paired item. | “Run once for each item” mode and paired-item references in every sub-workflow. |
| The agent lost queries from its budget | A tool call without arguments ended in a silent empty response or a schema validation error. | A tool without an input schema, validation inside the sub-workflow and a corrective message for the model. |
| 76k of 82k tokens were search results | Raw 8–21 kB responses piled up in the agent’s context on every turn. | Results trimmed to snippets with an 8,000-character cap per response. |
| The report claimed there was no attachment | The model did not get the file list, so it took their absence as fact. | Attachment metadata in the prompt, a rule against denying they exist, files included in the fingerprint. |


08 / output
The first version only sent e-mail. Today every task has a parent page in the wiki and every analysis lands under it as a dated subpage. A new Jira comment means a new subpage, so you can see how the assessment evolved. E-mail stayed as an option: the node has been disabled since the wiki took over as the archive.


09 / delivery
The first version: fetch tasks, triage with one model and an HTML report in the inbox. It already showed which model fields were noise and which helped.
A one-off workflow pulled every task, closed ones too, since they show the work actually done. A model clustered them by kind of work and pointed out where AI would add nothing.
Three sub-workflows with their own prompts and response schemas. The tool specialist later got web search, with a query budget and source classification.
A task page with analysis subpages, a page register and an analysis register. The registers serve deduplication, audit and statistics at once.
Reservations, upserts, pagination, resilient parsing, response length limits. Fixes carry a description of the symptom and cause in code and node notes, often with the number of the run that exposed them.
technologies
Client data is anonymised. Screenshots come from an isolated copy of the workflow run on sample data: requests, people, model responses and task keys are fictional, and addresses, identifiers and credentials have been replaced. The reports in the screenshots were generated by the actual workflow code and show the Polish interface used by the client. The numbers in section 02 come from the production analysis register (August–November 2026). AI deliverables are drafts for human review, not approved documents.
next step
Tell me what you want to achieve. I'll come back with a concrete proposal, a quote and a delivery plan.