How to Create a Basic Record-Triggered Flow

Prev Next

How to Create a Basic Record-Triggered Flow

Overview

A record-triggered flow runs automatically when a record is created or updated. It is the standard Salesforce tool for simple automation, like stamping a date, updating a field, or filling in information Left Main does not handle out of the box.

This article walks through one example: stamping the date and time on a Lead when its Lead Status changes to Working. Once you know the pattern, you can use it on other objects and fields. For a full introduction to Flow Builder, see Salesforce’s Record-Triggered Flows module on Trailhead.

Watch: How To: Simple Record Triggered Flow

Prerequisites

  • System Administrator access, or permission to manage flows.

  • A field to update. In this example, that is a custom Date/Time field on the Lead called Date/Time Move to Working. Create the field before you build the flow.

Steps

Step 1: Create the flow

  1. Click the gear icon, then click Setup.

  2. In the Quick Find box, type Flows, then click Flows.

  3. Click New Flow.

  4. Select Start From Scratch, then Record-Triggered Flow, and click Create.

Step 2: Set when the flow runs

  1. For Object, select Lead.

  2. Under Trigger the Flow When, select A record is updated.

  3. Under Set Entry Conditions, for Condition Requirements, select All Conditions Are Met (AND).

  4. Add a condition: Status equals Working.

  5. Under When to Run the Flow for Updated Records, select Only when a record is updated to meet the condition requirements.

  6. For Optimize the Flow For, select Fast Field Updates.

Note: Without the setting in step 5, the flow runs on every edit to a Lead whose Status is Working. With it, the flow runs only the first time the Status changes to Working.

Step 3: Add the update

  1. Click the + below the Start element and select Update Triggering Record.

  2. Enter a label for the element, such as Stamp Move to Working.

  3. Under Set Field Values for the Lead Record, select Date/Time Move to Working as the field.

  4. For the value, type flow and select $Flow.CurrentDateTime.

Step 4: Save, test, and activate

  1. Click Save and give the flow a clear name, such as Lead – Status Equals Working – Timestamp.

  2. Click Debug. For Run the Flow As If the Record Is, select Updated.

  3. Select a test Lead, set Status to Working, and click Run.

  4. Review the debug results. A blue path through the flow and the new timestamp value mean the flow worked.

  5. Click Activate.

Expected Outcome

When a Lead’s Status changes to Working, Date/Time Move to Working fills in with the current date and time. To confirm, open a test Lead, change its Status to Working, and click Save. The field should now show the date and time of the change.

Tips / Best Practices

  • Name flows so they describe themselves. Include the object, the trigger, and the action, so anyone in Setup can tell what the flow does.

  • Always use Debug before activating. Debug shows exactly which path the flow takes, so you can confirm it works before it runs on real records.

  • Check for existing automation first. If another flow, a Left Main feature, or a Process Builder already updates the same field, they may overwrite each other.

Troubleshooting

Issue: The field does not update.
Solution: Confirm the flow is Active. Then make sure the record meets the entry condition and was changed to that value during the edit. A record that already had a Status of Working before the edit won’t trigger the flow.

Issue: An error appears when you save a record after activating the flow.
Solution: See How to Troubleshoot a Failed Flow.

Still Not Working?

  • Email support: support@leftmainrei.com

  • Include the flow name, a link to the record you tested, and a Loom video if possible.