Skip to content
✦ Made with Docsie · generated from video

How to Create a Flow in Salesforce

Salesforce Flow is a declarative, point-and-click automation tool that lets you automate business processes without writing code. This guide walks you through how to create a flow in Salesforce from start to finish — opening Flow Builder, adding a screen, configuring components, saving and activating your flow, and using the built-in debug tools to troubleshoot errors.

Salesforce 12 steps 43 screenshots 2478 words Source video 14:46 Generated cost $5.25

Video: Create and Debug Lightning Flow in Salesforce | SalesforceHunt | Flow by Salesforce Hunt. All credit for the demonstration goes to the creator; watch the original on YouTube. The written guide below was generated from this video by Docsie. Creator? Request a change or removal.

Salesforce Flow is a declarative, point-and-click automation tool that lets you automate business processes without writing code. This guide walks you through how to create a flow in Salesforce from start to finish — opening Flow Builder, adding a screen, configuring components, saving and activating your flow, and using the built-in debug tools to troubleshoot errors.

Prerequisites

  • You must be logged in to your Salesforce org.
  • You need access to Setup in your Salesforce environment.

Open Flow Builder and create a flow in Salesforce

  1. Make sure you are logged into your Salesforce environment.
  2. Locate the gear icon in the upper right corner of the Salesforce interface and click it to open the dropdown menu.
  3. Select Setup from the dropdown.
Salesforce main screen with the gear icon dropdown open, showing Setup, Service Setup, and Developer Console options, with the cursor pointing at Setup.
Salesforce main screen with the gear icon dropdown open, showing Setup, Service Setup, and Developer Console options, with the cursor pointing at Setup.
  1. In the Setup page, find the Quick Find search box on the left sidebar and type flows into it.
  2. Under Process Automation, click on Flows.

  3. Review the Flows page, which displays a list of all existing flows, including those defined by Salesforce and any custom flows you have created. Each entry shows the flow label, process type, and other details.

Flows page listing flow definitions with labels, process types, and other details, with the New Flow button visible in the top right.
Flows page listing flow definitions with labels, process types, and other details, with the New Flow button visible in the top right.
  1. Click the New Flow button located at the top right of the Flows page.
Cursor pointing at the New Flow button on the Flows page.
Cursor pointing at the New Flow button on the Flows page.

Choose a flow type

In the New Flow dialog, you can choose from several flow types:

  • Screen Flow: Guides users through a business process with screens.
  • Record-Triggered Flow: Runs when a record is created, updated, or deleted.
  • Schedule-Triggered Flow: Runs at a specified time and frequency.
  • Platform Event-Triggered Flow: Runs when a platform event message is received.
  • Autolaunched Flow (No Trigger): Runs in the background, invoked by Apex, processes, or the REST API.

Select Screen Flow by clicking on it so that it is highlighted, then click Next to proceed.

New Flow dialog in Flow Builder showing the Screen Flow, Record-Triggered Flow, Schedule-Triggered Flow, Platform Event-Triggered Flow, and Autolaunched Flow options, with Screen Flow selected.
New Flow dialog in Flow Builder showing the Screen Flow, Record-Triggered Flow, Schedule-Triggered Flow, Platform Event-Triggered Flow, and Autolaunched Flow options, with Screen Flow selected.

Select a layout for your flow

  1. When prompted with "How do you want to start building?", you will see two options:
    • Freeform: Lets you manually place all elements and connectors on the canvas.
    • Auto-Layout (Beta): Automatically positions all elements and connectors for you.
  2. Select Auto-Layout (Beta) by clicking on it. This option keeps your flow organized by arranging elements automatically.
Salesforce Flow Builder screen showing the choice between Freeform and Auto-Layout (Beta) when starting a new flow.
Salesforce Flow Builder screen showing the choice between Freeform and Auto-Layout (Beta) when starting a new flow.

Explore the Flow Builder canvas

  1. After selecting Auto-Layout, the canvas displays a Start node labeled "Screen Flow," an End node, and a plus (+) button between them labeled "Add Element." The canvas is organized into a Toolbox on the left, a Button Bar at the top right, and the main Canvas area where you build your flow.
Flow Builder canvas with Start and End nodes, a plus button for adding elements, and the toolbox and button bar visible.
Flow Builder canvas with Start and End nodes, a plus button for adding elements, and the toolbox and button bar visible.
  1. The Toolbox on the left lets you search within the flow and create new resources (variables, constants, formulas, and more) using the New Resource button. The Button Bar at the top right includes the Auto-Layout toggle along with Run, Debug, Activate, Save As, and Save controls.
