curl -v \
-d '{"instructions": "grab the latest email from bryan helmig"}' \
-H "Content-Type: application/json" \
-X POST 'https://actions.zapier.com/api/v1/dynamic/exposed/01GTA3G1WD49GN1XXXXXXXXX/execute/'
One more example, this time requesting a preview of the action:
{
  "action_used": "Gmail: Send Email",
  "result": null,
  "status": "error",
  "error": "Error from app: Required field 'subject' (subject) is missing. Required field 'Body' (body) is missing."
}

Basic Execution Example

To run an action, you need to execute a command like the one below, filling in the instructions and any optional hint parameters.

Execution Return Data

When you execute an action, the API response is rich with data that informs you of the outcome. Here are the critical elements of the return data and how to interpret them:

The Status Key

The status key in the API response indicates the execution result, which can be one of four values:

  • “success”: The action executed successfully and found results. This indicates that your command was understood and executed as intended.

  • “error”: The action failed to execute. An error key will provide more details about what went wrong. For example:

  • “empty”: The action was executed successfully but found no results. This status confirms that the action’s completion without results is correct and expected under the given conditions.

  • “preview”: The action was executed in preview mode, meaning no real actions were taken. A review_url key will provide a URL where you can execute the action for real. For instance:

The Result Key

All actions return a result data set, ideally trimmed to be easily digestible. By default, the full_results are not included to keep the response concise and focused on the essentials. The trimming process involves AI and heuristics to:

  • Highlight data that is in plain text and human-readable.
  • Exclude machine-specific information like IDs and headers.
  • Favor data types that are popularly used within Zapier.
  • Summarize the final result to approximately 500 words, making it ideal for quick human review or insertion back into the context of a large language model without exceeding token limits.

Example of Trimmed Results

Consider an action executed to find an email via Gmail. The result might resemble.