FlowKit

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.

Pipelinerapport-synthese-audit-ia.json · 8 nodes
  1. Générer un rapport (Webhook)triggerWebhook
  2. Charger les réponses du dossierSupabase
  3. AgrégerAggregate
  4. Rédiger le rapportLLM chain
  5. Convertir en HTMLMarkdown to HTML
  6. Envoyer le rapport par emailSend email
  7. RépondreWebhook response

Attached AI sub-nodes

  • Modèle ClaudeAnthropic model

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.

  1. 01

    Générer un rapport (Webhook)

    Webhook

    POST to flowkit-audit-report with the file ID and recipient email: triggerable by hand, from the pack's bot or your back office.

  2. 02

    Charger les réponses du dossier

    Supabase

    Fetches all audit_responses rows for the requested file — the report's complete, timestamped raw material.

  3. 03

    Agréger

    Aggregate

    Gathers the answers into one object so the model reasons over the whole audit, not question by question.

  4. 04

    Rédiger le rapport

    LLM chain

    The prompt enforces the deliverable's structure: overall summary, strengths, non-conformities ranked by criticality, prioritized action plan with suggested deadlines. Markdown output.

  5. 05

    Modèle Claude

    Anthropic model

    Claude as the ai_languageModel sub-node: the writing-quality choice for a long document meant to be read by a client.

  6. 06

    Convertir en HTML

    Markdown to HTML

    Turns the model's markdown into clean HTML for an email readable in every client.

  7. 07

    Envoyer le rapport par email

    Send email

    Ships the report to the recipient given in the call, with the file ID in the subject.

  8. 08

    Répondre

    Webhook response

    Confirms 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.