This is automatically generated by the npm run docs
command in zapier-platform-schema
version 12.1.0
.
- /AppFlagsSchema
- /AppSchema
- /AuthenticationBasicConfigSchema
- /AuthenticationCustomConfigSchema
- /AuthenticationDigestConfigSchema
- /AuthenticationOAuth1ConfigSchema
- /AuthenticationOAuth2ConfigSchema
- /AuthenticationSchema
- /AuthenticationSessionConfigSchema
- /BasicActionOperationSchema
- /BasicCreateActionOperationSchema
- /BasicDisplaySchema
- /BasicHookOperationSchema
- /BasicOperationSchema
- /BasicPollingOperationSchema
- /BulkReadSchema
- /BulkReadsSchema
- /CreateSchema
- /CreatesSchema
- /DynamicFieldsSchema
- /FieldChoiceWithLabelSchema
- /FieldChoicesSchema
- /FieldOrFunctionSchema
- /FieldSchema
- /FieldsSchema
- /FlatObjectSchema
- /FunctionRequireSchema
- /FunctionSchema
- /FunctionSourceSchema
- /HydratorsSchema
- /KeySchema
- /MiddlewaresSchema
- /RedirectRequestSchema
- /RefResourceSchema
- /RequestSchema
- /ResourceMethodCreateSchema
- /ResourceMethodGetSchema
- /ResourceMethodHookSchema
- /ResourceMethodListSchema
- /ResourceMethodSearchSchema
- /ResourceSchema
- /ResourcesSchema
- /ResultsSchema
- /SearchOrCreateSchema
- /SearchOrCreatesSchema
- /SearchSchema
- /SearchesSchema
- /TriggerSchema
- /TriggersSchema
- /VersionSchema
Codifies high-level options for your integration.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
skipHttpPatch |
no | boolean |
By default, Zapier patches the core http module so that all requests (including those from 3rd-party SDKs) can be logged. Set this to true if you're seeing issues using an SDK (such as AWS). |
skipThrowForStatus |
no | boolean |
Starting in core version 10.0.0 , response.throwForStatus() was called by default. We introduced a per-request way to opt-out of this behavior. This flag takes that a step further and controls that behavior integration-wide for requests made using z.request() . Unless they specify otherwise (per-request, or via middleware), Shorthand requests always call throwForStatus() . z.request() calls can also ignore this flag if they set skipThrowForStatus directly |
{ skipHttpPatch: true, skipThrowForStatus: false }
{ skipHttpPatch: false, skipThrowForStatus: true }
{}
{ foo: true }
- Invalid key.{ skipHttpPatch: 'yes' }
- Invalid value.{ skipThrowForStatus: 'no' }
- Invalid value.
Represents a full app.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
version |
yes | /VersionSchema | A version identifier for your code. |
platformVersion |
yes | /VersionSchema | A version identifier for the Zapier execution environment. |
beforeApp |
no | /MiddlewaresSchema | EXPERIMENTAL: Before the perform method is called on your app, you can modify the execution context. |
afterApp |
no | /MiddlewaresSchema | EXPERIMENTAL: After the perform method is called on your app, you can modify the response. |
authentication |
no | /AuthenticationSchema | Choose what scheme your API uses for authentication. |
requestTemplate |
no | /RequestSchema | Define a request mixin, great for setting custom headers, content-types, etc. |
beforeRequest |
no | /MiddlewaresSchema | Before an HTTP request is sent via our z.request() client, you can modify it. |
afterResponse |
no | /MiddlewaresSchema | After an HTTP response is recieved via our z.request() client, you can modify it. |
hydrators |
no | /HydratorsSchema | An optional bank of named functions that you can use in z.hydrate('someName') to lazily load data. |
resources |
no | /ResourcesSchema | All the resources for your app. Zapier will take these and generate the relevent triggers/searches/creates automatically. |
triggers |
no | /TriggersSchema | All the triggers for your app. You can add your own here, or Zapier will automatically register any from the list/hook methods on your resources. |
bulkReads |
no | /BulkReadsSchema | All of the read bulks (GETs) your app exposes to retrieve resources in batches. |
searches |
no | /SearchesSchema | All the searches for your app. You can add your own here, or Zapier will automatically register any from the search method on your resources. |
creates |
no | /CreatesSchema | All the creates for your app. You can add your own here, or Zapier will automatically register any from the create method on your resources. |
searchOrCreates |
no | /SearchOrCreatesSchema | All the search-or-create combos for your app. You can create your own here, or Zapier will automatically register any from resources that define a search, a create, and a get (or define a searchOrCreate directly). Register non-resource search-or-creates here as well. |
flags |
no | /AppFlagsSchema | Top-level app options |
{ version: '1.0.0', platformVersion: '10.1.2' }
{ version: 'v1.0.0', platformVersion: '10.1.2' }
- Invalid value for version.{ version: '1.0.0', platformVersion: 'v10.1.2' }
- Invalid value for platformVersion.
Config for Basic Authentication. No extra properties are required to setup Basic Auth, so you can leave this empty if your app uses Basic Auth.
- Type -
object
- Source Code
{}
{ foo: true }
- Invalid key.
Config for custom authentication (like API keys). No extra properties are required to setup this auth type, so you can leave this empty if your app uses a custom auth method.
- Type -
object
- Source Code
{}
{ foo: true }
- Invalid key.
Config for Digest Authentication. No extra properties are required to setup Digest Auth, so you can leave this empty if your app uses Digets Auth.
- Type -
object
- Source Code
{}
{ foo: true }
- Invalid key.
Config for OAuth1 authentication.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
getRequestToken |
yes | oneOf(/RequestSchema, /FunctionSchema) | Define where Zapier will acquire a request token which is used for the rest of the three legged authentication process. |
authorizeUrl |
yes | oneOf(/RedirectRequestSchema, /FunctionSchema) | Define where Zapier will redirect the user to authorize our app. Typically, you should append an oauth_token querystring parameter to the request. |
getAccessToken |
yes | oneOf(/RequestSchema, /FunctionSchema) | Define how Zapier fetches an access token from the API |
-
{ getRequestToken: { require: 'some/path/to/file.js' }, authorizeUrl: { require: 'some/path/to/file2.js' }, getAccessToken: { require: 'some/path/to/file3.js' } }
-
Missing required key.
{ getRequestToken: { require: 'some/path/to/file.js' }, authorizeUrl: { require: 'some/path/to/file2.js' } }
Config for OAuth2 authentication.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
authorizeUrl |
yes | oneOf(/RedirectRequestSchema, /FunctionSchema) | Define where Zapier will redirect the user to authorize our app. Note: we append the redirect URL and state parameters to return value of this function. |
getAccessToken |
yes | oneOf(/RequestSchema, /FunctionSchema) | Define how Zapier fetches an access token from the API |
refreshAccessToken |
no | oneOf(/RequestSchema, /FunctionSchema) | Define how Zapier will refresh the access token from the API |
codeParam |
no | string |
Define a non-standard code param Zapier should scrape instead. |
scope |
no | string |
What scope should Zapier request? |
autoRefresh |
no | boolean |
Should Zapier invoke refreshAccessToken when we receive an error for a 401 response? |
-
{ authorizeUrl: { require: 'some/path/to/file.js' }, getAccessToken: { require: 'some/path/to/file2.js' } }
-
{ authorizeUrl: { require: 'some/path/to/file.js' }, getAccessToken: { require: 'some/path/to/file2.js' }, refreshAccessToken: { require: 'some/path/to/file3.js' }, codeParam: 'unique_code', scope: 'read/write', autoRefresh: true }
{ authorizeUrl: { require: 'some/path/to/file.js' } }
- Missing required key getAccessToken.
Represents authentication schemes.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
type |
yes | string in ('basic' , 'custom' , 'digest' , 'oauth1' , 'oauth2' , 'session' ) |
Choose which scheme you want to use. |
test |
yes | oneOf(/RequestSchema, /FunctionSchema) | A function or request that confirms the authentication is working. |
fields |
no | /FieldsSchema | Fields you can request from the user before they connect your app to Zapier. |
connectionLabel |
no | anyOf(/RequestSchema, /FunctionSchema, string ) |
A string with variables, function, or request that returns the connection label for the authenticated user. |
basicConfig |
no | /AuthenticationBasicConfigSchema | No description given. |
customConfig |
no | /AuthenticationCustomConfigSchema | No description given. |
digestConfig |
no | /AuthenticationDigestConfigSchema | No description given. |
oauth1Config |
no | /AuthenticationOAuth1ConfigSchema | No description given. |
oauth2Config |
no | /AuthenticationOAuth2ConfigSchema | No description given. |
sessionConfig |
no | /AuthenticationSessionConfigSchema | No description given. |
{ type: 'basic', test: '$func$2$f$' }
{ type: 'custom', test: '$func$2$f$', fields: [ { key: 'abc' } ] }
{ type: 'custom', test: '$func$2$f$', connectionLabel: '{{bundle.inputData.abc}}' }
{ type: 'custom', test: '$func$2$f$', connectionLabel: '$func$2$f$' }
{ type: 'custom', test: '$func$2$f$', connectionLabel: { url: 'abc' } }
{}
- Missing required keys: type and test'$func$2$f$'
- Must be object{ type: 'unknown', test: '$func$2$f$' }
- Invalid value for key: type{ type: 'custom', test: '$func$2$f$', fields: '$func$2$f$' }
- Invalid value for key: fields
Config for session authentication.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
perform |
yes | oneOf(/RequestSchema, /FunctionSchema) | Define how Zapier fetches the additional authData needed to make API calls. |
{ perform: { require: 'some/path/to/file.js' } }
{}
- Missing required key: perform
Represents the fundamental mechanics of a search/create.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
resource |
no | /KeySchema | Optionally reference and extends a resource. Allows Zapier to automatically tie together samples, lists and hooks, greatly improving the UX. EG: if you had another trigger reusing a resource but filtering the results. |
perform |
yes | oneOf(/RequestSchema, /FunctionSchema) | How will Zapier get the data? This can be a function like (z) => [{id: 123}] or a request like {url: 'http...'} . |
performResume |
no | /FunctionSchema | A function that parses data from a perform (which uses z.generateCallbackUrl()) and callback request to resume this action. |
performGet |
no | oneOf(/RequestSchema, /FunctionSchema) | How will Zapier get a single record? If you find yourself reaching for this - consider resources and their built-in get methods. |
inputFields |
no | /DynamicFieldsSchema | What should the form a user sees and configures look like? |
outputFields |
no | /DynamicFieldsSchema | What fields of data will this return? Will use resource outputFields if missing, will also use sample if available. |
sample |
yes (with exceptions, see description) | object |
What does a sample of data look like? Will use resource sample if missing. Requirement waived if display.hidden is true or if this belongs to a resource that has a top-level sample |
{ perform: { require: 'some/path/to/file.js' }, sample: { id: 42, name: 'Hooli' } }
{ perform: { require: 'some/path/to/file.js' } }
- Missing required key: sample. Note - This is only invalid ifdisplay
is not explicitly set to true and if it does not belong to a resource that has a sample.
Represents the fundamental mechanics of a create.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
resource |
no | /KeySchema | Optionally reference and extends a resource. Allows Zapier to automatically tie together samples, lists and hooks, greatly improving the UX. EG: if you had another trigger reusing a resource but filtering the results. |
perform |
yes | oneOf(/RequestSchema, /FunctionSchema) | How will Zapier get the data? This can be a function like (z) => [{id: 123}] or a request like {url: 'http...'} . |
performResume |
no | /FunctionSchema | A function that parses data from a perform (which uses z.generateCallbackUrl()) and callback request to resume this action. |
performGet |
no | oneOf(/RequestSchema, /FunctionSchema) | How will Zapier get a single record? If you find yourself reaching for this - consider resources and their built-in get methods. |
inputFields |
no | /DynamicFieldsSchema | What should the form a user sees and configures look like? |
outputFields |
no | /DynamicFieldsSchema | What fields of data will this return? Will use resource outputFields if missing, will also use sample if available. |
sample |
yes (with exceptions, see description) | object |
What does a sample of data look like? Will use resource sample if missing. Requirement waived if display.hidden is true or if this belongs to a resource that has a top-level sample |
shouldLock |
no | boolean |
Should this action be performed one at a time (avoid concurrency)? |
{ perform: { require: 'some/path/to/file.js' }, sample: { id: 42, name: 'Hooli' } }
{ perform: { require: 'some/path/to/file.js' } }
- Missing required key: sample. Note - This is only invalid ifdisplay
is not explicitly set to true and if it does not belong to a resource that has a sample.
Represents user information for a trigger, search, or create.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
label |
yes (with exceptions, see description) | string |
A short label like "New Record" or "Create Record in Project". Optional if hidden is true. |
description |
yes (with exceptions, see description) | string |
A description of what this trigger, search, or create does. Optional if hidden is true. |
directions |
no | string |
A short blurb that can explain how to get this working. EG: how and where to copy-paste a static hook URL into your application. Only evaluated for static webhooks. |
important |
no | boolean |
Affects how prominently this operation is displayed in the UI. Only mark a few of the most popular operations important. |
hidden |
no | boolean |
Should this operation be unselectable by users? |
{ hidden: true }
{ label: 'New Thing', description: 'Gets a new thing for you.' }
-
{ label: 'New Thing', description: 'Gets a new thing for you.', directions: 'This is how you use the thing.', hidden: false, important: true }
{ label: 'New Thing', hidden: false }
- Missing required key: description{ description: 'Gets a new thing for you.', hidden: false }
- Missing required key: label{ label: 'New Thing', description: 'Gets a new thing for you.', important: 1 }
- Invalid value for key: important
Represents the inbound mechanics of hooks with optional subscribe/unsubscribe. Defers to list for fields.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
type |
yes (with exceptions, see description) | string in ('hook' ) |
Must be explicitly set to "hook" unless this hook is defined as part of a resource, in which case it's optional. |
resource |
no | /KeySchema | Optionally reference and extends a resource. Allows Zapier to automatically tie together samples, lists and hooks, greatly improving the UX. EG: if you had another trigger reusing a resource but filtering the results. |
perform |
yes | /FunctionSchema | A function that processes the inbound webhook request. |
performList |
yes (with exceptions, see description) | oneOf(/RequestSchema, /FunctionSchema) | Can get "live" data on demand instead of waiting for a hook. If you find yourself reaching for this - consider resources and their built-in hook/list methods. Note: this is required for public apps to ensure the best UX for the end-user. For private apps, you can ignore warnings about this property with the --without-style flag during zapier push . |
canPaginate |
no | boolean |
Does this endpoint support pagination via temporary cursor storage? |
performSubscribe |
yes (with exceptions, see description) | oneOf(/RequestSchema, /FunctionSchema) | Takes a URL and any necessary data from the user and subscribes. Note: this is required for public apps to ensure the best UX for the end-user. For private apps, you can ignore warnings about this property with the --without-style flag during zapier push . |
performUnsubscribe |
yes (with exceptions, see description) | oneOf(/RequestSchema, /FunctionSchema) | Takes a URL and data from a previous subscribe call and unsubscribes. Note: this is required for public apps to ensure the best UX for the end-user. For private apps, you can ignore warnings about this property with the --without-style flag during zapier push . |
inputFields |
no | /DynamicFieldsSchema | What should the form a user sees and configures look like? |
outputFields |
no | /DynamicFieldsSchema | What fields of data will this return? Will use resource outputFields if missing, will also use sample if available. |
sample |
yes (with exceptions, see description) | object |
What does a sample of data look like? Will use resource sample if missing. Requirement waived if display.hidden is true or if this belongs to a resource that has a top-level sample |
-
{ type: 'hook', perform: { require: 'some/path/to/file.js' }, performList: { require: 'some/path/to/file2.js' }, performSubscribe: { require: 'some/path/to/file3.js' }, performUnsubscribe: { require: 'some/path/to/file4.js' }, sample: { id: 42, name: 'Hooli' } }
-
Missing required key: sample. Note - This is only invalid if
{ type: 'hook', perform: { require: 'some/path/to/file.js' }, performList: { require: 'some/path/to/file2.js' }, performSubscribe: { require: 'some/path/to/file3.js' }, performUnsubscribe: { require: 'some/path/to/file4.js' } }
display
is not explicitly set to true and if it does not belong to a resource that has a sample.
Represents the fundamental mechanics of triggers, searches, or creates.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
resource |
no | /KeySchema | Optionally reference and extends a resource. Allows Zapier to automatically tie together samples, lists and hooks, greatly improving the UX. EG: if you had another trigger reusing a resource but filtering the results. |
perform |
yes | oneOf(/RequestSchema, /FunctionSchema) | How will Zapier get the data? This can be a function like (z) => [{id: 123}] or a request like {url: 'http...'} . |
inputFields |
no | /DynamicFieldsSchema | What should the form a user sees and configures look like? |
outputFields |
no | /DynamicFieldsSchema | What fields of data will this return? Will use resource outputFields if missing, will also use sample if available. |
sample |
yes (with exceptions, see description) | object |
What does a sample of data look like? Will use resource sample if missing. Requirement waived if display.hidden is true or if this belongs to a resource that has a top-level sample |
{ perform: { require: 'some/path/to/file.js' }, sample: { id: 42, name: 'Hooli' } }
{ perform: { require: 'some/path/to/file.js' } }
- Missing required key: sample. Note - This is only invalid ifdisplay
is not explicitly set to true and if it does not belong to a resource that has a sample.
Represents the fundamental mechanics of a trigger.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
type |
no | string in ('polling' ) |
Clarify how this operation works (polling == pull or hook == push). |
resource |
no | /KeySchema | Optionally reference and extends a resource. Allows Zapier to automatically tie together samples, lists and hooks, greatly improving the UX. EG: if you had another trigger reusing a resource but filtering the results. |
perform |
yes | oneOf(/RequestSchema, /FunctionSchema) | How will Zapier get the data? This can be a function like (z) => [{id: 123}] or a request like {url: 'http...'} . |
canPaginate |
no | boolean |
Does this endpoint support pagination via temporary cursor storage? |
inputFields |
no | /DynamicFieldsSchema | What should the form a user sees and configures look like? |
outputFields |
no | /DynamicFieldsSchema | What fields of data will this return? Will use resource outputFields if missing, will also use sample if available. |
sample |
yes (with exceptions, see description) | object |
What does a sample of data look like? Will use resource sample if missing. Requirement waived if display.hidden is true or if this belongs to a resource that has a top-level sample |
{ perform: { require: 'some/path/to/file.js' }, sample: { id: 42, name: 'Hooli' } }
{ perform: { require: 'some/path/to/file.js' } }
- Missing required key: sample. Note - This is only invalid ifdisplay
is not explicitly set to true and if it does not belong to a resource that has a sample.
How will Zapier fetch resources from your application?
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
key |
yes | /KeySchema | A key to uniquely identify a record. |
noun |
yes | string |
A noun for this read that completes the sentence "reads all of the XXX". |
display |
yes | /BasicDisplaySchema | Configures the UI for this read bulk. |
operation |
yes | /BasicActionOperationSchema | Powers the functionality for this read bulk. |
-
{ key: 'recipes', noun: 'Recipes', display: { label: 'Recipes', description: 'A Read that lets Zapier fetch all recipes.' }, operation: { perform: '$func$0$f$', sample: { id: 1, firstName: 'Walter', lastName: 'Sobchak', occupation: 'Bowler' } } }
-
Missing required keys: key and noun
{ display: { label: 'Get User', description: 'Retrieve a user.' }, operation: { description: 'Define how this search method will work.' } }
Enumerates the bulk reads your app exposes.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
^[a-zA-Z]+[a-zA-Z0-9_]*$ |
no | /BulkReadSchema | Any unique key can be used and its values will be validated against the BulkReadSchema. |
-
{ recipes: { key: 'recipes', noun: 'Recipes', display: { label: 'Recipes', description: 'A Read that lets Zapier fetch all recipes.' }, operation: { perform: '$func$0$f$', sample: { id: 1, firstName: 'Walter', lastName: 'Sobchak', occupation: 'Bowler' } } } }
-
Key must match the key of the associated BulkReadSchema
{ readRecipes: { key: 'recipes', noun: 'Recipes', display: { label: 'Recipes', description: 'A Read that lets Zapier fetch all recipes.' }, operation: { perform: '$func$0$f$', sample: { id: 1, firstName: 'Walter', lastName: 'Sobchak', occupation: 'Bowler' } } } }
How will Zapier create a new object?
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
key |
yes | /KeySchema | A key to uniquely identify this create. |
noun |
yes | string |
A noun for this create that completes the sentence "creates a new XXX". |
display |
yes | /BasicDisplaySchema | Configures the UI for this create. |
operation |
yes | /BasicCreateActionOperationSchema | Powers the functionality for this create. |
-
{ key: 'recipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } }
-
{ key: 'recipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$', sample: { id: 1 }, shouldLock: true } }
-
{ key: 'recipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.', hidden: true }, operation: { perform: '$func$2$f$' } }
'abc'
- Must be an object-
Invalid value for key on operation: shouldLock
{ key: 'recipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$', shouldLock: 'yes' } }
-
Missing required key on operation: sample. Note - this is valid if the resource has defined a sample.
{ key: 'recipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$' } }
Enumerates the creates your app has available for users.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
^[a-zA-Z]+[a-zA-Z0-9_]*$ |
no | /CreateSchema | Any unique key can be used and its values will be validated against the CreateSchema. |
-
{ createRecipe: { key: 'createRecipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } } }
-
{ Create_Recipe_01: { key: 'Create_Recipe_01', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } } }
-
Key must start with a letter
{ '01_Create_Recipe': { key: '01_Create_Recipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } } }
-
Key must match the key field in CreateSchema
{ Create_Recipe: { key: 'createRecipe', noun: 'Recipe', display: { label: 'Create Recipe', description: 'Creates a new recipe.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } } }
Like /FieldsSchema but you can provide functions to create dynamic or custom fields.
[]
[ { key: 'abc' } ]
[ { key: 'abc' }, '$func$2$f$' ]
[ '$func$2$f$', '$func$2$f$' ]
[ {} ]
- FieldSchema missing required key: key[ { key: 'abc', choices: {} } ]
- Invalid value for key in FieldSchema: choices (cannot be empty)'$func$2$f$'
- Must be an array
An object describing a labeled choice in a static dropdown. Useful if the value a user picks isn't exactly what the zap uses. For instance, when they click on a nickname, but the zap uses the user's full name (image).
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
value |
yes | string |
The actual value that is sent into the Zap. Should match sample exactly. |
sample |
yes | string |
Displayed as light grey text in the editor. It's important that the value match the sample. Otherwise, the actual value won't match what the user picked, which is confusing. |
label |
yes | string |
A human readable label for this value. |
{ label: 'Red', sample: '#f00', value: '#f00' }
{ label: 'Red', value: '#f00' }
- Missing required key: sample
A static dropdown of options. Which you use depends on your order and label requirements:
Need a Label? | Does Order Matter? | Type to Use |
---|---|---|
Yes | No | Object of value -> label |
No | Yes | Array of Strings |
Yes | Yes | Array of FieldChoiceWithLabel |
- Type - oneOf(
object
,array
[oneOf(string
, /FieldChoiceWithLabelSchema)]) - Source Code
{ a: '1', b: '2', c: '3' }
[ 'first', 'second', 'third' ]
[ 1, 2, 3 ]
- If an array, must be of either type string or FieldChoiceWithLabelSchema[ { a: '1', b: '2', c: '3' } ]
- If an array, must be of either type string or FieldChoiceWithLabelSchema
Represents an array of fields or functions.
- Type -
array
[oneOf(/FieldSchema, /FunctionSchema)] - Source Code
[]
[ { key: 'abc' } ]
[ { key: 'abc' }, '$func$2$f$' ]
[ '$func$2$f$', '$func$2$f$' ]
[ {} ]
- Array item not a valid FieldSchema or FunctionSchema[ { key: 'abc', choices: {} } ]
- Array item not a valid FieldSchema'$func$2$f$'
- Must be an array
Defines a field an app either needs as input, or gives as output. In addition to the requirements below, the following keys are mutually exclusive:
children
&list
children
&dict
children
&type
children
&placeholder
children
&helpText
children
&default
dict
&list
dynamic
&dict
dynamic
&choices
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
key |
yes | string |
A unique machine readable key for this value (IE: "fname"). |
label |
no | string |
A human readable label for this value (IE: "First Name"). |
helpText |
no | string |
A human readable description of this value (IE: "The first part of a full name."). You can use Markdown. |
type |
no | string in ('string' , 'text' , 'integer' , 'number' , 'boolean' , 'datetime' , 'file' , 'password' , 'copy' , 'code' ) |
The type of this value. Use string for basic text input, text for a large, <textarea> style box, and code for a <textarea> with a fixed-width font. |
required |
no | boolean |
If this value is required or not. |
placeholder |
no | string |
An example value that is not saved. |
default |
no | string |
A default value that is saved the first time a Zap is created. |
dynamic |
no | /RefResourceSchema | A reference to a trigger that will power a dynamic dropdown. |
search |
no | /RefResourceSchema | A reference to a search that will guide the user to add a search step to populate this field when creating a Zap. |
choices |
no | /FieldChoicesSchema | An object of machine keys and human values to populate a static dropdown. |
list |
no | boolean |
Acts differently when used in inputFields vs. when used in outputFields. In inputFields: Can a user provide multiples of this field? In outputFields: Does this field return an array of items of type type ? |
children |
no | array [/FieldSchema] |
An array of child fields that define the structure of a sub-object for this field. Usually used for line items. |
dict |
no | boolean |
Is this field a key/value input? |
computed |
no | boolean |
Is this field automatically populated (and hidden from the user)? |
altersDynamicFields |
no | boolean |
Does the value of this field affect the definitions of other fields in the set? |
inputFormat |
no | string |
Useful when you expect the input to be part of a longer string. Put "{{input}}" in place of the user's input (IE: "https://{{input}}.yourdomain.com"). |
{ key: 'abc' }
{ key: 'abc', choices: { mobile: 'Mobile Phone' } }
{ key: 'abc', choices: [ 'first', 'second', 'third' ] }
{ key: 'abc', choices: [ { label: 'Red', sample: '#f00', value: '#f00' } ] }
{ key: 'abc', children: [ { key: 'abc' } ] }
{ key: 'abc', type: 'integer', helpText: 'neat' }
{}
- Missing required key: key{ key: 'abc', type: 'loltype' }
- Invalid value for key: type{ key: 'abc', choices: {} }
- Invalid value for key: choices (cannot be empty){ key: 'abc', choices: [] }
- Invalid value for key: choices (cannot be empty){ key: 'abc', choices: [ 3 ] }
- Invalid value for key: choices (if an array, must be of either string or FieldChoiceWithLabelSchema){ key: 'abc', choices: [ { label: 'Red', value: '#f00' } ] }
- Invalid value for key: choices (if an array of FieldChoiceWithLabelSchema, must provide keysample
){ key: 'abc', choices: 'mobile' }
- Invalid value for key: choices (must be either object or array){ key: 'abc', children: [ '$func$2$f$' ] }
- Invalid value for key: children (must be array of FieldSchema)
An array or collection of fields.
- Type -
array
[/FieldSchema] - Source Code
[ { key: 'abc' } ]
{}
- Must be an array
An object whose values can only be primitives
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
[^\s]+ |
no | anyOf(null , string , integer , number , boolean ) |
Any key may exist in this flat object as long as its values are simple. |
{ a: 1, b: 2, c: 3 }
{ a: 1.2, b: 2.2, c: 3.3 }
{ a: 'a', b: 'b', c: 'c' }
{ a: true, b: true, c: false }
{ a: 'a', b: 2, c: 3.1, d: true, e: false }
{ '123': 'hello' }
{ a: {}, b: 2 }
- Invalid value for key: a (objects are not allowed){ a: [], b: 2 }
- Invalid value for key: a (arrays are not allowed){ '': 1 }
- Key cannot be empty
A path to a file that might have content like module.exports = (z, bundle) => [{id: 123}];
.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
require |
yes | string |
No description given. |
{ require: 'some/path/to/file.js' }
{}
- Missing required key: require{ required: 2 }
- Invalid value for key: required (must be of type string)
Internal pointer to a function from the original source or the source code itself. Encodes arity and if arguments
is used in the body. Note - just write normal functions and the system will encode the pointers for you. Or, provide {source: "return 1 + 2"} and the system will wrap in a function for you.
- Type - oneOf(
string
, /FunctionRequireSchema, /FunctionSourceSchema) - Source Code
'$func$0$f$'
'$func$2$t$'
{ source: 'return 1 + 2' }
{ require: 'some/path/to/file.js' }
'funcy'
- Invalid function reference{ source: '1 + 2' }
- Invalid value for key: source (must end with areturn
statement){ source: '1 + 2', require: 'some/path/to/file.js' }
- Must be either /FunctionRequireSchema or /FunctionSourceSchema
Source code like {source: "return 1 + 2"}
which the system will wrap in a function for you.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
source |
yes | string |
JavaScript code for the function body. This must end with a return statement. |
args |
no | array [string ] |
Function signature. Defaults to ['z', 'bundle'] if not specified. |
{ source: 'return 1 + 2' }
{ args: [ 'x', 'y' ], source: 'return x + y;' }
{ source: '1 + 2' }
- Invalid value for key: source (must end with areturn
statement)
A bank of named functions that you can use in z.hydrate('someName')
to lazily load data.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
^[a-zA-Z]+[a-zA-Z0-9]*$ |
no | /FunctionSchema | Any unique key can be used in z.hydrate('uniqueKeyHere') . |
{ hydrateFile: { require: 'some/path/to/file.js' } }
{ '12th': { require: 'some/path/to/file.js' } }
- Invalid key (must start with a letter)
A unique identifier for this item.
- Type -
string
- Pattern -
^[a-zA-Z]+[a-zA-Z0-9_]*$
- Source Code
'vk'
'validKey'
'ValidKey'
'Valid_Key_2'
''
- Cannot be empty'A'
- Minimum of two characters'1_Key'
- Must start with a letter'a-Key'
- Must not use dashes
List of before or after middlewares. Can be an array of functions or a single function
- Type - oneOf(
array
[/FunctionSchema], /FunctionSchema) - Source Code
{ require: 'some/path/to/file.js' }
[ { require: 'some/path/to/file.js' } ]
{}
- Does not match either /FunctionSchema or an array of such
A representation of a HTTP redirect - you can use the {{syntax}}
to inject authentication, field or global variables.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
method |
no | string in ('GET' ) |
The HTTP method for the request. |
url |
no | string |
A URL for the request (we will parse the querystring and merge with params). Keys and values will not be re-encoded. |
params |
no | /FlatObjectSchema | A mapping of the querystring - will get merged with any query params in the URL. Keys and values will be encoded. |
{ method: 'GET', url: 'https://google.com' }
{ method: 'POST', url: 'https://google.com' }
- Invalid value for key: method
Reference a resource by key and the data it returns. In the format of: {resource_key}.{foreign_key}(.{human_label_key})
.
- Type -
string
- Pattern -
^[a-zA-Z0-9_]+\.[a-zA-Z0-9_\s\[\]]+(\.[a-zA-Z0-9_\s\[\]]+(,[a-zA-Z0-9_\s\[\]]+)*)?$
- Source Code
'contact.id'
'contact.id.name'
'contact.id.firstName,lastName'
'contact.id.first_name,last_name,email'
'contact.Contact Id.Full Name'
'contact.data[]id.data[]First Name,data[]Last Name'
'Contact List'
- Does not match resource_key pattern'Contact.list,find.id'
- Does not match foreign_key pattern'Contact.list.id.full_name'
- Does not match human_label_key pattern
A representation of a HTTP request - you can use the {{syntax}}
to inject authentication, field or global variables.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
method |
no | string in ('GET' , 'PUT' , 'POST' , 'PATCH' , 'DELETE' , 'HEAD' ) |
The HTTP method for the request. |
url |
no | string |
A URL for the request (we will parse the querystring and merge with params). Keys and values will not be re-encoded. |
body |
no | oneOf(null , string , object , array ) |
Can be nothing, a raw string or JSON (object or array). |
params |
no | /FlatObjectSchema | A mapping of the querystring - will get merged with any query params in the URL. Keys and values will be encoded. |
headers |
no | /FlatObjectSchema | The HTTP headers for the request. |
auth |
no | oneOf(array [string ], /FlatObjectSchema) |
An object holding the auth parameters for OAuth1 request signing, like {oauth_token: 'abcd', oauth_token_secret: '1234'} . Or an array reserved (i.e. not implemented yet) to hold the username and password for Basic Auth. Like ['AzureDiamond', 'hunter2'] . |
removeMissingValuesFrom |
no | object |
Should missing values be sent? (empty strings, null , and undefined only — [] , {} , and false will still be sent). Allowed fields are params and body . The default is false , ex: removeMissingValuesFrom: { params: false, body: false } |
serializeValueForCurlies |
no | /FunctionSchema | A function to customize how to serialize a value for curlies {{var}} in the request object. By default, when this is unspecified, the request client only replaces curlies where variables are strings, and would throw an error for non-strings. The function should accepts a single argument as the value to be serialized and return the string representation of the argument. |
skipThrowForStatus |
no | boolean |
If true , don't throw an exception for response 400 <= status < 600 automatically before resolving with the response. Defaults to false . |
skipEncodingChars |
no | string |
Contains the characters that you want left unencoded in the query params (req.params ). If unspecified, z.request() will percent-encode non-ascii characters and these reserved characters: :$/?#[]@$&+,;=^@`\ . |
{ method: 'GET', url: 'https://zapier.com' }
{ method: 'SUPERCHARGE', url: 'https://zapier.com' }
- Invalid value for key: method
How will we find create a specific object given inputs? Will be turned into a create automatically.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
display |
yes | /BasicDisplaySchema | Define how this create method will be exposed in the UI. |
operation |
yes | /BasicActionOperationSchema | Define how this create method will work. |
-
{ display: { label: 'Create Tag', description: 'Create a new Tag in your account.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } }
-
{ display: { label: 'Create Tag', description: 'Create a new Tag in your account.', hidden: true }, operation: { perform: '$func$2$f$' } }
-
Missing key from operation: sample. Note – this is valid if the resource has defined a sample.
{ display: { label: 'Create Tag', description: 'Create a new Tag in your account.' }, operation: { perform: '$func$2$f$' } }
How will we get a single object given a unique identifier/id?
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
display |
yes | /BasicDisplaySchema | Define how this get method will be exposed in the UI. |
operation |
yes | /BasicOperationSchema | Define how this get method will work. |
-
{ display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: '$func$0$f$' }, sample: { id: 385, name: 'proactive enable ROI' } } }
-
{ display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.', hidden: true }, operation: { perform: { url: '$func$0$f$' } } }
-
Missing key from operation: sample. Note – this is valid if the resource has defined a sample.
{ display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: '$func$0$f$' } } }
How will we get notified of new objects? Will be turned into a trigger automatically.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
display |
yes | /BasicDisplaySchema | Define how this hook/trigger method will be exposed in the UI. |
operation |
yes | /BasicHookOperationSchema | Define how this hook/trigger method will work. |
-
{ display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { type: 'hook', perform: '$func$0$f$', sample: { id: 385, name: 'proactive enable ROI' } } }
-
{ display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.', hidden: true }, operation: { type: 'hook', perform: '$func$0$f$' } }
-
Missing key from operation: sample. Note – this is valid if the resource has defined a sample.
{ display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { type: 'hook', perform: '$func$0$f$' } }
How will we get a list of new objects? Will be turned into a trigger automatically.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
display |
yes | /BasicDisplaySchema | Define how this list/trigger method will be exposed in the UI. |
operation |
yes | /BasicPollingOperationSchema | Define how this list/trigger method will work. |
-
{ display: { label: 'New User', description: 'Trigger when a new User is created in your account.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/users' }, sample: { id: 49, name: 'Veronica Kuhn', email: '[email protected]' } } }
-
{ display: { label: 'New User', description: 'Trigger when a new User is created in your account.', hidden: true }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/users' } } }
-
Missing key from operation: sample. Note – this is valid if the resource has defined a sample.
{ display: { label: 'New User', description: 'Trigger when a new User is created in your account.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/users' } } }
How will we find a specific object given filters or search terms? Will be turned into a search automatically.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
display |
yes | /BasicDisplaySchema | Define how this search method will be exposed in the UI. |
operation |
yes | /BasicActionOperationSchema | Define how this search method will work. |
-
{ display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } }
-
{ display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.', hidden: true }, operation: { perform: '$func$2$f$' } }
-
Missing key from operation: sample. Note – this is valid if the resource has defined a sample.
{ key: 'recipe', noun: 'Recipe', display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.' }, operation: { perform: '$func$2$f$' } }
Represents a resource, which will in turn power triggers, searches, or creates.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
key |
yes | /KeySchema | A key to uniquely identify this resource. |
noun |
yes | string |
A noun for this resource that completes the sentence "create a new XXX". |
get |
no | /ResourceMethodGetSchema | How will we get a single object given a unique identifier/id? |
hook |
no | /ResourceMethodHookSchema | How will we get notified of new objects? Will be turned into a trigger automatically. |
list |
no | /ResourceMethodListSchema | How will we get a list of new objects? Will be turned into a trigger automatically. |
search |
no | /ResourceMethodSearchSchema | How will we find a specific object given filters or search terms? Will be turned into a search automatically. |
create |
no | /ResourceMethodCreateSchema | How will we find create a specific object given inputs? Will be turned into a create automatically. |
outputFields |
no | /DynamicFieldsSchema | What fields of data will this return? |
sample |
no | object |
What does a sample of data look like? |
-
{ key: 'tag', noun: 'Tag', get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' }, sample: { id: 385, name: 'proactive enable ROI' } } } }
-
{ key: 'tag', noun: 'Tag', sample: { id: 385, name: 'proactive enable ROI' }, get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' } } } }
-
{ key: 'tag', noun: 'Tag', get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.', hidden: true }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' } } }, list: { display: { label: 'New Tag', description: 'Trigger when a new Tag is created in your account.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags' }, sample: { id: 385, name: 'proactive enable ROI' } } } }
-
Missing key from operation: sample. Note – this is valid if the resource has defined a sample.
{ key: 'tag', noun: 'Tag', get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' } } } }
All the resources that underlie common CRUD methods powering automatically handled triggers, creates, and searches for your app. Zapier will break these apart for you.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
^[a-zA-Z]+[a-zA-Z0-9_]*$ |
no | /ResourceSchema | Any unique key can be used and its values will be validated against the ResourceSchema. |
-
{ tag: { key: 'tag', noun: 'Tag', get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' }, sample: { id: 385, name: 'proactive enable ROI' } } } } }
-
Key does not match key for associated /ResourceSchema
{ getTag: { key: 'tag', noun: 'Tag', get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' }, sample: { id: 385, name: 'proactive enable ROI' } } } } }
-
Missing key from operation: sample. Note – this is valid if the resource has defined a sample.
{ tag: { key: 'tag', noun: 'Tag', get: { display: { label: 'Get Tag by ID', description: 'Grab a specific Tag by ID.' }, operation: { perform: { url: 'https://fake-crm.getsandbox.com/tags/{{inputData.id}}' } } } } }
An array of objects suitable for returning in perform calls.
- Type -
array
[object
] - Source Code
[ { name: 'Alex Trebek' } ]
1
- Invalid type (must be array)[ 1 ]
- Invalid type (must be array of objects)
Pair an existing search and a create to enable "Find or Create" functionality in your app
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
key |
yes | /KeySchema | A key to uniquely identify this search-or-create. Must match the search key. |
display |
yes | /BasicDisplaySchema | Configures the UI for this search-or-create. |
search |
yes | /KeySchema | The key of the search that powers this search-or-create |
create |
yes | /KeySchema | The key of the create that powers this search-or-create |
-
{ key: 'searchOrCreateWidgets', display: { label: 'Search or Create Widgets', description: 'Searches for a widget matching the provided query, or creates one if it does not exist.', important: true, hidden: false }, search: 'searchWidgets', create: 'createWidget' }
-
Invalid value for key: key (must start with a letter)
{ key: '01_Search_or_Create_Widgets', display: { label: 'Search or Create Widgets', description: 'Searches for a widget matching the provided query, or creates one if it does not exist.', important: true, hidden: false }, search: 'searchWidgets', create: 'createWidget' }
-
Invalid values for keys: search and create (must be a string that matches the key of a registered search or create)
{ key: 'searchOrCreateWidgets', display: { label: 'Search or Create Widgets', description: 'Searches for a widget matching the provided query, or creates one if it does not exist.', important: true, hidden: false }, search: { require: 'path/to/some/file.js' }, create: { require: 'path/to/some/file.js' } }
Enumerates the search-or-creates your app has available for users.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
^[a-zA-Z]+[a-zA-Z0-9_]*$ |
no | /SearchOrCreateSchema | Any unique key can be used and its values will be validated against the SearchOrCreateSchema. |
-
{ searchOrCreateWidgets: { key: 'searchOrCreateWidgets', display: { label: 'Search or Create Widgets', description: 'Searches for a widget matching the provided query, or creates one if it does not exist.', important: true, hidden: false }, search: 'searchWidgets', create: 'createWidget' } }
-
Key must match the key of the associated /SearchOrCreateSchema
{ searchOrCreateWidgets: { key: 'socWidgets', display: { label: 'Search or Create Widgets', description: 'Searches for a widget matching the provided query, or creates one if it does not exist.', important: true, hidden: false }, search: 'searchWidgets', create: 'createWidget' } }
How will Zapier search for existing objects?
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
key |
yes | /KeySchema | A key to uniquely identify this search. |
noun |
yes | string |
A noun for this search that completes the sentence "finds a specific XXX". |
display |
yes | /BasicDisplaySchema | Configures the UI for this search. |
operation |
yes | /BasicActionOperationSchema | Powers the functionality for this search. |
-
{ key: 'recipe', noun: 'Recipe', display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.' }, operation: { perform: '$func$2$f$', sample: { id: 1 } } }
-
{ key: 'recipe', noun: 'Recipe', display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.', hidden: true }, operation: { perform: '$func$2$f$' } }
'abc'
- Must be an object-
Missing required key in operation: sample. Note - this is valid if the associated resource has defined a sample.
{ key: 'recipe', noun: 'Recipe', display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.' }, operation: { perform: '$func$2$f$' } }
Enumerates the searches your app has available for users.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
^[a-zA-Z]+[a-zA-Z0-9_]*$ |
no | /SearchSchema | Any unique key can be used and its values will be validated against the SearchSchema. |
-
{ recipe: { key: 'recipe', noun: 'Recipe', display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.', hidden: true }, operation: { perform: '$func$2$f$' } } }
-
Key must match the key of the associated /SearchSchema
{ searchRecipe: { key: 'recipe', noun: 'Recipe', display: { label: 'Find a Recipe', description: 'Search for recipe by cuisine style.', hidden: true }, operation: { perform: '$func$2$f$' } } }
How will Zapier get notified of new objects?
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
key |
yes | /KeySchema | A key to uniquely identify this trigger. |
noun |
yes | string |
A noun for this trigger that completes the sentence "triggers on a new XXX". |
display |
yes | /BasicDisplaySchema | Configures the UI for this trigger. |
operation |
yes | anyOf(/BasicPollingOperationSchema, /BasicHookOperationSchema) | Powers the functionality for this trigger. |
-
{ key: 'new_recipe', noun: 'Recipe', display: { label: 'New Recipe', description: 'Triggers when a new recipe is added.' }, operation: { type: 'polling', perform: '$func$0$f$', sample: { id: 1 } } }
-
{ key: 'new_recipe', noun: 'Recipe', display: { label: 'New Recipe', description: 'Triggers when a new recipe is added.', hidden: true }, operation: { type: 'polling', perform: '$func$0$f$' } }
-
Missing required key from operation: sample. Note - this is valid if the Recipe resource has defined a sample.
{ key: 'new_recipe', noun: 'Recipe', display: { label: 'New Recipe', description: 'Triggers when a new recipe is added.' }, operation: { perform: '$func$0$f$' } }
Enumerates the triggers your app has available for users.
- Type -
object
- Source Code
Key | Required | Type | Description |
---|---|---|---|
^[a-zA-Z]+[a-zA-Z0-9_]*$ |
no | /TriggerSchema | Any unique key can be used and its values will be validated against the TriggerSchema. |
-
{ newRecipe: { key: 'newRecipe', noun: 'Recipe', display: { label: 'New Recipe', description: 'Triggers when a new recipe is added.' }, operation: { type: 'polling', perform: '$func$0$f$', sample: { id: 1 } } } }
-
Key must match the key on the associated /TriggerSchema
{ newRecipe: { key: 'new_recipe', noun: 'Recipe', display: { label: 'New Recipe', description: 'Triggers when a new recipe is added.' }, operation: { type: 'polling', perform: '$func$0$f$', sample: { id: 1 } } } }
Represents a simplified semver string, from 0.0.0
to 999.999.999
.
- Type -
string
- Pattern -
^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$
- Source Code
'1.0.0'
'2.11.3'
'999.999.999'
'1.0.0.0'
- Must have only 2 periods'1000.0.0'
- Each number can be a maximum of 3 digits'v1.0.0'
- No letters allowed'1.0.0-beta'
- undefined