This guide walks through the entire process of building an automated workflow for your users to use — from picking apps, adding authentication, filling inputs and publishing.
READ
or a WRITE
.“When there is a new lead in SuperExampleCRM …”*
READ
action.id
of the SuperExampleCRM app is 4b3920d6-1d5a-4071-b837-9383dc511b80
. Given that id and the constraint that the first action of an app must have the action_type
READ
, we can fetch a list of available actions for the selected app by making a request to the /actions
endpoint.
GET /authentications?app=4b3920d6-1d5a-4071-b837-9383dc511b80
and allow the user to select which one of the returned Authentications they wish to use. (See Selecting an Authentication for what to do when there are no Authentications, Authentication isn’t required, or if a new Authentication should be created)
For this guide, we’ll say that the user chose the authentication with id
"49509"
core:wJ3PxHpNArZ8MqvloW3L1ZyMDQ4nJ
. With the /actions/{action_id}/inputs
endpoint, we can get a list of the input fields that our first action requires
Lead type
.
This gives the user the opportunity to configure the action so that it only
returns a certain type of lead.
In this example, the format
of this input field is SELECT
, which means we
now need to fetch the possible values which are available:
inputs
field object, as the user has not yet
provided any input. If there are multiple input fields, this object should be
populated as the user progresses through them.
In this case, there are two available choices for the lead_type
field:
company
and person
. With this information, we can render a dropdown field
and allow the user to select one of them.
For this guide, we’ll say that the user selected person
from the dropdown.
”… a new engagement report is sent to PlatformAdManager”*
action_type
of the second action should be WRITE
. In this case, let’s say that the id of the PlatformAdManager App is 9c29df46-f9b9-48e2-a879-8f5479d8401d
. We can fetch a list of available actions for PlatformAdManager by making a request to the /actions
endpoint.
GET /authentications?app=9c29df46-f9b9-48e2-a879-8f5479d8401d
Again, our user can select which of the available authentications they would like to use with this Zap. For this guide, we’ll say that the user chose the authentication with id
"857610"
full_name
to step 2’s Input Field engaged_party
by using double curly braces {{step1_field_id}}
, or in this case {{full_name}}
.
inputs
action
of each step is the id
of the Action that the user selected.authentication
of each step is the id
of the Authentication that the user selected.inputs
of each step is an object where each key is the id
of an Input Field
engaged_party
(where we mapped an Output Field from step 1 to an Input Field of step 2), the value is the id
of the Output Field from step 1 wrapped in double curly braces {{...}}