See llms.txt for all machine-readable content.

Back to Templates

Score small business AI readiness from forms with OpenAI and Gmail

Quick overview

This workflow collects AI readiness survey responses via an n8n Form, scores them with fixed rules, generates a checked report using OpenAI, and emails it via Gmail while saving each lead to an n8n Data Table and drafting optional follow-ups.

How it works

  1. Triggers when someone submits the n8n Form (or runs daily on a schedule to prepare follow-ups) and loads shared configuration values.
  2. Creates the “AI readiness leads” n8n Data Table if it doesn’t exist and calculates five readiness scores, an overall level, and a lead priority from the submitted answers.
  3. Blocks bot submissions and disposable/invalid email addresses so no report is generated or sent.
  4. Looks up prior submissions in the Data Table to prevent sending a second report within the configured resubmission window and optionally computes benchmark comparisons once enough leads exist.
  5. Uses OpenAI (structured output) to write the personalized report, automatically checks it for rule violations, and retries once with a rewritten version if needed.
  6. Builds an HTML email report and either sends it to the respondent via Gmail or creates a Gmail draft for manual review, then saves the lead record and emails you a lead alert.
  7. Each morning, finds consenting leads whose reports were sent a set number of days ago and creates a Gmail follow-up draft, then marks the follow-up as drafted in the Data Table.

Setup

  1. Add credentials for OpenAI (Chat model) and Gmail (send messages and create drafts).
  2. Update the Settings values, especially yourCompany, yourEmail, bookingUrl, language, and reviewBeforeSending.
  3. Publish the n8n Form by copying the production form URL (path: /ai-readiness) and sharing/configuring it where you collect responses.
  4. Ensure your n8n instance supports Data Tables and that the workflow can create and write to the “AI readiness leads” table.
  5. (Optional) Adjust resubmitDays, benchmarkMinLeads, followUpDays, blockedEmailDomains, promiseWords, and minQuickWinsQuotingAnswers to match your policy and outreach process.

Requirements

  • OpenAI and Gmail accounts and an n8n version with data tables.

Customization

  • Questions, scoring rules and priority rules live in the Score the answers node, and fields are read by name, so labels can be translated. Set reviewBeforeSending to true to check every report in Gmail before it goes out. Swap OpenAI for any chat model, or Gmail for another email node.

Additional info

The AI never sets the scores or the comparison: both come from fixed rules and from the leads table. Follow-ups are Gmail drafts, never sent automatically. The trap field is the first field of the form and is hidden by the form's custom CSS: if you add a field before it, update the selector. Add a link to your privacy notice in the form description.