Skip to content

Lightning Flow iFrame

Embed Lightning Screen Flows on external websites using a Salesforce Site and the FlowIframeEmbed Visualforce page.

  • Flows run in Lightning Runtime (not Classic Flow UI).
  • Auto height: iframe grows as users move through screens (postMessage).
  • Flow inputs from URL parameters using an inputVars allowlist.
  • Finish redirect: send parent window to a thank-you page via endUrl.
PieceWhere
FlowIframeEmbed packageInstall from AppExchange or 2GP unlocked package
FlowOut Aura appIncluded in package (three_levers:FlowOut)
FlowIframeEmbed VF pageSite URL your iframe loads
three-levers-flow-embed.jsOptional script for external sites
  1. Install FlowIframeEmbed in Salesforce.
  2. Create and activate the Screen Flow; note its API Developer Name.
  3. Add FlowIframeEmbed to a Salesforce Site and configure guest access.
  4. Allow your parent domain in clickjack/CSP settings.
  5. Embed with the JavaScript widget.

Flows, Sites, and guest user permissions are configured per org and are not bundled in the package.

PlatformStart here
Any other siteJavaScript widget
Salesforce sideSalesforce setup
Flow designFlow creation
URL behaviorQuerystring variablesFinish URL
  • Recommended: JavaScript widget (window.tlFlowEmbed) for external sites.
  • Manual: iframe src + postMessage listener for { frameHeight: number }.