How Does it Work?#

This is a series of high-level visual diagrams of how triggers and actions work in Zapier (for the Platform v2), and where do the Available Methods fit in.

Note: This page refers to the Web Builder version of the developer platform. See the CLI tutorial for an overview of the Command Line Interface. For more on the difference between these interfaces, check out our CLI vs Web Builder comparison.

Triggers#

To reduce visual noise, assume TK is your TRIGGER_KEY (what you define as your trigger’s key).

Polling#

The methods mentioned here can be seen in more detail in the Available Methods for Polling doc.

  1. Zapier builds an HTTP Request
  2. If TK_poll exists, it's called (and will override steps 3 through 6)
  3. TK_pre_poll is called
  4. Zapier makes the HTTP Request
  5. Your API receives a request and sends back a response
  6. TK_post_poll is called
  7. Zapier parses the received data, ignores previously-found IDs, and triggers on new ones

Diagram of how Polling Triggers work

NOTE: If you have the Custom Trigger Fields URL defined, there are a couple of additional calls to TK_pre_custom_trigger_fields and TK_post_custom_trigger_fields after 2 and before 3.

REST Hooks#

The methods mentioned here can be seen in more detail in the Available Methods for REST Hooks doc.

NOTE: This diagram excludes the subscription process as that will just happen once the Zap’s turned on.

  1. Your API makes an HTTP request to Zapier
  2. TK_catch_hook is called
  3. Zapier parses the received data and triggers on it

Diagram of how REST Hook Triggers work

Notification REST Hooks#

The methods mentioned here can be seen in more detail in the Available Methods for Notification REST Hooks doc.

NOTE: This diagram excludes the subscription process as that will just happen once the Zap’s turned on.

  1. Your API makes an HTTP request to Zapier (with the URL for the "GET Resource" call)
  2. Zapier builds an HTTP request for the "GET Resource" call
  3. TK_pre_hook is called
  4. Zapier makes the HTTP Request for the "GET Resource" call
  5. Your API receives a request and sends back a response
  6. TK_post_hook is called
  7. Zapier parses the received data and triggers on it

Diagram of how Notification REST Hook Triggers work

Actions#

To reduce visual noise, assume AK is your ACTION_KEY (what you define as your action’s key) and SK is your SEARCH_KEY (what you define as your search’s key).

Writes#

The methods mentioned here can be seen in more detail in the Available Methods for Actions doc.

  1. Zapier builds an HTTP Request
  2. If AK_write exists, it's called (and will override steps 3 through 6)
  3. AK_pre_write is called
  4. Zapier makes the HTTP Request
  5. Your API receives a request and sends back a response
  6. AK_post_write is called
  7. Zapier parses the received data, and makes it available for subsequent steps in the Zap

Diagram of how Actions work

NOTE: If you have the Custom Action Fields URL defined, there are a couple of additional calls to AK_pre_custom_action_fields and AK_post_custom_action_fields after 2 and before 3.

NOTE 2: If this write runs as part of a search_or_write, there are a couple of additional calls to SK_read_resource OR SK_pre_read_resource and SK_post_read_resource after 6 and before 7, to make sure the output there is the same as the search.

Searches#

The methods mentioned here can be seen in more detail in the Available Methods for Searches doc.

  1. Zapier builds an HTTP Request
  2. If SK_search exists, it's called (and will override steps 3 through 6)
  3. SK_pre_search is called
  4. Zapier makes the HTTP Request
  5. Your API receives a request and sends back a response
  6. SK_post_search is called
  7. If SK_read_resource exists, it’s called (and will override steps 8 through 12)
  8. Zapier builds an HTTP Request for the “GET Resource” call
  9. SK_pre_read_resource is called
  10. Zapier makes the HTTP Request for the "GET Resource" call
  11. Your API receives a request and sends back a response
  12. SK_post_read_resource is called
  13. Zapier parses the received data, and makes it available for subsequent steps in the Zap

Diagram of how Searches work

NOTE: If you have the Custom Search Fields URL defined, there are a couple of additional calls to SK_pre_custom_search_fields and SK_post_custom_search_fields after 2 and before 3

↑ Was this documentation useful? Yes No
Get Help