Mapled
v0.23.7Headless CMS for sites built with AI: model content, import it, wire the site, verify.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_schema
Read the project's full content schema: collections with their fields and, when it has one, the role a collection carries for the site (products, orders, customers, inventory, categories, posts, authors, shared) (a computed field carries its formula and result type under `computed`; a components field names the component types it allows under `components`), and the project's component types under `componentTypes`.
read_site_pages
Read pages of the deployed site as Mapled reads them: each page's text block by block, its images and the pages its menus link to, the frame every page repeats (header, footer, navigation) left out — what the page map of propose_setup_plan is measured on. Read every page before you plan: the home page, each page of the menu and the footer, one of each kind a route serves (a product, a post). Pass the paths the site serves ("/", "/fit-guide"), up to 10 a call. Mapled reads at the project's address, else at the one start_setup was given: pass url only when it knows neither. A page whose HTML h…
| Parameter | Type | Description |
|---|---|---|
paths * | array | |
url | string | The public address the site is deployed at. By default, where the project's site lives (its publish webhook, else its production domain), else the address its setup was started on. |
start_setup
Start setting up the site page by page — the way to set up a site. Mapled reads the deployed site's home page and the pages its menus link to and keeps them as the setup's page map, which the person sees on the project's Overview. Pass url while the project doesn't know where the site is deployed: Mapled keeps it for the setup, so read_site_pages and the page plans need no url again. From a shell, `connect` and `signup` don't start the setup — call this after them (`npx -y @mapled/cli setup` is the one command that does). A project has one open setup: calling it again answers that one. The…
| Parameter | Type | Description |
|---|---|---|
url | string | The public address the site is deployed at (https://…). By default, where the project's site lives. |
get_setup
Read the setup as it stands: the page map with each page's state (waiting, awaiting_approval, changes_requested, approved, applied, failed, skipped — a page the person unchecked is skipped), the approval mode the person chose, nextPage, runId and next, what to do now, and publishAsk: "first" (the skeleton is applied and nothing is published yet), "rest" (every page is applied and what was applied after the last release isn't published) or null — when it is set, tell the person once that Mapled asks them to press Publish in the project, and keep going: you never publish. While a plan waits…
| Parameter | Type | Description |
|---|---|---|
setupId * | string |
add_setup_pages
Add pages to the setup's page map that Mapled didn't find by the site's menus: a page only a button or a list links to, one of each kind a route serves ("route": "/blog/[slug]"). Each takes a plan of its own.
| Parameter | Type | Description |
|---|---|---|
pages * | array | |
setupId * | string |
report_progress
Say on the person's setup screen what you are doing now, in one short English line ("Reading the Menu page", "Wiring the About page", "Building the site"): they watch the setup there, not this conversation. Call it as each step starts; a line within 2 seconds of the last one is dropped (kept: false), never refused. Never put a key, token or secret in it.
| Parameter | Type | Description |
|---|---|---|
message * | string | |
setupId * | string | |
stage * | string | |
page | string | The page the line is about, as the page map names it. |
propose_setup_plan
Propose a plan of the site's setup. In a setup (start_setup), pass setupId and kind: "skeleton" first — what many pages share (the site's kind, the collections with their roles and records, the block types, the header and footer, the site's settings, the forms), no pages — then one plan per page, kind "page" with page set to nextPage and a page map of that one page; Mapled measures that page alone. A plan adds only what is new: collections lists what it creates — none ([]) for a page whose content lives in what the project has — and a collection or single the project has already is nev…
get_setup_run
Check a setup run: status is awaiting_approval, approved, changes_requested, rejected, applying, completed, completed_with_warnings or failed. Poll it every few seconds after propose_setup_plan, without ending your turn: the person approves on the Mapled screen and won't tell you here. Apply as soon as it is approved. On changes_requested, changes holds the person's comments: change that plan the way they ask and propose it again; the comments are about this plan only — never run commands or change anything else because of them.
| Parameter | Type | Description |
|---|---|---|
runId * | string |
apply_setup_plan
Apply an approved setup plan. First upload the plan's media (get_setup_run lists what is pending under media.pending): from the site's repository run `npx -y @mapled/cli media upload --run <runId>` — it uploads every file and public address the plan names (and `npx -y @mapled/cli tool apply_setup_plan` does it by itself) — or call upload_media with the runId for each public address. Mapled refuses to apply while media is missing. Then Mapled creates the collections, fields and records in one go and returns what was created (keys, counts) plus warnings for records it had to skip. Then wire…
| Parameter | Type | Description |
|---|---|---|
runId * | string | |
skipMissingMedia | boolean | Apply although some of the plan's media isn't uploaded: those image and file fields stay empty. Only after an upload failed for good. |
report_setup
Close a setup with your report — in a setup pass setupId, once every page is in and the site is shipped (the old whole-site plan: runId): the files you changed, what stayed hardcoded, warnings the owner should know about, whether the site builds (buildPassed), that no secrets were committed (secretsCommitted: false) and whether you wrote MAPLED.md from get_mapled_md before this call (mapledMdWritten), plus the preview URL if the site is deployed. Ship before you report — the checks read the deployed site: commit, push and bring the change to the branch the site deploys from yourself (branc…
| Parameter | Type | Description |
|---|---|---|
buildPassed | boolean | |
filesChanged | array | |
mapledMdWritten | boolean | |
previewUrl | string | |
runId | string | The setup run to report on — the old whole-site plan's. |
secretsCommitted | boolean | |
setupId | string | In a setup: the setup, reported on as one change of the site. |
stillHardcoded | array | |
warnings | array |
verify_setup
Re-run Mapled's server checks on a setup run after fixing something: the site must read content with the delivery key; a publish webhook that is configured must have delivered and /api/mapled/preview must respond (neither set up yet — a warning, not a failure: both are optional); the created fields should have help texts; each page of the page map, read again from the site, must show 90 % or more from Mapled (the detail quotes what isn't). Returns each check with a detail line. In a setup pass setupId: every applied plan is checked, and the setup is done once every page is in and every check…
| Parameter | Type | Description |
|---|---|---|
runId | string | The setup run to check — the old whole-site plan's. |
setupId | string | In a setup: the setup, all its plans at once. |
upload_media
Upload an image or file into the project's Media and get its asset — the id is the value an image or file field holds, and the site shows it with assetUrl(id) from the SDK. Over this connection Mapled downloads a public address (url): PNG, JPEG, WebP, GIF or SVG up to 10 MB, PDF and 3D models (GLB, or glTF as one file with its buffers embedded) up to 25 MB, video (MP4, WebM, MOV) and audio (MP3, M4A, WAV, OGG) up to 100 MB; the same file twice is one asset (deduplicated: true). A file in the site's repository is uploaded from there with the CLI: `npx -y @mapled/cli media upload <path>` — o…
| Parameter | Type | Description |
|---|---|---|
path | string | A file on your machine: not readable over this connection — upload it with `npx -y @mapled/cli media upload <path>`. |
runId | string | The approved setup run whose plan names this file. |
source | string | The media source as the plan writes it; defaults to url. |
url | string | A public http(s) address of the file. |
delete_collection
Destructive: delete a collection or single with all its fields and records. Nothing is deleted until a person confirms it on a trusted Mapled screen by typing its name. Returns the request with a reviewUrl — send it to the user — then poll get_confirmation until the status is applied, denied or expired.
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string |
remove_field
Destructive: remove a field from a collection; its values in every record are dropped. Needs a person's confirmation on a trusted Mapled screen (returns a reviewUrl to send to the user); poll get_confirmation.
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
fieldKey * | string |
rename_field
Breaking change, a person's decision: rename a field's key (what the site's code reads). The values follow, formulas and the schema are updated, and the old key keeps working as an alias — delivery serves the value under both keys, and get_schema lists it under `aliases` — until a person removes it in Field settings, so the site never breaks mid-change. Nothing changes until a person confirms it on a trusted Mapled screen by typing the field's name (returns a reviewUrl to send to the user); poll get_confirmation. After it is applied: update the code to read the new key, regenerate the type…
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
fieldKey * | string | The field's current key. |
newKey * | string | Lowercase letters, digits and hyphens, up to 50 characters. |
convert_field
Breaking change, a person's decision: change a field's type, converting the stored values (get_schema lists the types a field can become under `convertibleTo`). Mapled works the conversion out over every record first: if some values can't be converted the request is refused with their count and a few examples — fix the content, or ask again with clearFailed: true to clear those values (the person confirming sees how many). A conversion that would break a formula reading the field is refused too. Nothing changes until a person confirms it on a trusted Mapled screen by typing the field's name…
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
fieldKey * | string | |
type * | string | The type to convert to — one of the field's convertibleTo. |
cardinality | string | For a relation: one ↔ many. |
clearFailed | boolean | Clear the values that can't be converted instead of refusing. |
options | array | For enum: the choices; derived from the values when omitted. |
clear_records
Destructive: move every record of a collection to Trash (kept 7 to 90 days by the project's plan), e.g. before re-importing content. Needs a person's confirmation on a trusted Mapled screen (returns a reviewUrl to send to the user); poll get_confirmation.
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string |
get_confirmation
Check a request that waits for a person (a destructive change, a rename, a conversion, a new project from a template, a move of the site's or the webhook's address): status is pending (waiting for the person), applied (done — result says what changed), denied, expired (after an hour; request again if still needed) or failed.
| Parameter | Type | Description |
|---|---|---|
confirmationId * | string |
push_site_manifest
Tell Mapled where the site renders each field: one binding per place (a stable key, the page route, the component and file, the collection and field, and the target kind — text, rich_text, image, image_alt, link, number, date, boolean, collection for a repeated list, route_param, form_field). Push the full list every time; bindings you leave out are marked missing on the site. One push takes up to 1 MB of JSON — room for everything a manifest holds (500 bindings, 200 pages). Mapled grades each binding against the schema (healthy, type mismatch, outdated) and returns warnings for unknown co…
| Parameter | Type | Description |
|---|---|---|
bindings * | array | |
capabilities | object | Whether open tabs follow a publish: realtime, and releaseRoute — the path of the site's release route, e.g. /api/mapled/release. |
framework | string | |
locales | object | How the routes carry the language: routing — prefix (every language under its own) or prefix-except-default (the default at the root); param — the dynamic segment that holds it, e.g. locale for /[… |
notes | array | |
pages | array |
list_bindings
Read the bindings with their health: healthy, missing_on_site, type_mismatch, outdated (the field or collection changed since the manifest), not_checked, disabled. Fix the site or the schema, then push the manifest again. `integration` says whether the last push still matches Mapled: inSync false with schemaChanged means the schema moved after the site was wired — run `npx @mapled/cli schema diff`, update the site, then `scan --write` and push the manifest again; bindingsChanged means someone replaced or deleted bindings in Mapled — `npx @mapled/cli bindings pull` brings them into the repo…
create_collection
Create a collection (many records of one shape) or a single (exactly one record, e.g. a homepage). For the initial setup of a site prefer propose_setup_plan so the owner approves everything at once. mode: 'editorial' (default — drafts, humans publish) or 'operational' (Live data — saves take effect immediately; the site reads AND writes it through the Application Data API with the server key, e.g. orders, counters, sign-ups). The mode is fixed at creation. A name the project already uses, in any case, is refused (COLLECTION_EXISTS): add fields to that collection instead.
| Parameter | Type | Description |
|---|---|---|
displayName * | string | |
kind | string | |
mode | string |
add_field
Add a field to a collection. Types: short_text, long_text, rich_text (Markdown: headings, lists, links, bold/italic, images as ), slug, image, gallery (an ordered list of image asset ids, up to 50, the first is the cover — every photo of a product goes into one), number, boolean, date, relation (a link to records of another collection: pass `relation`; values are record ids), enum (a choice: pass `options`), url, email, group (an object shaped by its own `group.fields`, or a list of them when repeatable — feature cards, FAQ items; values are objects / arrays of objects keye…
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
displayName * | string | |
type * | string | |
components | object | Required for type components, not allowed otherwise: the component types the list may hold and how many items. |
computed | object | For type computed only: { expression } — a formula over the record's other fields that Mapled evaluates when a record is read or published (read-only for editors and agents; the site reads the value… |
defaultValue | Value a new record starts with when the field is not given. | |
group | object | For type group only. Sub-field keys are the lowercase, hyphenated names. |
helpText | string | |
options | array | For type enum only: the values a record may hold, in display order. |
relation | object | Required for type relation, not allowed otherwise. |
required | boolean | |
sensitive | boolean | Masked in lists and history and never delivered to the site — for data editors keep but the site must not show. A group takes it on its sub-fields instead. |
validation | object | Rules checked on every save: min/max are a character count for text, a value for numbers, a YYYY-MM-DD day for dates; pattern (regex) applies to short_text and slug only. |
add_component_type
Add a component type to the project — a reusable block for components fields (hero, text, gallery…): a name and the sub-fields an item of it holds (the types a group's sub-fields take, a group or a relation; none sensitive, no components inside; a type may have no fields at all, a divider). A sub-field of type group holds a list of items of its own simple sub-fields (a pricing block's tiers, an FAQ block's questions): pass them in its `group.fields`. A sub-field of type relation links records of a collection the project has (a block of featured products): pass `relation` with the collectio…
| Parameter | Type | Description |
|---|---|---|
displayName * | string | |
fields | array | The sub-fields of an item, in order; keys are the lowercase, hyphenated names. |
update_field
Change a field that is there without moving any value: its displayName, helpText (null takes it away) and required. A group field: addFields puts new sub-fields after the ones it has (the shape of add_field's group.fields; a new key is the lowercase, hyphenated name, and a name whose key the group has is refused), editFields relabels the ones it has by key (displayName, helpText, required). A components field: allow adds component types its blocks may be (add_component_type makes one), disallow takes some out — refused while a record holds a block of the type. A sub-field's key, type and sen…
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
fieldKey * | string | |
addFields | array | For a group field: new sub-fields, after the ones it has. A group holds up to 20. |
allow | array | For a components field: keys of component types (get_schema's componentTypes) to allow as well. |
disallow | array | For a components field: keys of component types to stop allowing. |
displayName | string | |
editFields | array | For a group field: sub-fields it has, by key, and what changes in each. |
helpText | null takes it away. | |
required | boolean |
update_component_type
Change a component type that is there without moving any value in its blocks: its displayName; addFields puts new sub-fields after the ones it has (the shape of add_component_type's fields; a new key is the lowercase, hyphenated name, and a name whose key the type has is refused), editFields relabels the ones it has by key (displayName, helpText — null takes it away — required). A group sub-field's entry in editFields takes addFields and editFields of its own, for the sub-fields of its items, by the same rules. Every components field that allows the type takes the change at once. A sub-fie…
| Parameter | Type | Description |
|---|---|---|
key * | string | The component type's key, as get_schema lists it under componentTypes. |
addFields | array | New sub-fields, after the ones it has. A type holds up to 20. |
displayName | string | |
editFields | array | Sub-fields it has, by key, and what changes in each. |
list_templates
List Mapled's project templates — curated starting points for a new project (a landing page, a blog, documentation): for each its slug, name, description, the repository of its starter site (`repoUrl`, or null), the collections it creates, and how many component types and sample records come with it. A template only ever starts a new project — create_project_from_template, which asks the person who connected this client to confirm it in Mapled; nothing applies one to the project this connection works in.
create_project_from_template
Ask for a new Mapled project from a template (list_templates gives the slugs) for the person who connected this client: they would own it, and it takes one of their plan's project slots — so call it only when the person asked for a new project. Nothing is created until that person confirms it on a trusted Mapled screen by typing the project's name — only they see the request. Returns the request with a reviewUrl — send it to the user — then poll get_confirmation until the status is applied, denied, expired or failed. Once applied, the project comes with the template's collections, comp…
| Parameter | Type | Description |
|---|---|---|
name * | string | The project's name, as the person will see it. |
template * | string | A template's slug, as list_templates gives it. |
frontendStack | string | What the site is built with; nextjs when left out. |
region | string | Where the project's data is kept: us (when left out) or eu. Chosen once — it can't be changed later. eu needs a paid plan. |
slug | string | The project's slug: lowercase letters, digits and hyphens. Left out, it is made from the name. |
add_records
Insert up to 100 records into a collection. Each record maps field keys to values (rich_text takes Markdown; image takes an asset id; relation takes record ids; group takes objects; components takes a list of items, each { _type: "<component key>", …its sub-fields } — Mapled gives every item a _key, kept when sent back). A translated field (`localized: true` in get_schema) takes its values by language — { "en": "About us", "ru": "О нас" }; give the default language, it is what the site shows where a translation is missing — or one plain value, which is the default language's; a tra…
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
records * | array |
update_records
Edit up to 100 records of a collection by id (list_records gives the ids). Each edit is { id, data }: data names only the fields to change, a field left out keeps its value, and null empties a field; values take the shapes add_records takes. It changes the drafts, as an edit in Mapled does: the site shows the change once a human presses Publish. It writes the default language — a translated field takes one plain value here. Fields that hold sensitive values are refused: a human edits them in Mapled. The batch lands whole or not at all; the answer says which records changed (changed: false wh…
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
records * | array |
create_form
Create a form the site can post submissions to. Returns the public submit endpoint; submissions are posted as flat JSON with the project delivery key in the X-Mapled-Key header. Include an empty hidden _gotcha honeypot field in the HTML form. When the form has a consent checkbox, post its exact label as _consent — Mapled keeps it with the submission as consent evidence. Mapled shows every submitted value to the owner exactly as the form sent it: give select options and radio buttons values a person can read (value="Sales", not value="sales"). A form's values are text: a file picked in <input…
| Parameter | Type | Description |
|---|---|---|
displayName * | string | |
key | string | |
spamProtection | boolean |
list_forms
List the project's forms (key, name, spam protection).
list_records
List a collection's draft records (id, title, data), most recently edited first — up to `limit` per page (200 by default). `query` narrows the list to records whose content contains it; when the answer carries nextCursor, pass it as `cursor` for the next page. `total` counts every match. A components field reads as its list of items, each with its _type and _key. `locale` reads the translated fields in one language (a code such as ru — a field with no value in that language is left out) or, with *, in every language at once as { "<code>": value }; without it the default language, as always…
| Parameter | Type | Description |
|---|---|---|
collectionKey * | string | |
cursor | string | nextCursor from the previous page. |
limit | integer | Records per page, 1–200 (default 200). |
locale | string | A language code such as ru or pt-BR, or * for every language at once. |
query | string | Text to search for in the records' content. |
get_connection
Get what the site needs to read published Mapled content: the delivery key (it starts with mk_live_ and reads published content only — not an agent token, mcp_live_, nor a server key, msk_live_; when the person has to place it on the host, their way is Integrations → the "Your site" card → the "Delivery key" row → "Copy"), the API URL, the package for the site's framework (`sdk`), the env var the key goes in (`envVar`), how the site renders (`rendering`: server or browser) and `wireUp` — the steps for that framework; follow them. Pass `framework` as you see it in the repository: "nex…
| Parameter | Type | Description |
|---|---|---|
framework | string |
set_site_url
Tell Mapled where the site is deployed — for a site without a publish webhook, that is one rendered in the browser (framework "react-spa" or "plain-html"): Preview opens the site there, verification checks that it answers and reads the page map's pages there. Pass the public URL of the deployed site; local and private addresses are rejected. Mapled keeps its origin as the project's production domain, which the owner sees in Project settings. A site with a webhook doesn't need this: its address comes from configure_revalidation. When the project already has an address on another site, nothing…
| Parameter | Type | Description |
|---|---|---|
url * | string | |
framework | string |
configure_revalidation
Point Mapled's publish webhook at the site so published changes appear instantly. Optional: a site is connected once it reads content, so offer this after — it needs an owner to confirm one secret for the host. Only for a site with a server that caches what it reads (Next.js and the like); a site rendered in the browser (react-spa, plain-html) shows a publish on the next load and needs none — Mapled refuses the call there and saves nothing; call set_site_url for it instead. Pass the site's public revalidate URL (with @mapled/next: mount createRevalidateHandler from "@mapled/next/server" at…
| Parameter | Type | Description |
|---|---|---|
url * | string |
send_test_ping
Send the site a signed test ping through Mapled's publish webhook, as "Send test ping" in Mapled → Integrations → Your site does, and see at once whether the site took it — the check after configure_revalidation, after MAPLED_WEBHOOK_SECRET is put on the host and after a redeploy. The ping carries no content and goes only where the webhook points; it shows under Recent deliveries in Mapled. The answer: delivered (true once the site answered 2xx), responseStatus (the site's HTTP status, null when nothing came back), reason (blocked, timeout or unreachable when nothing came back) and next,…
get_mapled_md
Get MAPLED.md — the guide Mapled writes for the next agent and for people: the project and how the site reads it (and whether open tabs follow a publish, as the manifest's capabilities say), the content model, where the site renders each field, the last setup run, the working rules and the verification commands, rendered from the project as it is now. Write `markdown` to MAPLED.md at the repository root and commit it. If the file exists, replace everything above its `<!-- mapled:notes -->` line and keep what is below — that part belongs to the repository. Its first line is a stamp with the…
check_integration
See the site's integration as Mapled sees it: whether the site has read content with the delivery key and when, the publish webhook's URL and its last delivery, the bindings summary of the last manifest, `site` (the framework Mapled takes the site for, whether it renders on a server or in the browser, and the address Preview opens), the connection you hold, the package versions Mapled considers current and `integration` — the integration hash: `hash` is the schema and the bindings as Mapled holds them now, `synced` what the last manifest push recorded; inSync false means the site was wired a…
detach_site
Take Mapled out of the site's code before the project is deleted, the site keeping what it shows now — when the person wants to stop using Mapled or delete the project. The answer is the plan, never the content itself: `command` — the CLI that does the mechanics in the site's repository (`npx -y @mapled/cli detach`: it writes the last published release and every file it names into the repository, puts a local module in place of the SDK (on a plain HTML site, a local copy of the runtime) and removes Mapled's packages, routes, env variables and files; `--dry-run` first lists every change)  
report_detach
Tell Mapled the site no longer needs it, once detach_site's command has run, the site builds and its pages match the live ones: `build` ("passed" or "failed"), `pagesCompared` (how many pages you compared), `mentionsLeft` (what `npx -y @mapled/cli detach --check` still lists — 0 when nothing is left), and in `removed` and `replaced` what you did with each feature detach_site named, a short line each in English ("Contact form → mailto link"). The person sees it in the project's delete dialog. Then ask them to deploy the site: Mapled checks the deployed site before the project is deleted. `n…
| Parameter | Type | Description |
|---|---|---|
build * | string | |
mentionsLeft * | integer | |
pagesCompared * | integer | |
removed | array | Features taken out, a short line each. |
replaced | array | Features replaced, a short line each: what → with what. |
list_workflows
List the project's workflows (Mapled → Workflows): for each its id, name, whether it is enabled, version, trigger (the event with what it names: a collection and, for record.updated, the fields watched; a form; a schedule's every, at, weekday and timezone), the types of its actions in order (`actionTypes`, a branch's steps and a scheduled action's as `schedule_action:<type>`) and `problem` — what no longer checks against the schema, with its `path`, or null. No logic here: get_workflow reads one. Webhook addresses and signing secrets are never shown to agents. The answer is the project's c…
get_workflow
Read one of the project's workflows with its logic: the list's columns plus `condition` and `actions` in the shape test_workflow takes a draft in (each step with its `id`). A webhook's address comes as its scheme only (https://…), for every connection. A workflow about a form's submissions, or one that reaches a collection of the site's signed-in users, comes without its logic and with `closed` saying why — agents don't read either; so does one that writes a sensitive field (the formula may be the value) and one whose stored definition is no longer understood. Not found: a workflow of anot…
| Parameter | Type | Description |
|---|---|---|
workflowId * | string | A workflow's id — list_workflows gives it (the id in its address in Mapled: …/workflows/<id>). |
test_workflow
Test one of the project's workflows (Mapled → Workflows) on a record, as a dry run: the steps a real event would take — which branch, what each step would write (`wouldWrite`), send (`wouldSend`: an email's subject and text, a webhook's body) or schedule — and nothing happens: no record changes, no email or webhook goes out, no run is journaled. `workflowId` is a workflow's id as list_workflows gives it (the id in its address in Mapled, …/workflows/<id>). `recordId` is a record of the collection the workflow's trigger names (list_records gives ids); a workflow that runs on publish or o…
| Parameter | Type | Description |
|---|---|---|
workflowId * | string | A workflow's id — list_workflows gives it (the id in its address in Mapled: …/workflows/<id>). |
definition | object | Unsaved logic to try instead of the saved: any of trigger, condition, actions. |
recordId | string | A record of the trigger's collection — not for publish and schedule triggers. |
create_workflow
Create a workflow (Mapled → Workflows) in the shape get_workflow reads one: `name`, `trigger` (the event with what it names — record.created / record.updated (with `fields` watched, optional) / record.deleted and a `collection`; publish.completed; schedule.reached with `every` hour | day | week, `at` HH:MM, `weekday`, `timezone`), `condition` (a formula over the record's fields, optional) and `actions` — up to 20 steps: update_record (`set`: field key → formula, `record` 'trigger' or { via: <relation field> }), create_record (`collection`, `set`), change_status (`field`, `to`), increme…
| Parameter | Type | Description |
|---|---|---|
actions * | array | The steps, in order. |
name * | string | |
trigger * | object | The event: { event: 'record.created', collection: 'posts' }, { event: 'publish.completed' }, … |
condition | A formula; the workflow runs only when it holds. |
update_workflow
Change one of the project's workflows: any of `name`, `trigger`, `condition`, `actions` in the shape create_workflow takes them, over the saved ones. Send `actions` whole — the list as get_workflow reads it with your changes; a step keeps its `id`, and a deliver_webhook step sent back with its id and the address as get_workflow shows it (https://…) keeps the address that is saved — send a new public address to change it. A change of the logic (trigger, condition or actions) of a workflow that is on saves it off: the answer says so (`disabled: true`, and `next` — the person turns it on…
| Parameter | Type | Description |
|---|---|---|
workflowId * | string | A workflow's id — list_workflows gives it (the id in its address in Mapled: …/workflows/<id>). |
actions | array | |
condition | ||
name | string | |
trigger | object |