Skip to main content
Two tools for finding out what your flows do: a test run fires a flow on demand, and the execution log records every run, triggered or tested.

Test A Flow

Endpoint: POST /api/v1/automations/:id/test Runs the flow once, synchronously, and returns the finished execution. It uses the draft if there is one, otherwise the published version, so you can test changes before publishing them. A test skips the trigger entirely: keywords, payloads, senderExternalIds, the delay and the loop brake are not applied. It goes straight to the steps (conditions still run). Use it to check what the steps do, and a real comment or DM to check what triggers them.
Give it the context the steps need:
  • DM and click flows: conversationId of a real conversation in the team (plus text or payload if your conditions look at them),
  • comment flows: fetchedCommentId of a real comment (from the Comments API),
  • flows with SENDER_ID conditions: pass the sender’s ID in input yourself, a test doesn’t take it from the conversation.
Tests are real. Steps really send messages to the real person in that conversation, and the run counts toward your monthly quota. Test on a conversation with your own second account.
Before anything runs, a test returns:
  • 400 if the flow has neither a draft nor a published version, or its definition doesn’t pass validation (for example missing permissions),
  • 404 if the flow, conversation or comment isn’t found in the flow’s team,
  • 403 if the account’s monthly run budget is used up,
  • 429 if the platform is rate-limiting the account right now (try again shortly).
Once the steps run, the result comes back as 200 with the execution, even when it didn’t go well: check its status and error. In the execution, input.type is MANUAL_TEST.

Executions

Every run is logged as an execution. This is where you answer “why didn’t my automation reply?”. Logs are kept for 30 days after the run. Endpoints:
  • GET /api/v1/automations/:id/executions?teamId=team_123 - runs of one flow, newest first
  • GET /api/v1/automation-executions/:id - one run, with every step
Filters for the list: status, platform, socialAccountId, conversationId, fetchedCommentId, flowVersionId, triggerId. Paginate with limit (max 500) and either offset or cursor (pass back nextCursor), same as conversations.
The execution also carries the related flow, flowVersion, conversation, conversationMessage, fetchedComment and socialAccount objects, so you rarely need a second request.

Execution Status

Each step has its own status: PENDING, RUNNING, COMPLETED, FAILED or SKIPPED.

Error Codes Worth Knowing

Failed steps carry a readable message. Some come from the platform (for example, Meta rejecting a message), others from our own checks before sending (for example, a Facebook private reply to a comment older than 7 days, messaging not enabled for the account, or the monthly message limit).