Flow Builder interface highlighting the toolbox, button bar, and Auto-Layout toggle.
Flow Builder interface highlighting the toolbox, button bar, and Auto-Layout toggle.
  1. The three main areas of Flow Builder are the Toolbox for managing elements and resources, the Button Bar for flow actions and settings, and the Canvas where you build your flow.

Add a screen element to your flow

  1. Click the plus (+) button between the Start and End nodes to open the Add Element dialog. Under Interaction, you'll find Screen (collects information from users who run the flow), Action (performs an action outside the flow, such as sending an email or posting to Chatter), and Subflow (launches another flow in your org). Scrolling down reveals Logic options such as Assignment, Decision, Loop, and Collection Sort.

  2. Under the Data section of the same dialog, you can also see options to Create Records, Update Records, Get Records, Delete Records, and Roll Back Records — these let you interact with Salesforce data within your flow.

Add Element dialog showing Data options: Create, Update, Get, Delete, and Roll Back Records.
Add Element dialog showing Data options: Create, Update, Get, Delete, and Roll Back Records.
  1. Click Screen under Interaction to open the New Screen configuration window. It contains two tabs: Components, for standard screen elements like inputs and display elements, and Fields (Beta), which lets you add record fields directly to your screen as a pilot feature.
New Screen dialog with Components and Fields (Beta) tabs, and a beta notice for the Fields (Beta) feature.
New Screen dialog with Components and Fields (Beta) tabs, and a beta notice for the Fields (Beta) feature.
  1. Under the Components tab, components are grouped into Display (Display Text, Section) and Inputs (Address, Checkbox, Date, Email, File Upload, First Name, Text, and more). Use Display Text to show information and input components to collect it.

  2. On the right side, fill in the Screen Properties:

    • Label: Enter a name for the screen, for example Hello World.
    • API Name: Auto-generated from the label (for example Hello_World), though you can edit it.
    • Description: Optional.
Screen Properties panel with Label set to Hello World, API Name set to Hello_World, and an optional Description field.
Screen Properties panel with Label set to Hello World, API Name set to Hello_World, and an optional Description field.
  1. Locate Display Text under the Display section in the Components tab, then drag and drop it into the main screen area to show static text or instructions to users running the flow.
Dragging the Display Text component into the New Screen area.
Dragging the Display Text component into the New Screen area.
  1. In the New Screen window, the Components panel on the left also lists Service Resource Availability, Slider, Text, Toggle, URL, Display Text, and Section. The main screen area shows a placeholder labeled [Flow Label] with Pause, Previous, and Finish navigation buttons. You can expand Configure Header for additional header options, and click Done in the lower right to save your changes once components are added.
New Screen window showing the drag-and-drop interface, available components, and Screen Properties with Label Hello World and API Name Hello_World.
New Screen window showing the drag-and-drop interface, available components, and Screen Properties with Label Hello World and API Name Hello_World.

Configure the Display Text component

  1. In the Display Text configuration panel on the right, enter an API Name. You can choose from existing names shown in the dropdown or enter a new one, such as Message.
Flow Builder interface with the New Screen dialog open, the Display Text component selected, and the API Name dropdown showing several existing options.
Flow Builder interface with the New Screen dialog open, the Display Text component selected, and the API Name dropdown showing several existing options.
  1. In the message box, type the text you want to display — for example, "Hello World." You can use the default font, Salesforce Sans.
Display Text component configured with API Name set to Message, with the message box ready for input.
Display Text component configured with API Name set to Message, with the message box ready for input.
  1. As you type, confirm that the main screen area updates to reflect your entry.
Display Text component being filled in with partial text, with the main screen area reflecting the input as it is typed.
Display Text component being filled in with partial text, with the main screen area reflecting the input as it is typed.
  1. Complete the entry by typing "Hello World" in the message box and verify that the main screen preview updates to show "Hello World."
Display Text component fully configured with Hello World as the message, with the main screen preview showing the updated text.
Display Text component fully configured with Hello World as the message, with the main screen preview showing the updated text.
  1. Click Done in the Display Text configuration panel to save the component settings. In the Flow Builder canvas, confirm the flow sequence now reads: "Screen Flow" (Start) → "Hello World" (Screen) → "End."

Save your flow

  1. Click the Save button in the upper right corner of Flow Builder.
Flow Builder canvas showing the flow sequence Screen Flow (Start), Hello World (Screen), and End, with the Save button highlighted.
Flow Builder canvas showing the flow sequence Screen Flow (Start), Hello World (Screen), and End, with the Save button highlighted.
  1. In the Save the flow dialog, enter the Flow Label as "Hello World" and the Flow API Name as "Hello_World." You can optionally add a description for your flow, then click Save to confirm.
Save the flow dialog with Flow Label set to Hello World and the Flow API Name field ready for input.
Save the flow dialog with Flow Label set to Hello World and the Flow API Name field ready for input.

Activate, debug, and run your flow

  1. After saving, review the available options at the top of Flow Builder: Run, Debug, Activate, and Save As. These let you test, debug, activate, or duplicate your flow. The saved flow is labeled "Hello World - V1" and is initially inactive.
Flow Builder interface showing the flow sequence and the top bar with Run, Debug, Activate, and Save As options, with the flow named Hello World - V1 and marked inactive.
Flow Builder interface showing the flow sequence and the top bar with Run, Debug, Activate, and Save As options, with the flow named Hello World - V1 and marked inactive.
  1. Click the Activate button in the top right menu bar and confirm that the flow status changes to "Active" in the version indicator.
Flow Builder interface with the Activate button highlighted and the flow sequence Screen Flow (Start), Hello World (Screen), End visible.
Flow Builder interface with the Activate button highlighted and the flow sequence Screen Flow (Start), Hello World (Screen), End visible.
  1. Optionally, click Debug to step through the flow and observe its execution for troubleshooting before running it live.
Flow Builder interface with the Debug button highlighted and the flow sequence visible.
Flow Builder interface with the Debug button highlighted and the flow sequence visible.
  1. Alternatively, click Run to execute the flow directly. A new window or tab opens, displaying the flow screen with the title "Hello World" and the configured display text.
Flow Builder interface with the Run button highlighted and the flow sequence visible.
Flow Builder interface with the Run button highlighted and the flow sequence visible.
  1. On the flow runtime screen, review the title "Hello World" and the message "Hello World." Click Finish to complete the flow.
Hello World flow execution screen showing the title Hello World, the message Hello World, and a Finish button.
Hello World flow execution screen showing the title Hello World, the message Hello World, and a Finish button.
  1. After clicking Debug, review the Debug Details panel on the right, which shows How the Interview Started (the user who started the flow and the API version) and Transaction Committed (whether any records were created, updated, or deleted).
Hello World flow execution screen with the Debug Details panel open, showing how the interview started and transaction committed information.
Hello World flow execution screen with the Debug Details panel open, showing how the interview started and transaction committed information.
  1. Continue reviewing the Debug Details panel for additional information: SCREEN: Hello World, Display Text: Message, Value at run time: Hello World, Selected Navigation Button: NEXT, and confirmation that the transaction was committed. The main screen displays "All done" along with the flow interview finish time, plus options to Change Inputs or Run Again.
Flow debug summary screen showing All done, the finish time, and detailed debug information including display text value and navigation button.
Flow debug summary screen showing All done, the finish time, and detailed debug information including display text value and navigation button.
  1. Note the finish timestamp (for example "07-Jan-2022, 4:08:30 PM") and review the same Debug Details fields: How the Interview Started, Transaction Committed, SCREEN details, and Selected Navigation Button.
Salesforce Flow debug summary screen showing All done, finish time, Change Inputs and Run Again buttons, and the Debug Details panel with execution information.
Salesforce Flow debug summary screen showing All done, finish time, Change Inputs and Run Again buttons, and the Debug Details panel with execution information.
  1. Confirm the Display Text value ("Hello World.") and the navigation button used ("NEXT"), and make sure all transaction details are correct with no errors present.
Salesforce Flow debug summary showing All done and the Debug Details panel.
Salesforce Flow debug summary showing All done and the Debug Details panel.

Add a Get Records element

  1. Close the debug summary screen and return to the Flow Builder canvas. Click the + icon below the "Hello World" screen element, then select Get Records under the Data section of the Add Element dialog.
Flow Builder Add Element dialog highlighting the Get Records option under Data.
Flow Builder Add Element dialog highlighting the Get Records option under Data.
  1. In the New Get Records dialog, set the Label to Get Records, the API Name to Get_Records, and enter Account in the Object field.
Flow Builder New Get Records dialog with Label set to Get Records, API Name set to Get_Records, and Object set to Account.
Flow Builder New Get Records dialog with Label set to Get Records, API Name set to Get_Records, and Object set to Account.
  1. Under Filter Account Records, set Condition Requirements to All Conditions Are Met (AND), select Id in the Field dropdown, and set Operator to Equals. Leaving the Value field empty or supplying an invalid value will later cause an error — this is demonstrated in the troubleshooting steps below.
Flow Builder New Get Records dialog with the filter set to Id Equals, and the resource selection panel open.
Flow Builder New Get Records dialog with the filter set to Id Equals, and the resource selection panel open.
  1. Review the updated flow sequence, which now includes Screen Flow (Start) → Hello World (Screen) → Get Records (Get Records) → End. The left panel lists available resources, including "Account from Get_Records." Click Debug to test the updated flow.
Flow Builder canvas showing the updated flow sequence with Get Records added, and the Debug button being selected.
Flow Builder canvas showing the updated flow sequence with Get Records added, and the Debug button being selected.
  1. In the Debug flow dialog, make sure Run the latest version of each flow called by subflow elements and Show details of what's executed and render flow in Lightning runtime are both checked. You can optionally select Run flow as another user. If no input variables are defined, you may see a message noting that the flow has no variables that allow input access. Click Run to start debugging.

  2. On the flow execution screen, review the title "Hello World," the message "Hello World.", and the Finish button. The right panel shows debug details, including user, API version, and transaction status.

Salesforce flow execution screen showing Hello World, the message, the Finish button, and the Debug Details panel.
Salesforce flow execution screen showing Hello World, the message, the Finish button, and the Debug Details panel.

Complete the flow and understand error handling

  1. On the completed flow screen, the message "Hello World" and "Hello World." is displayed with a Finish button ready to be clicked. The Debug Details panel on the right shows how the interview started and confirms that the transaction was committed.
Salesforce Flow screen showing the Hello World message, the Finish button, and the Debug Details panel.
Salesforce Flow screen showing the Hello World message, the Finish button, and the Debug Details panel.
  1. Click Finish to complete the flow process. The confirmation screen displays "All done," the flow interview finish date and time, and options to Change Inputs or Run Again. The right panel provides debug details, including the screen name, display text, and navigation button used.

  2. If an error occurs, a red error message appears: "An unhandled fault has occurred in this flow. Please contact your system administrator for more information." The right panel shows debug details, including the failed record lookup and error specifics.

Salesforce Flow error screen with a red error message and debug details showing the failed record lookup.
Salesforce Flow error screen with a red error message and debug details showing the failed record lookup.
  1. When a flow application error occurs, a system notification (for example from Mail or Outlook) may appear, indicating that an error occurred during the flow and suggesting you debug the failed interview in Flow Builder.
Salesforce Flow error screen with a system notification about a flow application error.
Salesforce Flow error screen with a system notification about a flow application error.
  1. The debug panel shows the exact query that failed, such as "Find all Account records where: Id Equals 0," with the result "Failed to find records." Additional error details identify the invalid ID field and reference the SOAP API Developer Guide. The error occurs because the query attempts to find an Account record where Id equals 0, which is not valid in Salesforce — the debug details specify the row and column of the error and confirm that the transaction was rolled back.
Salesforce Flow error screen with debug details highlighting the failed query and error specifics.
Salesforce Flow error screen with debug details highlighting the failed query and error specifics.

Troubleshoot flow errors using debug details and notifications

  1. When an unhandled fault occurs, the red error message appears on the flow screen, and the Debug Details panel on the right provides specifics about the failed step. For example, the "GET RECORDS" step fails because it attempted to find Account records where Id equals 0, which is invalid. The debug log shows the exact SOQL query, highlights the invalid ID field, and confirms the transaction was rolled back, meaning no changes were committed to the database.
Salesforce Flow error screen with a red error message and debug details panel showing the failed record lookup and error specifics.
Salesforce Flow error screen with a red error message and debug details panel showing the failed record lookup and error specifics.
  1. Check your email for automatic error notifications sent from FlowApplication (info@salesforce.com). The email subject reads: "Error Occurred During Flow 'Hello World': This error occurred when the flow tried to look up records..." It includes a direct link to debug the failed interview in Flow Builder (with the interview GUID), details about the error element (Get_Records), the SOQL query that failed, a link to the SOAP API Developer Guide, and flow details such as API Name, Type, Version, Status, and Org.

  2. Locate the debug link in the email, which reads: "Debug the failed interview in Flow Builder for the interview GUID: [GUID]." Clicking this link redirects you to the specific flow interview in Flow Builder so you can investigate the error directly.

Salesforce error notification email with the debug link highlighted.
Salesforce error notification email with the debug link highlighted.
  1. Review the Flow Details and Flow Interview Details sections in the email. Flow Details may include the Flow API Name (Hello_World), Type (Screen Flow), Version, Status (Active), and Org. Flow Interview Details may include the Interview Label, Interview GUID, Current User, Start time, and Duration.
Salesforce error notification email showing flow interview details and transaction status.
Salesforce error notification email showing flow interview details and transaction status.
  1. Examine the remaining sections of the email: Transaction Committed confirms whether any records were created, updated, or deleted; SCREEN shows the screen name and display text; Selected Navigation Button indicates which button was pressed; GET RECORDS repeats the failed query and result; and the error message at the bottom details the invalid ID field with a reference to the SOAP API Developer Guide.
Salesforce error notification email with detailed flow execution and error information.
Salesforce error notification email with detailed flow execution and error information.
  1. Click the debug link in the email to open the failed flow interview directly in Flow Builder. The failed element is automatically highlighted in the flow diagram, and the Debug Details panel on the right shows the step-by-step execution, including where the error occurred.

Locate and debug failed flow interviews in Setup

  1. Click the Setup gear icon in the Salesforce navigation bar, then type fail in the Quick Find search box and select Paused And Failed Flow Interviews from the Process Automation section. The "All Failed Flow Interviews" list view appears, displaying failed flow runs with columns such as Interview Label, Flow API Name, Flow Version, Type, Last Modified By, Last Modified Date, Current Version, and Flow Interview Guid.
Salesforce Setup screen showing the All Failed Flow Interviews list with interview labels, flow names, versions, and GUIDs.
Salesforce Setup screen showing the All Failed Flow Interviews list with interview labels, flow names, versions, and GUIDs.
  1. Click the Interview Label link for the failed interview you want to investigate. Salesforce automatically redirects you to Flow Builder and opens the failed flow interview, with the failed element (for example "Get Records") highlighted in the flow diagram.
Salesforce Flow Builder screen showing the failed flow interview, with the error highlighted on the Get Records element and the Debug Details panel open.
Salesforce Flow Builder screen showing the failed flow interview, with the error highlighted on the Get Records element and the Debug Details panel open.
  1. Review the flow diagram sequence: Start (Screen Flow) → Hello World (Screen) → Get Records (Get Records) → End, with the "Get Records" element marked by an error icon. The Debug Details panel provides how the interview started, screen details, and the failed "Get Records" step, including the SOQL query ("SELECT Id FROM Account WHERE (Id = '0')"), the error message ("invalid ID field: 0"), and a link to the SOAP API Developer Guide. Use this information to identify and correct the cause of the flow failure.

What's next

Salesforce Flow is a declarative, point-and-click automation tool that lets admins and business users automate processes without writing code. Now that you know how to create a flow in Salesforce — from building a Screen Flow with Auto-Layout to adding a Get Records element and debugging errors — you can apply the same Flow Builder tools (Run, Debug, Activate, Save As) to build and troubleshoot other flow types, including Record-Triggered, Schedule-Triggered, Platform Event-Triggered, and Autolaunched flows.

End screen with "Subscribe for more" and social media handles for @salesforcehunt on YouTube, Instagram, Facebook, Pinterest, and Quora
End screen with "Subscribe for more" and social media handles for @salesforcehunt on YouTube, Instagram, Facebook, Pinterest, and Quora
Generation details: cost, quality tiers

Docsie billed 7,500 credits ($5.25) to analyze this 15-minute video at standard quality. The rewrite, template fill and Word/PDF exports were included. The same video at each quality tier:

QualityFrames sampledCreditsApprox. cost
Draftevery 16-30 s3,750$2.62
Standard (this guide)every 8-15 s7,500$5.25
Detailedevery 4-7 s15,000$10.50
Ultraevery 1-3 s30,000$21.00

Credits priced at $0.70 per 1,000; plans include a monthly allowance. Enterprise customers on on-premise or bring-your-own-model deployments run this on their own inference and pay no per-video credits.

Generated by Docsie Video-to-Docs on 2026-10-01 from a 14-minute video. Screenshots are frames from the source video and belong to their creator, Salesforce Hunt, whose original is embedded above. If you own this video and want the guide removed or credited differently, contact us and we will act within one business day.

Turn your own training videos into guidesJoin teams that save hours, reduce documentation work and scale training with Docsie.
See Docsie in action. No commitment.

Ready to Transform Your Documentation?

Start creating professional documentation that your users will love