Running actions
Running an action means calling/act — Membrane’s unified entry point for operating on an external app through a connection. One endpoint, one shape, multiple surfaces:
Every response is
{ output, actionRunId }. On failure the body still carries actionRunId — feed it to GET /action-run-logs/{id} for the resolved action, mapped input, errors, and the raw HTTP exchange.
What goes into /act
Three dispatch styles, exactly one per call. Pick the one that fits the work:
api — inline HTTP request
A raw HTTP request sent through the connection’s auth and base URL. Default building block for ad-hoc work.
code — sandboxed JavaScript
A JS snippet run in a sandbox with an authenticated membrane client, connection, and integration pre-wired. Good for multi-step composites that don’t map to a single HTTP call.
Reusable action
A named action Membrane runs on your behalf. Address it bykey when the action has one (saved actions); use id when it doesn’t (catalog actions have no key). Membrane owns the vendor-specific request shape, auth scoping, and retries.
api and code always need a connection (via connectionKey or connectionId). Reusable actions route through the action’s own scope, which may bind a specific connection or integration — so the connection field becomes optional when the scope already resolves one.
Input is validated against the action’s inputSchema. Extra properties are silently ignored.
The legacy
POST /actions/{selector}/run endpoint
is deprecated. It still works for existing callers but new code should use /act.Reusable actions
When you find yourself about to make the same/act call a second time, save it as a reusable action. Future calls become { key: "<your-key>" } instead of the full inline spec, and the action is inspectable in the workspace later.
Finding
Describe what you want to do and Membrane finds matching actions. You can search by intent across your workspace and connected apps.Creating
Create actions from an intent — describe what the action should do and Membrane configures it automatically.
The action enters a
BUILDING state while Membrane configures it. Use --wait (CLI) or ?wait=true (API) to wait until ready.
Updating
Update an action’s configuration.Deleting
Archive an action to remove it.Action Types
Actions map to function types that determine what happens when they run:Run logs and replay
All action runs are recorded in Action Run Logs — input, output, duration, errors, and the raw HTTP exchange. Each log carries anaction snapshot — the complete /act body that was used. POST it back to /act to replay the same dispatch:
input or connectionKey in the snapshot to vary the call: