Skip to main content
Tasks are executed as ordered lists of actions. The SDK exports typed factories under the actions namespace that generate correctly shaped action objects with stable IDs, plus an action() helper for typed one-offs.

Import

Every helper returns a plain action object. Helpers assign a unique id if you do not pass one, so lists remain stable across saves.

Base options

Every helper accepts an optional base argument with common fields:
Use disabled: true to keep an action in the list without executing it.

Action types

Navigation and interaction

Navigate, click, type, press keys, wait, hover, and capture screenshots.

Extraction

Read content, run JavaScript, and make HTTP requests.

Control flow

Conditionals, loops, branches, repeats, and sub-task starts.

Variables and CAPTCHA

Set and merge variables, plus CAPTCHA solving actions.

Extraction

request accepts { method, headers, body, varName }. method defaults to GET.

Control flow

Condition objects for if and while accept:
ConditionOperator is one of:
  • Strings: equals, not_equals, contains, starts_with, ends_with, matches
  • Numbers: equals, not_equals, gt, gte, lt, lte
  • Booleans: is_true, is_false
  • Selectors: exists, not_exists

Variables

The exported variable(name) helper produces the {$name} template token Figranium expects when a value should be substituted from a runtime variable:
See Variables and templates for more.

CAPTCHA

actions.solveCaptcha(input?, base?) produces a solve_captcha action. Fields:
Solve routing uses the configured remote endpoint first (if CAPTCHA_SOLVER_URL is set), then falls back to the built-in local model. See CAPTCHA Solving for setup and return-value shape.

Typed one-off actions

For actions the helpers do not cover, use action() with a typed literal:
action() assigns an ID if you do not provide one and preserves all valid fields.

Full task example

Variables and templates

Declare task variables and reference them with variable().

Tasks resource

Save, version, and execute tasks that use these actions.