ap_add_branch
ChatGPTAdd a conditional branch to a router step. Inserted before the fallback branch.
ap_add_step
ChatGPTAdd a new step to a flow. Optionally configure it in the same call by providing input/auth/sourceCode. Prefer PIECE actions and inline formula expressions over CODE.
ap_build_flow
ChatGPTCreate a NEW flow from scratch in one call: trigger + steps. Steps are added sequentially by default (trigger → step_1 → step_2 → ...). To nest steps inside a loop, set parentStepName to the loop step name and stepLocationRelativeToParent to INSIDE_LOOP. ROUTER steps are NOT supported here (branches and conditions cannot be configured in one call) — build the rest of the flow first, then add the router with ap_add_step and configure branches with ap_add_branch / ap_update_branch. For EDITING an existing flow, do NOT rebuild it — use the granular ap_add_step / ap_update_step / ap_update_trigger instead. Prefer PIECE actions and inline formula expressions (in a free-text/value input — never a dropdown/option field — wrapped ap-formula-v1::{…}::ap-formula-v1) over CODE steps — only emit a CODE step when no piece fits AND the logic exceeds the inline formula functions (see the build_flow guide expression ladder).
ap_change_flow_status
ChatGPTEnable or disable a published flow.
ap_create_flow
ChatGPTCreate a new flow in Activepieces
ap_create_folder
ChatGPTCreate a folder to hold one solution's flows and tables, or get it if a folder with that name already exists. Call it once before building a solution of several flows and tables, then pass the same folderName to ap_create_flow, ap_build_flow and ap_create_table.
ap_create_table
ChatGPTCreate a new table with an initial set of fields. Types: TEXT, NUMBER, DATE, DATETIME, STATIC_DROPDOWN. DATE and DATETIME both hold an ISO-8601 UTC timestamp; DATETIME additionally shows and edits the time of day.
ap_delete_branch
ChatGPTDelete a branch from a router step. Cannot delete the fallback branch.
ap_delete_flow
ChatGPTPermanently delete a flow and all its versions. This cannot be undone.
ap_delete_records
ChatGPTPermanently delete one or more records by their IDs.
ap_delete_step
ChatGPTDelete a step from a flow. Prefer ap_update_step to modify — delete destroys sample data.
ap_delete_table
ChatGPTPermanently delete a table and all its data.
ap_duplicate_flow
ChatGPTDuplicate an existing flow. Creates a new copy with all steps and configuration. Connections and sample data are not copied.
ap_find_records
ChatGPTQuery records from a table with optional filtering. Operators: eq, neq, gt, gte, lt, lte, co, exists, not_exists.
ap_flow_structure
ChatGPTGet the structure of a flow: step tree (parent/child), each step type, configuration status (configured/unconfigured/invalid), and valid insert locations for ap_add_step.
ap_get_piece_props
ChatGPTGet the input schema for a piece action or trigger, plus AI guidance for using it: an AI-written description of what it does, an idempotency hint, and — when available — the output field paths it produces (for triggers, also derived from sample data). Use the AI description to pick the right action; when output fields are listed, reference them directly downstream as {{step['output'].path}}. Pass auth to resolve dynamic dropdowns and dynamic property sub-fields (e.g. Custom API Call url/body fields).
ap_get_run
ChatGPTGet detailed results of a flow run including step-by-step outputs, errors, and durations.
ap_insert_records
ChatGPTInsert one or more records into a table. Max 50 records per call.
ap_list_ai_models
ChatGPTList configured AI providers and their available models. Use this to discover valid provider and model values for configuring Run Agent steps. The output shows provider names and model IDs needed for the aiProviderModel input.
ap_list_connections
ChatGPTList OAuth/app connections in the project. Returns externalId needed for the auth parameter on steps.
ap_list_flows
ChatGPTList flows in the current project with status, trigger type, and published state.
ap_list_folders
ChatGPTList the folders in the current project with how many flows and tables each holds. Use it to reuse an existing folder name instead of creating a near-duplicate.
ap_list_runs
ChatGPTList recent flow runs with optional filters. Returns run ID, status, timestamps, and failed step info.
ap_list_tables
ChatGPTList all tables in the current project with their fields (name, type, id) and row counts. Use this to discover available tables before querying or modifying data. Each table has two ids: use "id" with the record/field MCP tools (ap_insert_records, ap_find_records, ap_manage_fields, etc.), and use "externalId" as the table_id value when configuring a Tables piece step inside a flow.
ap_lock_and_publish
ChatGPTPublish and enable the current draft version of a flow. This locks the draft, sets it as the published version, and enables the flow. Returns validation errors if the flow is not ready.
ap_manage_fields
ChatGPTAdd, rename, or delete fields on a table. Max 100 fields per table.
ap_manage_notes
ChatGPTAdd, update, or delete canvas notes on a flow. Notes are visual annotations on the flow canvas.
ap_move_flow_to_folder
ChatGPTMove a flow into a folder, creating the folder when no folder has that name, or take it out of its folder with uncategorized=true. Pass exactly one of folderName or uncategorized.
ap_read_step_code
ChatGPTRead the full source code, package.json, and input of a CODE step. Returns untruncated content (unlike ap_flow_structure which truncates). ap_read_step_settings reads full settings for any step type.
ap_read_step_settings
ChatGPTRead the full untruncated settings of any step, including the trigger: piece input, action/trigger name, loop items, router branches, and error handling options. Use this to see a step's current configuration before updating it (ap_flow_structure truncates piece input). For reviewing a CODE step's source, prefer ap_read_step_code.
ap_rename_flow
ChatGPTRename a flow.
ap_research_pieces
ChatGPTResearch available pieces. Use pieceNames for bulk exact lookup (always returns actions and triggers, each with an AI guidance hint). Use searchQuery for fuzzy discovery. Pass forIntent with what you are trying to do to get recommendedActions ranked by AI guidance, so you pick the right action in one shot.
ap_resolve_property_chain
ChatGPTResolve a chain of dependent dropdown properties in one call. For actions with cascading fields (e.g. Spreadsheet → Sheet → Columns), this resolves each property sequentially, feeding each selected value into the next resolution. Pass selectedValue for properties whose value you already know; the tool stops and returns options when it hits a property without a selectedValue. Always use value from returned options, not label.
ap_resolve_property_options
ChatGPTResolve dropdown options for a single piece property. Returns the available options with labels and values (IDs). Use this to discover valid values for DROPDOWN fields (e.g. Slack channels, Google Sheets, email labels). Always use the value from the returned options, not the label.
ap_retry_run
ChatGPTRetry a failed flow run. FROM_FAILED_STEP resumes at failure point, ON_LATEST_VERSION re-runs entirely.
ap_run_action
ChatGPTExecute a single piece action once, without building or saving a flow. Use this for one-shot tasks like "check my inbox" or "send one Slack message". For recurring/triggered work, build a flow with ap_build_flow instead.
ap_search_actions
ChatGPTFind piece actions by natural-language task description (e.g. "send a message to a Slack channel"). Returns the most semantically relevant actions ranked by similarity — lightweight rows only — or an empty list when nothing in the catalog is relevant (it does not force a match). Always available: when no embedding model is configured it falls back to a keyword catalog search (response "mode":"keyword", lexical not semantic). Each row carries a connected flag indicating whether this project already has a connection for the piece. Optionally scope to a single piece with pieceName. This is the discovery step: take a result's pieceName + actionName to ap_get_piece_props for its input schema, then ap_run_action to execute it.
ap_search_triggers
ChatGPTFind piece triggers (the event that starts a flow) by natural-language description of when the flow should run (e.g. "when a new row is added to a Google Sheet", "when an email arrives"). Returns the most semantically relevant triggers ranked by similarity — lightweight rows only — or an empty list when nothing in the catalog is relevant (it does not force a match). Always available: when no embedding model is configured it falls back to a keyword catalog search (response "mode":"keyword", lexical not semantic). Each row carries a connected flag indicating whether this project already has a connection for the piece. Optionally scope to a single piece with pieceName. This is the discovery step: take a result's pieceName + triggerName to ap_get_piece_props for its input schema.
ap_set_project_context
ChatGPTSet or clear the active project context. All tools require a project context to operate. Call with a projectId to select a project, or without to clear the selection. Always returns the list of available projects.
ap_setup_guide
ChatGPTGet setup instructions for connections or AI providers. Returns steps for the user to follow in the UI.
ap_test_flow
ChatGPTTest a flow end-to-end in the test environment. Requires a configured trigger. Waits up to 120s. Pass triggerTestData to provide mock trigger output when no sample data exists.
ap_test_step
ChatGPTTest a single step within a flow. Runs all steps up to and including the specified step. The flow must have a configured trigger. Pass triggerTestData when no sample data exists.
ap_update_branch
ChatGPTUpdate the conditions and/or name of an existing router branch. Does not affect the steps inside the branch.
ap_update_record
ChatGPTUpdate specific cells in a record. Only specified fields are changed.
ap_update_step
ChatGPTUpdate an existing step's settings. Provide only the fields you want to change.
ap_update_trigger
ChatGPTSet or update the trigger for a flow.
ap_validate_flow
ChatGPTValidate without publishing or running anything. To check whether several flows and tables in a folder fit together, pass folderName instead of inspecting them by hand. Pass flowId to check one flow: step validity, template references and empty branches. Pass folderName to check a whole solution: every flow in the folder, plus the connections between them (each Call Flow targets a real Callable Flow, sends every input its sample data expects and only waits for a response the subflow returns; each Tables step and table trigger points at a real table and real fields). Use it before ap_lock_and_publish, and after building a solution of several flows and tables, fixing every issue it reports.
ap_validate_step_config
ChatGPTValidate a step configuration before applying it. Returns field-level errors without modifying any flow. Use this to check your config is correct before calling ap_update_step or ap_update_trigger.