n8n template · Compliance & Audit Pack
Generate an AI audit summary report with n8n
Final step of the audit system: one webhook call with a file ID, and the workflow loads all answers from Supabase, has Claude synthesize them into a structured report (summary, strengths, non-conformities, action plan), then emails it as HTML.
- Générer un rapport (Webhook)triggerWebhook
- Charger les réponses du dossierSupabase
- AgrégerAggregate
- Rédiger le rapportLLM chain
- Convertir en HTMLMarkdown to HTML
- Envoyer le rapport par emailSend email
- RépondreWebhook response
Attached AI sub-nodes
- Modèle ClaudeAnthropic model
$ n8n import:workflow --input=rapport-synthese-audit-ia.json ✔ Import successful — 8 nodes, valid connections
The problem it solves
Report writing is the bottleneck of every audit: the answers are there, but shaping them — summary, ranking the gaps, action plan — burns expert hours better spent on analysis.
Since every answer is already structured and timestamped in the database, the report's first draft can be delegated to the model. The expert reviews, adjusts, signs: the deliverable goes from three hours to twenty minutes, without sacrificing human accountability.
How the workflow works, node by node
Node names are in French, exactly as they appear in the imported workflow — the logic is language-agnostic.
- 01
Générer un rapport (Webhook)
WebhookPOST to flowkit-audit-report with the file ID and recipient email: triggerable by hand, from the pack's bot or your back office.
- 02
Charger les réponses du dossier
SupabaseFetches all audit_responses rows for the requested file — the report's complete, timestamped raw material.
- 03
Agréger
AggregateGathers the answers into one object so the model reasons over the whole audit, not question by question.
- 04
Rédiger le rapport
LLM chainThe prompt enforces the deliverable's structure: overall summary, strengths, non-conformities ranked by criticality, prioritized action plan with suggested deadlines. Markdown output.
- 05
Modèle Claude
Anthropic modelClaude as the ai_languageModel sub-node: the writing-quality choice for a long document meant to be read by a client.
- 06
Convertir en HTML
Markdown to HTMLTurns the model's markdown into clean HTML for an email readable in every client.
- 07
Envoyer le rapport par email
Send emailShips the report to the recipient given in the call, with the file ID in the subject.
- 08
Répondre
Webhook responseConfirms to the caller that the report went out — useful for chaining from another workflow or a UI button.
What you need to run it
- n8n ≥ 1.60 with the LangChain nodes
- The audit_responses table being fed (the pack's bot or recording webhook)
- An Anthropic API key
- A configured SMTP for sending the report
Customization ideas
- Adapt the report outline to your framework (sections, terminology, criticality levels) in the prompt
- Attach a PDF by adding an HTML-to-PDF step (Gotenberg, dedicated API) before sending
- Archive every generated report to Supabase or Google Drive for client history
FAQ
Frequently asked questions
How do I import this template into n8n?
Import rapport-synthese-audit-ia.json via 'Import from File', attach Supabase, Anthropic and your SMTP, replace the sender address, activate, then test with a curl -X POST carrying dossier_id and email.
Does the report engage my professional liability?
The workflow produces a first draft, explicitly designed to be reviewed: findings come from the real answers, but the final qualification of gaps and the signature remain human. It's a writing accelerator, not an auditor.
Can I generate the report automatically at the end of an audit?
Yes: the pack's questionnaire bot can call this webhook at the last question (via a second HTTP tool), or you can trigger the call from your back office when the file reaches complete status.