create_task
Build a fully-configured Figranium automation task with sequential action steps, state variables, anti-bot stealth, and optional scheduling for recurring web workflows.
Instructions
Create a complete, fully-configured Figranium automation task including sequential action steps, state variables, anti-bot stealth mechanisms, and optional scheduling.
!!! IMPORTANT GUIDELINES FOR LLM AGENTS !!!
VARIABLE TEMPLATING SYNTAX: You MUST use
{$variable_name}(with a single curly brace and dollar sign, e.g.{$myVar}) for variable references/templating inside action values, URLs, headers, or body fields. NEVER use double curly braces like{{variable_name}}or JavaScript-style templates like${variable_name}, as these syntaxes are unsupported and will cause execution failures.TASK VALIDATION: Newly created or updated tasks are ordinarily intended to be validated against a real execution result so configuration, selectors, and extracted output can be checked.
MODE SELECTION: Use
agentmode by default, including for scraping tasks.scrapemode does not support action blocks and should be used only when extremely fast, action-free scraping is required.WORKFLOW BOUNDARIES: Timed Wait and Navigate To cannot be the first action. A fixed initial delay belongs in task-level
wait, and the initial destination belongs in task-levelurl. Get Content cannot be the final action because its value needs a consuming action; useextractionScriptfor final structured output.
1. Purpose
Use this tool when you need to automate any recurring or complex web-based workflows, including data extraction (scraping), automated form-filling, dashboard testing, or dynamic visual monitoring. Tasks are stored permanently in Figranium and can be executed ad-hoc, triggered via API, or scheduled.
2. Execution Model
Figranium tasks run as a linear sequence of steps defined in the 'actions' array. Actions are processed in order from top to bottom. Control flow steps (such as 'if', 'while', 'repeat') allow loops and branching, while 'on_error' steps define fallback behaviors. Variables represent the state and can be updated dynamically during execution. Ensure all opened block structures (such as 'if', 'while', 'repeat', 'foreach') are closed with an 'end' action step.
3. Comprehensive Step Types
'navigate': Redirect browser to a new URL specified in the 'value' field.
'wait': Pause execution for N seconds specified in the 'value' field.
'wait_selector': Pause until the DOM element matching 'selector' is rendered.
'click': Simulate a single, double, or right click on the element matching 'selector'; set 'clickType' to 'double' or 'right' when needed.
'check' / 'uncheck': Idempotently set the checked state of a checkbox or radio control matching 'selector'.
'drag_and_drop': Drag from 'selector' to the required 'targetSelector'.
'reload': Reload the current page and wait for DOM content to load.
'select': Choose an option from a native select using 'selector' and its option 'value'.
'type': Type the 'value' into the 'selector' input element. Use 'typeMode' to clear/replace or append.
'hover': Move mouse pointer to the element matching 'selector'.
'press': Press a specific keyboard key (e.g., 'Enter') specified in the 'key' field.
'scroll': Scroll the page or target element to a specific coordinate or direction.
'javascript': Execute custom JavaScript on the page. Stored in 'value', outputs can be saved to 'varName'.
'screenshot': Capture and save a screenshot.
'http_request': Perform direct API requests.
'if', 'else', 'end': Conditional blocks based on variables.
'while', 'repeat', 'foreach': Looping blocks.
'stop': Halt task execution.
'set': Set or update a task variable.
'solve_captcha': Attempt to automatically solve a detected CAPTCHA challenge.
'wait_captcha': Pause until a CAPTCHA challenge is initialized/ready without solving it.
'upload': Attach the newest unuploaded file, ZIP, or folder from a Cabinet (see 'cabinetId') to a file input, chooser, or drop target matching 'selector'.
'finalize_uploads': Mark all Cabinet items attached during the execution as uploaded.
4. Selector Strategy & Folate Resolution
When finding selectors for a task, use Folate instead of guessing brittle CSS/XPath selectors:
Call 'folate_resolve' with the page HTML (for example, from an execution with 'includeHtml: true' or 'get_content') to resolve a natural-language query into ranked CSS/XPath selectors.
Or pass a natural-language description (e.g., 'click Sign In button', or prefixed with 'folate:' / 'ai:') directly in 'selector' / 'targetSelector' for automatic runtime resolution via Folate.
When exact selectors are already known or returned by 'folate_resolve', unique IDs/data attributes ('#submit-button', '[data-testid="login"]'), ARIA roles ('[aria-label="Search"]'), CSS classes, XPath, or coordinates ('x,y') are also supported. Fallback: If an element might be missing or slow to load, wrap the interaction inside an 'if' block evaluating a variable or use 'on_error' to catch failure.
5. Edge Cases & Retry Logic
Timeouts: Wait-selectors have a default timeout. Ensure critical steps use 'wait_selector' first to avoid clicking non-existent elements.
Stealth: Turning on options like 'naturalTyping', 'cursorGlide', and 'allowTypos' simulates authentic human speed and rhythm to prevent anti-bot blocking on protected sites.
Browser state: Set 'cookieStateId' to a preexisting named state ID to reuse cookies, to null for a fresh state, or omit it for the instance default. 'statelessExecution' is a deprecated legacy flag.
6. Complex Real-World Multi-Step JSON Example:
{
"name": "HackerNews Custom Scraper",
"url": "https://news.ycombinator.com",
"mode": "agent",
"wait": 3,
"rotateUserAgents": true,
"stealth": {
"allowTypos": true,
"cursorGlide": true,
"naturalTyping": true
},
"actions": [
{
"type": "wait_selector",
"selector": ".hnname"
},
{
"type": "click",
"selector": "a.hnmore"
},
{
"type": "wait",
"value": "2"
},
{
"type": "javascript",
"value": "return Array.from(document.querySelectorAll('.athing')).map(tr => ({ id: tr.id, title: tr.querySelector('.titleline > a')?.innerText, href: tr.querySelector('.titleline > a')?.href }));",
"varName": "hn_stories"
},
{
"type": "navigate",
"value": "https://httpbin.org/post"
},
{
"type": "wait_selector",
"selector": "pre"
},
{
"type": "javascript",
"value": "console.log('Finished scraping and navigated successfully.');"
}
],
"variables": {},
"extractionFormat": "json"
}Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"url": "<url>",
"mode": "<mode>"
},
"name": "create_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Initial URL to navigate to when the task starts. Expected type: string. Example: 'https://news.ycombinator.com' | |
| mode | Yes | Execution mode. Use 'agent' by default, including for scraping, because it supports action blocks. 'scrape' does not support action blocks and is only for exceptional, extremely fast action-free scraping. Expected type: string enum. Example: 'agent' | |
| name | Yes | Descriptive name of the automation task. Expected type: string. Example: 'HackerNews Scraper' | |
| wait | No | Standard delay in seconds to wait after navigation and page loads to let dynamic scripts complete. Expected type: number. Example: 5 | |
| output | No | Optional Baserow destination for Task results. Use a credential already configured in the Figranium workspace; this does not administer credentials. | |
| actions | No | Sequential list of browser actions/control flow steps to execute. Timed Wait and Navigate To cannot be the first action because task-level wait and url define the starting state; Get Content cannot be the final action because its result must feed a later action or extractionScript. Action blocks require 'agent' mode and are not supported in 'scrape' mode. Note: Variable references MUST use '{$variable_name}' syntax. | |
| stealth | No | Configures realistic stealth, anti-bot, and human behavior simulation on the browser instance. | |
| schedule | No | Task automatic execution schedule. Expected type: object. | |
| selector | No | Default CSS selector to wait for on the page load before starting actions. Expected type: string. Example: '.main-content' | |
| variables | No | Task INPUT variables and caller-overridable configuration only. Do not declare output-only fields or transient runtime state here. Use Set Variable for mid-task state. Expected type: record object of variable configurations. | |
| description | No | Detailed description of what the task automates. Expected type: string. Example: 'Logs in and extracts weekly leads' | |
| humanTyping | No | Vary typing speeds and insert tiny delays to simulate organic human typing. Expected type: boolean. Example: true | |
| includeHtml | No | Whether to include the raw page HTML in the execution response. Expected type: boolean. Example: false | |
| translation | No | Optional page translation for Agent runs. It is disabled by default and is not available in Scrape mode. | |
| cookieStateId | No | Existing named cookie state ID; null starts fresh, omitted uses the instance default (Figranium v0.21+). | |
| rotateProxies | No | Rotate through configured proxy IPs to prevent IP-based rate limiting. Expected type: boolean. Example: false | |
| rotateViewport | No | Vary viewport resolutions randomly to simulate multiple desktop and mobile devices. Expected type: boolean. Example: true | |
| disableRecording | No | Disable video/VNC recording of this task to save storage. Expected type: boolean. Example: true | |
| extractionFormat | No | Target export format of any extracted data. Expected type: string enum. Example: 'json' | json |
| extractionScript | No | Post-execution extraction script for the task's actual final output. Final structured fields, lists, tables, parsing, and extraction logic belong here rather than in task variables or JavaScript action blocks. Expected type: string. Example: 'return Array.from(document.querySelectorAll("a")).map(el => el.href)' | |
| includeShadowDom | No | Whether to parse and resolve target elements residing in Shadow DOMs. Expected type: boolean. Example: true | |
| rotateUserAgents | No | Rotate user agents across requests to avoid pattern blocking and fingerprinting. Expected type: boolean. Example: true | |
| downloadCabinetId | No | Cabinet used for intercepted downloads; omitted uses the default Cabinet. Expected type: string. Example: 'cab_basic' | |
| statelessExecution | No | Deprecated legacy flag. Prefer cookieStateId: null for a fresh browser state. |