Skip to main content
This doc is for anyone building workflows that react to patient form submissions. When a patient submits a form step, Morf receives that data and needs to know what to do with it. These expressions help you control exactly when those actions fire, so the right data reaches the right destination at the right time. To check out our existing destinations, see our Integrations page.

Gate on a specific form step

Use this when you only want an action to fire on a specific step of a multi-step form, not every time the patient submits anything. Start here — match a single step by name:
Match any step that contains a phrase:
Match any of several steps:
Examples:
Step names must match exactly. Copy-paste the step name from your form builder — including capitalization, spaces, and punctuation. If it doesn’t match, the filter won’t fire.
The field name step_id is used throughout this doc and is the standard for Morf forms. Other form tools (like Formsort) may use a different field name — check your event payload if step_id isn’t populated.
Use these sample prompts with Flo to generate a CEL expression that fits your goals.

Check that key fields were submitted

Use this when you want to make sure the patient actually filled in certain fields before triggering a downstream action. Single field:
Multiple required fields (all must be present):
At least one of two fields is present:
Examples:

Route based on a specific answer

Use this when you want the workflow to take a different path depending on what the patient answered — for example, sending them down an insurance path vs. a cash pay path. Template:
Template — answer is NOT a specific value:
Examples:
Use these sample prompts with Flo to generate a CEL expression that fits your goals.

Prevent duplicate processing

Use this when you want to make sure an action — like creating a HubSpot contact — only happens once, even if the workflow runs multiple times for the same patient. Only run if a property has NOT been set yet:
Only run if a flag is not already true:
Only run if this is the first time through (not a duplicate form submission):
Examples:

Route based on eligibility

Use this when you want to send eligible and ineligible patients down different branches based on their insurance or screener results. Start here — single eligibility check: Patient is eligible:
Patient has insurance but it’s not Medicaid:
Patient is ineligible:
Advanced — multiple conditions combined:
Annotated breakdown:
Use these sample prompts with Flo to generate a CEL expression that fits your goals.

Handle multilingual or optional fields with fallbacks

Use this when your form has two versions of the same field — like English and Spanish — and you want to use whichever one the patient filled out. Template:
Examples:
This works for action arguments too, not just filters. Use it anywhere you’re passing form data to an integration.

Check if a linked external ID exists

Use this when you’re about to write data to a third-party tool and need to confirm the patient has already been connected to that platform.
Check for the platform ID before creating or updating records. If the patient hasn’t been linked to HubSpot or Intercom yet, the action won’t have the ID it needs and will fail. Add this check in a filter node before any CRM action.

Ready to build?

Open the Dashboard

Start building your form workflow now.

Talk to the Morf team

Want a walkthrough or help getting started? Book a demo with us.

Further reading

For the complete CEL function reference — including all available operators, string functions, date helpers, and optional chaining syntax — see the CEL Reference.