Skip to main content

Workflow editor

Confirm environment before trial run

Before Run or Trial run, complete USB device license and the matching automation / Bluetooth environment in Prerequisites & licensing. Otherwise common steps fail immediately.

A workflow saves steps like โ€œtap here, wait, open which Appโ€ as a repeatable flow. Click "Workflow editor" at the top to enter the editor.

Layoutโ€‹

  • Left: workflow library (tree โ€” main flows and subflows)
  • Center top: open flow tabs (multiple at once)
  • Center bottom: visual flowchart or text mode (advanced)
  • Right: selected step parameters, variable pool, AI assist panel

Workflow library (left)โ€‹

  • Root: standalone main flows, runnable directly
  • Child: subflows invoked by main flows, shown indented
  • Click name to open for edit; hover for Open folder, Delete
  • Left panel can collapse for a larger canvas
  • Root flows can export as.spk package (see Workflow.spk); "ๅฏ†" marks imported read-only packages

Create and saveโ€‹

ActionHow
NewTop bar New, enter name
SaveSave button or Ctrl+S (Mac: Cmd+S)
ValidateValidate before save โ€” missing fields, bad connections
LayoutAuto-arrange flowchart

Enable Auto-save on tab switch in Settings.

Step cards have Simple / Advanced toggle top-right: Simple hides JSON and advanced fields; Advanced shows full config.

Two editing modesโ€‹

ModeBest for
VisualMost users: drag nodes, connect, click steps to edit params
TextUsers familiar with config files: edit JSON directly

Start with Visual.

Flowchart elementsโ€‹

  • Boxes (states): groups of steps run in order
  • Arrows: on success go to next step; also failure and condition branches
  • Diamonds: branch on conditions (e.g. โ€œtap if found, else waitโ€)
  • Subflow: one step invokes another saved flow (invoke)

Canvas supports pan, zoom, minimap; Ctrl+Z (Mac: Cmd+Z) undo; right-click copy, delete, insert step on a connection.

After trial run, nodes highlight green/red/blue; select one to see logs and I/O.

Variables: flow config and variable poolโ€‹

Two kinds of data to remember:

TypeMeaningWhere to configure
Flow configDefaults before the flow starts (package name, keywords, etc.)Flow config dialog
Step resultsData left after a step (screenshot, OCR, match result, etc.)Save to variable on the step

Variable pool (canvas toolbar) shows both:

  • Design view: infers config and step results from flow structure
  • Run view: after trial run, shows actual variable values
  • Click a variable to highlight steps that reference it
  • Optional Trial run variable flow โ€” data lines between nodes visited this run only

When invoking subflows, use the checklist to pick pass-through / return variables โ€” no hand-written JSON (Advanced mode still allows editing).

Trial run (important)โ€‹

After editing, trial run before production:

  1. Pick an online device in the toolbar
  2. Click Trial run / Run (or Trial from this step / Run selected steps)
  3. Steps change color on canvas: running, success, failure
  4. Force stop anytime

Trial runs create real tasks โ€” see Tasks & monitoring. From the task panel, "Workflow editor" returns to the editor with playback of each step.

AI-assisted flow authoringโ€‹

Right AI panel (configure LLM first โ€” Getting started) can:

  • Describe automation in Chinese and let AI generate the flowchart
  • Check Edit selected state only for partial rewrites
  • Multi-turn chat until satisfied

After generation, still validate and trial run.

Flow config (global settings)โ€‹

Click Flow config to set:

ItemPurpose
Workflow default / This flow startupTwo config layers โ€” override rules for trial run vs. run
Input params (trial run)Key-value overrides for trial run
Working directoryOptional. When set, file steps and match templates prefer this folder; create assets/templates/ for small images

Working directory differs from Album import folderPath: album steps need an absolute PC path; save_file / read_file without working directory write under runtime_data/ in the data directory โ€” no working directory required first.

Step previews while editingโ€‹

With a trial device selected, some steps support preview:

Step typePreview
OCRCapture and recognize text (default non-automation capture)
Image match / color-offset matchMatch preview: match box, search region, crop template โ€” see Image/color matching
Node captureClickable elements on current screen (automation required)
VLM visual locateMark location on screenshot from Chinese description
Coordinate tapPick point on screenshot
pick data extractionPreview from last trial run I/O snapshot

Screenshot and OCR are separate non-automation and automation steps โ€” same names as AI chat.

Sub-workflowsโ€‹

  • Add Invoke subflow step, pick existing workflow ID
  • Double-click invoke node or right-click Enter subflow to edit (subgraph not expanded on canvas by default)
  • Configure Input params, Write back variables, Success record (optional)

Open flow file locationโ€‹

Folder icon next to a library item opens that flow's file directory on your PC for backup or copy.

Next stepsโ€‹