Trigger Sample Results#

To help give users a clean experience when creating Zaps, we ask that you paste a sample JSON dictionary of a single item from your API into Zapier.

We will use this sample JSON for two things:

  1. To detect a list of hard-coded key names which the user can pick from during Zap (and Zap template) setup
  2. To use as a hard-coded fallback for sample data so that we can provide fields to insert during Zap setup (if your API returns 0 results)

Sample results will NOT be used for a user's Zap testing step. That step requires data to be received by an event or returned from a polling URL. If a user chooses to "Skip Test", then the sample result, if provided, will be used.

Here is the sample JSON for something like a new email message, and how it shows up in our user-facing Editor:

  "to_name": "Mike Knoop",
  "to_address": "",
  "from_name": "Bryan Helmig",
  "from_address": "",
  "subject": "Testing out this new Zap!",
  "message": {
    "no_html": "Let me know it it works.",
    "html": "<div>Let me know if it works.</div>"

Note: Even though your API endpoint has to return an array, the sample JSON here must be of a single object.

We will parse this sample and provide dropdowns like this to the user:


By default, we can handle flat dictionaries and dictionaries within dictionaries (via our __ delimiter in keys).

When the user is inserting fields in the Zap editor, and your API returns no results ([]) then we will use your hard-coded fallback JSON if it exists.

Your hard-coded JSON provided above will not be run through the Scripting API (either for key enumeration or sample data fallback) so if you use the Scripting API to add or modify fields on top of your normal API response, you'll want to make sure you perform the same manipulations manually before pasting in the JSON above.

Note - our system often does a sample "poll" or pulls cached values for a live example - samples are just a part of that system. If you need to omit bad fields from usage - you'll need to ensure the poll or webhook or whatever does not included the bad fields either!

↑ Was this documentation useful? Yes No