FlowKit

n8n template · Compliance & Audit Pack

Build a guided questionnaire bot with n8n

This workflow replaces the static form with a conversation: an n8n agent asks your audit questions one at a time, rephrases each answer, gets it confirmed, then records it immediately in Supabase through a dedicated tool. The example protocol shipped: a simplified 8-question GDPR audit.

Pipelinebot-questionnaire-guide.json · 5 nodes
  1. ChattriggerChat (trigger)
  2. Agent questionnaireAI Agent

Attached AI sub-nodes

  • Modèle OpenAIOpenAI model
  • Mémoire de sessionSession memory
  • Enregistrer la réponse (Supabase)HTTP tool (agent)

The problem it solves

Long questionnaires get abandoned midway, and free-text answers arrive unusable: two structural flaws of static forms. A guided conversation keeps engagement and clarifies on the spot — 'your processing register: kept up to date, or just created?'.

The trap with LLM bots is volatility: the conversation ends, the data evaporates. Here the agent has a recording tool it must call after every confirmation: the data is in the database before the next question.

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

    Chat

    Chat (trigger)

    Public chat interface hosted by n8n: just send the URL to the person being audited, no account needed. Provides the session ID for memory.

  2. 02

    Agent questionnaire

    AI Agent

    The orchestrator: its system message holds the whole protocol — 8 numbered questions, one at a time, rephrasing, explicit confirmation, recording-tool call, final recap. That text is what you adapt to your framework.

  3. 03

    Modèle OpenAI

    OpenAI model

    ai_languageModel sub-node: drives the conversation and decides when to call the tool. A model reliable at tool-calling matters here.

  4. 04

    Mémoire de session

    Session memory

    ai_memory sub-node: keeps the recent exchanges per chat session, so the agent knows where it stands without re-asking everything.

  5. 05

    Enregistrer la réponse (Supabase)

    HTTP tool (agent)

    ai_tool: a POST to Supabase's REST API (audit_responses table) with file ID, question and answer. The agent calls it after every confirmation — that's what guarantees the audit trail.

What you need to run it

  • n8n ≥ 1.60 with the LangChain nodes
  • An OpenAI API key
  • A Supabase project with the audit_responses table (SQL provided in the pack guide)
  • Your Supabase project's REST URL and service_role key to set in the tool

Customization ideas

  • Swap the 8 GDPR questions for your own framework (ISO 27001, onboarding, quality…) keeping the protocol structure
  • Add a second read tool to resume an interrupted audit where it stopped
  • Chain the pack's report workflow to generate the summary right after the last question

FAQ

Frequently asked questions

How do I import this template into n8n?

Import bot-questionnaire-guide.json via 'Import from File', attach your OpenAI key to the model, set the Supabase URL and service_role key in the recording tool, activate, then open the public URL on the Chat node.

What happens if the user abandons mid-audit?

All confirmed answers are already stored, timestamped: nothing is lost. The pack's follow-up workflow can then automatically recontact the file left incomplete.

Can the agent forget to record an answer?

The protocol makes the tool call mandatory after every confirmation, and recent models follow it very reliably. For strict control, compare the row count in the database with the number of questions at the end — the agent's final recap makes that easy.