New Lead Auto-Capture from Forms Submission
When a Microsoft Form is submitted (e.g., webinar sign-up, contact us), automatically creates a new Lead record in Salesforce with the form responses mapped to lead fields.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
The New Lead Auto-Capture from Forms Submission flow is a beginner-level cloud flow that bridges Microsoft Forms and Salesforce. Whenever a configured form is submitted — for example a webinar sign-up, contact-us form, or gated content request — the flow retrieves the response, maps the answers onto Salesforce Lead fields, and creates a new Lead record automatically.
The flow is delivered as a solution-aware component inside the FlowLibsNewLeadAutoCaptureFromForms Dataverse solution. The Microsoft Form ID, Salesforce lead source, and default lead status are all controlled through environment variables so the same package can be redeployed against different forms or Salesforce orgs without editing the flow.
Use Case
Sales and marketing teams typically rely on web forms (Microsoft Forms, gated content pages, event sign-ups) to capture inbound interest, but those responses often sit in a spreadsheet or inbox until someone manually copies them into the CRM. That delay costs deals — speed-to-lead is one of the strongest predictors of conversion.
This flow closes that gap. Every form submission becomes a Lead in Salesforce within seconds, tagged with a configurable Lead Source so marketing attribution stays clean, and routed into the team's normal lead workflow (assignment rules, alerts, cadences) without any manual data entry.
The flow is ideal for teams that:
- Sales teams running webinar, demo-request, or contact-us forms that need to land in Salesforce
- Marketing teams that need accurate Lead Source attribution from gated-content campaigns
- Operations teams looking to eliminate manual copy-paste between Forms responses and the CRM
- Small businesses standardizing inbound lead capture without a paid marketing automation platform
Flow Architecture
When a new response is submitted
Microsoft Forms — WhenANewResponseIsReceivedFires whenever the Microsoft Form identified by the `flowlibs_FormId` environment variable receives a new submission.
Get response details
Microsoft Forms — GetFormResponseRetrieves the full set of answers for the submitted response so the values can be mapped to Salesforce Lead fields.
Initialize varLeadSource
Initialize variableHydrates the Lead Source value from the `flowlibs_LeadSource` environment variable into a flow variable for reuse.
Initialize varLeadStatus
Initialize variableHydrates the default Lead Status from the `flowlibs_DefaultLeadStatus` environment variable into a flow variable.
Create Salesforce Lead
Salesforce — CreateRecord (Lead)Creates a new Lead in Salesforce, mapping form answers to First Name, Last Name, Email, Company, and Phone, and stamping Lead Source and Status from the env-var-backed variables.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_FormId | String | <configure> | Microsoft Forms form ID to monitor for new responses. Get this from the form URL after `?id=`. |
| flowlibs_LeadSource | String | Web - Form | Value written to the Salesforce Lead Source field so marketing attribution can distinguish form-captured leads. |
| flowlibs_DefaultLeadStatus | String | Open - Not Contacted | Initial Salesforce Lead Status applied to every record created by this flow. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Forms | shared_microsoftforms | WhenANewResponseIsReceived (trigger) GetFormResponse |
| Salesforce | shared_salesforce | CreateRecord (Creates a new Lead record) |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Point at a different Microsoft Form
- Update the flowlibs_FormId environment variable to the ID of any Microsoft Form you want to capture leads from. No flow edit required — re-run a solution upgrade or set the value in the target environment.
- Change Lead Source per campaign
- Set flowlibs_LeadSource to the campaign-specific value (e.g., Webinar - Q2, Contact Us, Whitepaper Download) so Salesforce reports can attribute revenue back to the right inbound channel.
- Map additional Salesforce Lead fields
- Edit the Create Salesforce Lead action to add any custom fields the form collects (e.g., Industry, Company Size, Job Title). Use the corresponding response field from Get response details as the value.
- Add a duplicate-check step
- Insert a Salesforce Get records action filtered on Email before Create record, then wrap the create in a Condition to skip when a matching Lead already exists — useful when one person re-submits the same form.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Full name from form answers
If the form collects first and last name as separate questions, concatenate them for a Salesforce field that needs the full name. Replace `r1234` / `r5678` with the actual question IDs surfaced by the Get response details action.
EXPR.02Lead Source from env var
Used in the Create Salesforce Lead action to populate the Lead Source field from the environment variable rather than a hard-coded string.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.