I'm trying to call a flow from a lightning action on the opportunity object. The flow is called from a button in classic, but buttons do not appear in lightning. A URL hack of that button allows me to pass the record id of the current opportunity record into the flow using the button url. I have created a Flow quick action to run the flow in lightning (Opportunities>Buttons,Links and Actions>New Action> Action Type= Flow) but I keep getting a fault error when trying to run the flow. Essentially, the error fails because there's no way to pass in the record id for the current record with the action.
Best Answer
Flow Type: Flow actions support only flows that include screens.
Input Variables Flow actions let you pass the value of the record's ID field into the flow, but that's it. If your flow has a Text input variable called recordId, the action passes the record's ID into that variable at runtime. If not, it doesn't and the flow tries to run anyway.
So the above is relevant only if your'e using screen flows Add a Flow As an Action on a Record
If you do need to use a flow without screens you can leverage lightning components(Embed a Flow in a Custom Lightning Component) to pass the recordId to the flow
Controller
If you want to end up using in both classic and lighting use a custom button to Embed Flows in Visualforce Pages