Workflows & Automations
introduction workflows let you automate actions when something happens in a sparklayer form β for example sending notifications, updating data, or triggering internal processes instead of building manual processes around form submissions, workflows allow you to create automated flows using a visual editor typical sparklayer use cases include trade account approvals internal notifications order request processing conditional routing based on customer data π§ what is a workflow? a workflow is an automated sequence that runs when an event occurs every workflow follows a simple structure trigger β step β step β step β end each workflow contains component description trigger the event that starts the workflow steps actions performed after the trigger connections paths that link steps together workflows are created visually by connecting nodes together on a canvas if you chose to receive notifications on new submissions when creating a form, then your form already has a workflow! click on the workflows tab to see it π creating a workflow to create a workflow open your form in sparklayer go to the workflows tab click add workflow the visual editor will open add a trigger triggers define when the workflow runs examples form submitted entry answer updated internal field updated workflow trigger button clicked to add a trigger click add trigger on the canvas select the trigger type configure any options add steps steps define what happens after the trigger to add a step click the add step button, or drag the path handle out from an existing step choose a step type configure the action connect to additional steps if needed you can build simple linear workflows or create branches using conditions π§Ύ publishing workflows workflows are part of your form version this means changes remain in draft until published the live workflow only updates when the form version is published older entries continue using the workflow version they were created with to activate a workflow save your changes publish the form version this keeps automation stable even while you make updates π understanding the workflow canvas the workflow editor uses a visual canvas where you arrange nodes and connections navigation action how it works pan click and drag zoom scroll or use controls select node click the node multi select shift + click or drag nodes nodes represent triggers and steps node type purpose trigger nodes starting point for workflows step nodes actions performed during execution connections paths between nodes click a node to edit settings view input/output data delete or reconnect it π connecting steps you connect steps by dragging from one node to another connection types path meaning next continue to the next step true / false conditional branching error run when a step fails loop used in repeat processes a single step can branch into multiple paths, allowing complex automation flows βοΈ how workflows run workflows execute synchronously , meaning steps run one after another in order execution flow trigger fires steps execute sequentially entry data updates workflow completes during execution, workflows can access entry data form structure outputs from previous steps data tables or stored values π workflow runs & history every time a workflow runs, sparklayer records a run log viewing workflow runs open an entry go to workflow runs select a run to view details each run includes data description start & end time when execution occurred duration total runtime status completed or failed step logs inputs, outputs, and results this helps diagnose issues without needing developer access π§ͺ debugging workflows when something doesnβt work as expected open the workflow run review each step check error messages or failed conditions adjust the workflow or entry data you can see exactly which path was taken through the workflow β including conditional branches π§© example workflow patterns π© simple notification trigger form submitted β send internal email π conditional routing trigger form submitted β if category = sales β notify sales team else β notify support team π§Ύ multi step approval process trigger form submitted β calculate totals β update entry fields β send confirmation email β if total > threshold β request approval these patterns are common in b2b onboarding and request workflows π‘ best practices keep workflows focused one workflow per process avoid combining unrelated automation use clear naming test before publishing use preview mode submit test entries check workflow runs for errors plan for errors add error paths where needed log important outputs avoid breaking critical workflows optimise performance limit unnecessary api calls avoid overly long step chains keep automation logic clear and maintainable