CORTEXFLOW · FREE FOREVER
Automation
Security Questionnaire Auto-Drafter
Import in n8n: Workflows → ⋯ → Import from file, then add your credentials. Free download with a free account.
How it works
Enterprise security teams are drowning in vendor questionnaires — this workflow turns your approved policy docs into a drafting machine with a human in the loop, so high-confidence answers ship fast and shaky ones never go out unreviewed:
- STEP 1 — Trigger + config + read questions —
Start Drafting(a manual trigger, so it’s safe to import; swap in a Google Drive trigger for full automation) fires,CONFIG — Inputsholds every editable value, andRead Questionspulls the questionnaire rows from yourQuestionstab. - STEP 2 — Log every question as NEW —
Log NEWappends each question to theDraft Logtab with statusNEW, creating the audit trail for the whole run. - STEP 3 — Read knowledge base + loop —
Read Knowledge Basepulls your approved security-policy Google Doc as plain text, andLoop Over Questionsprocesses the questions one at a time so every answer gets its own agent call. - STEP 4 — AI drafts the answer —
Prepare Questionshapes{question, category, context, question_number, knowledge_text}, thenDraft Answer Agent(gpt-4o-mini with theAnswer Schema Parser) drafts strictly from your knowledge text: it never invents certifications, and questions your docs don’t cover get low confidence plusneeds_human.Mark DRAFTEDwrites the draft, confidence, and source section back to the log row. - STEP 5 — Confidence gate —
Confidence Checkcompares the score against your threshold: at or above →Mark APPROVED; below →Mark IN_REVIEWplusSend Review Requeston Telegram with the question, the draft, its confidence, and its source section — replyAPPROVED #<n>in Telegram to approve manually. - STEP 6 — Run summary — after the loop finishes,
Read Draft Logre-reads the tab,Build Run Summarycounts total / auto-approved / in-review, andFinal Telegram Notificationsends the summary.
Status flow in Sheets: NEW → DRAFTED → APPROVED (low-confidence answers go DRAFTED → IN_REVIEW)
Set up steps
You’ll need:
- n8n (self-hosted or cloud) — n8n.io
- An OpenAI API key — sign up at platform.openai.com/signup, then create a key under API keys
- A Google Workspace account — workspace.google.com; connect Google Sheets + Google Docs OAuth2 credentials in n8n, and prepare one spreadsheet with two tabs (
Questions,Draft Log) plus one Google Doc holding your approved security language (SOC 2 answers, policies, certifications) - A Telegram bot — create one via @BotFather (
/newbot), and get your chat ID from @userinfobot
Your Questions tab needs these headers (copy-paste this row; Context is optional but improves drafts):
Question # | Category | Question | Context
Your Draft Log tab needs these headers (the workflow fills them; copy-paste this row):
Timestamp | Question # | Category | Question | Draft Answer | Confidence | Source Doc | Status
Steps:
- Import the workflow — in n8n, Workflows → Import from File → select
security-questionnaire-auto-drafter.json. - CONFIG — Inputs — open the Set node and fill in:
COMPANY_NAME— your company name (appears in drafts)QUESTIONNAIRE_SHEET_ID— the ID in your questionnaire spreadsheet’s URLQUESTIONS_TAB— tab holding the questions (default:Questions)KNOWLEDGE_DOC_ID— the ID in your policy doc’s URL (the doc the agent drafts from)CONFIDENCE_THRESHOLD— auto-approve bar, 0–1 (default:0.7)LOG_SHEET_ID— spreadsheet ID for the draft log (can be the same sheet)LOG_TAB— log tab name (default:Draft Log)REVIEWER_CHAT_ID— your Telegram chat ID for review requests and the final summary
- Select your credentials — Google Sheets OAuth2 in
Read Questions,Log NEW,Mark DRAFTED,Mark APPROVED,Mark IN_REVIEW, andRead Draft Log; Google Docs OAuth2 inRead Knowledge Base; OpenAI inGPT-4o-mini Chat Model; Telegram inSend Review RequestandFinal Telegram Notification. - Load your data — paste the questionnaire rows into the
Questionstab (headers must match exactly), and make sure your knowledge doc contains your approved security answers. - Run it — click Execute on
Start Drafting. ReviewIN_REVIEWrows in the Draft Log tab (or replyAPPROVED #<n>in Telegram), then flip those rows toAPPROVEDin the sheet once a human signs off.
Customize it
- Stricter or looser gating — raise
CONFIDENCE_THRESHOLDto0.9when answers go to regulated customers; drop it to0.5for internal drafts where speed matters. - Fully automatic — replace
Start Draftingwith a Google Drive Trigger watching the questionnaire sheet, so new questionnaires start drafting themselves. - Per-framework knowledge — split the knowledge doc by framework (SOC 2, ISO 27001, GDPR) and add a routing step on
Categoryso each question pulls the right doc. - Policy-gap radar — answers with
needs_human=truereveal holes in your docs; log them to a separate tab and treat recurring gaps as policies to write. - Brand-voice pass — add a second agent after
Mark APPROVEDthat rewrites approved answers in your company’s tone before export. - Feedback loop — append human-edited answers back into the knowledge doc so every review makes the next draft stronger.