About Local Actions

Local Actions execute on your computer, leveraging Lightning Components. Like Lightning Components, Local Actions can interact with your computer and make flexible connections to the web.

Installing Flow Local Actions

The library of available Local Actions is here. Pages for Local Actions contain either an install link or a link to source code for installation.

Prerequisites

Note that your org must be able to run Lightning Components. That means that it must:

1) have “My Domain” setup, and

2) The “Enable Lightning runtime for flows” checkbox must be checked in the Process Automation Settings part of Setup.

Considerations

Each local Flow Action works in concert with a Lightning Component, and Lightning Components require a computer to run on. As a result, flows with local Flow Actions can only be used in Screen-Based Flows. The same technology that ensures that your local machine can render a screen on your computer ensures that the javascript inside the Lightning Component will be able to run. Autolaunched Flows, which do not have Screen elements, execute on the server and cannot be used with Local Actions.

We recommend that you not use html markup in the Lightning Components that you use with local Flow Actions. In this respect, local Flow Actions are different from their cousins, the Flow Screen Components, The reason for this is that local Flow Actions tend to execute very quickly, and any markup you add to them will likely flash on the screen and disappear before the user can make sense of it. Local Flow Actions are best used for work that takes place in the background. If you want to take advantage of Lightning Component markup and display UI to users, you should use Lightning Components as Flow Screen Fields. (Announcement) (Unofficial SF Flow Screen Components)

Learn about Developing Local Actions

Local Action Sample Source Code

Learn more about Direct Data Queries

Blog Posts about Local Actions

Getting Started with Lightning Flow Designer – Part 4 (Need to Redirect a User to a New Record?)

FAQ

I can already do these things in Lightning code, so why should I use Flow Actions?

Flow Actions are intended primarily for non-developers. Things like notifications can be done without writing any code. If you have the skill to build a Flow Action, we encourage you to publish it and make it available for others to install!

Lightning components support CORS calls today as long as the target site is configured in CSP Trusted Sites. So if Flow is using Lightning component is there a use case or need to use Local Actions to make cross domain calls?

The benefit of using a local Flow Action for web service requests is mainly that you won’t have to write any code yourself.

Since External Services can handle authentication as well is there much need to use Local Actions?

External Services are powerful but have a few limitations. For one thing, they go through the Salesforce Cloud and require a firewall entry point to access a company’s on-premises servers. Local Flow Actions can be set up to make Direct Data Queries to on-premises servers. Also, External Services don’t provide access to Browser features like page creation and toast display.

However, the authentication used by External Services is handy. You can create a Named Credential and use it to get access to a web service. We anticipate that may Flow Actions will also use Named Credentials to establish OAuth connectivity to web services.