Capture Typeform leads in SQL Server, score them, and alert sales in Slack

Every new Typeform response lands in your SQL Server leads table with a hot, warm, or cold score, and your sales channel only lights up for the ones worth chasing.

Agentic Task
TypeformSQL ServerSlack BotSalesOperationsLead EnrichmentNotifications & AlertsData Sync

Build me an agent workflow that captures every new Typeform lead, scores it, writes it to my SQL Server CRM, and notifies sales in Slack. The agent should be smart about messy form input and apply my scoring rules consistently.

Trigger: a Typeform webhook on a new form response. The webhook payload is the full Typeform submission (definition + answers). Use that as the agent's input.

Configurable inputs to ask me for at setup time:

1. The Typeform form ID (or let me pick from my forms).

2. The SQL Server target: database name and the leads table to write to. Default schema dbo. Treat the table schema as configurable. Reasonable default columns are: id (identity), submitted_at (datetime2), full_name (nvarchar), email (nvarchar), company (nvarchar), company_size (nvarchar), industry (nvarchar), role (nvarchar), budget (nvarchar), use_case (nvarchar), source (nvarchar), score (nvarchar, one of 'hot' | 'warm' | 'cold'), rationale (nvarchar), next_action (nvarchar), raw_response (nvarchar(max)). If my table is named or shaped differently, ask me for the column mapping and use that instead. If I don't have a table yet, offer to create one with these columns.

3. My scoring criteria in plain English. Example defaults the agent can show me and let me edit: hot = company size 200+ OR explicit budget mentioned OR free-text mentions urgency, evaluation, RFP, or a near-term deadline; warm = company size 50–199 OR generic interest with no urgency; cold = solo / freelancer / student, no company, free-tier intent, competitor research, or disqualifying free-text (e.g. job-seeker).

4. The Slack channel to notify (e.g. #sales-inbound). Optionally a separate channel for hot leads.

Per submission the agent should:

Step 1 — Normalize the response. The Typeform payload has a form_response.definition.fields list and a form_response.answers list keyed by field id. Resolve each answer back to its field title and pull out: full name, work email, company, company size, industry (free-text or choice), role / job title, budget, use case / free-text 'what are you trying to do', and any other meaningful answers. Handle inconsistent casing on emails (lowercase), strip whitespace, title-case names, and treat empty strings and Typeform's missing-answer cases as null. For free-text industry, keep the raw answer; do not force a taxonomy.

Step 2 — Score. Apply my scoring rules to the normalized fields. Output exactly one of hot, warm, or cold, plus a one-sentence rationale that cites the specific signals (e.g. 'Company size 500+ and mentioned Q3 deadline in use case answer'). Also pick a recommended next action from: 'book intro call', 'nurture', 'disqualify'. Hot defaults to 'book intro call', warm to 'nurture', cold to 'disqualify' unless the rationale obviously suggests otherwise.

Step 3 — Insert into SQL Server. Use the SQL Server Insert Row operation against my leads table. Pass parameters as @p1, @p2, ... and the values array, never interpolate. Include all the normalized fields plus score, rationale, next_action, and the full raw form_response JSON in raw_response. If the insert fails because the table doesn't exist (error 208), surface a clear error and stop. If a unique constraint trips on email (error 2627), update the existing row instead so duplicate submissions just refresh the latest score and rationale.

Step 4 — Notify Slack via Send a Message to the sales channel. For warm and cold leads, post a quiet single-block summary: name, company, score, one-line rationale, recommended next action. For hot leads, format the message to stand out so an AE can grab it immediately: lead with a 🔥 and 'NEW HOT LEAD' header, bold the name and company in Slack mrkdwn (*name*), include the rationale and the recommended next action prominently, and if I configured a separate hot-leads channel post there instead. Do not @-channel by default; mention @here only if I explicitly opt in at setup.

Error handling: if the Typeform payload is malformed or missing critical fields (no email at all), still write a row to SQL Server with score=cold and rationale='insufficient data', and post a low-key Slack note flagging the bad submission. Never silently drop a lead.

Integrations to use: Typeform (webhook trigger), SQL Server (Insert Row), Slack Bot (Send a Message). Workflow type: agent.

Additional information

What does this prompt do?
  • Catches every new Typeform submission the moment it arrives, no nightly imports and no missed leads.
  • Cleans up the response: fixes inconsistent casing, fills in missing fields where it can, and reads free-text answers for real intent signals.
  • Scores each lead hot, warm, or cold against your own criteria (company size, budget, urgency cues) and saves it to your SQL Server leads table with the score and a one-line rationale.
  • Posts every lead to your sales channel in Slack with the name, company, score, why, and the recommended next step, with hot leads styled to jump off the screen.
What do I need to use this?
  • A Typeform account with the form you want to capture.
  • A SQL Server database (Azure SQL, Amazon RDS, Google Cloud SQL, or self-hosted) you can write to.
  • A leads table to insert into, or willingness to let us create one for you.
  • A Slack workspace and the channel where sales should be pinged.
  • Your own definition of what counts as a hot, warm, or cold lead.
How can I customize it?
  • Swap in your own scoring rules: which company sizes count as hot, which budget answers disqualify, which keywords in free-text mean buying intent.
  • Point at a different leads table or rename the columns to match the schema your sales ops team already uses.
  • Change the Slack channel, tweak how hot leads stand out (emoji, @here, a different color), or route hot, warm, and cold to different channels.

Frequently asked questions

How fast does a lead show up in SQL Server and Slack after someone submits the form?
Within a few seconds. Typeform notifies us the instant the form is submitted, so the row lands in your database and the Slack ping fires before the lead even closes the thank-you page.
What if my leads table has different columns than the default?
You tell us the column names and types up front and the workflow maps Typeform answers to your schema. You can also point at an existing table, we just need to know which fields it expects.
How are the hot, warm, and cold scores decided?
You define the rules in plain English when you set this up. Things like 'companies over 200 people are at least warm', 'budget under 5k is cold', or 'mentions of urgency in the free-text answer bumps to hot'. The agent applies them on every submission and writes a one-line rationale to the database so you can see why.
Will hot leads really stand out in Slack, or does every lead look the same?
Hot leads get a distinct treatment, an attention-grabbing emoji, bold formatting, and the recommended next action right at the top, so an AE can claim them in seconds. Warm and cold land as quieter summary lines.
What happens if my SQL Server database is briefly unreachable?
The workflow retries the insert and surfaces an error if it still cannot write. You will not lose the submission, Typeform keeps the response, and you can re-run the workflow once the database is back.

Stop letting good leads die in a form inbox.

Connect Typeform, SQL Server, and Slack once, and every new lead is scored, filed, and announced to sales the moment it comes in.