Action Fields (Custom)#

A natural extension of normal hard coded action fields are dynamic action fields, or custom fields. Custom fields are very commonly used in services that allow users to create their own data fields. Examples include contacts in CRMs, form management apps, or ticket fields in helpdesk software. These apps will assign a generated unique key to the field, while storing information about the field, such as its human readable label and data type, separately. Working with this data requires an extra step to retrieve that field metadata in order to allow users to make sense of the information.

All you need to do to enable custom fields is:

  • Provide a Custom Action Fields URL for your action.
  • Ensure the URL route returns data in the below format, or manipulate it to fit with scripting.
  • You can choose from several internal types, documented here: Field Types.
[
  {
    "type": "unicode",
    "key": "json_key", // the field "name", will be used to construct a label if none is provided
    "required": false, // whether this field must be filled out. defaults to true
    "label": "Pretty Label", // optional
    "help_text": "Helps to explain things to users.", // optional
    "choices": { // optional
        "raw": "label"
    } // can also be a flat array if raw is the label
    "prefill": "contact.id.name", // optional, defines a dynamic dropdown
    "searchfill": "contact.id" // optional, defines a search connector
  }
  ...
]

If your action returns custom fields you'll also want to configure a source for labels so other actions in multi-step Zaps can display those fields properly and allow users to correctly use the data in the Zap editor.

  • Provide a Custom Action Result Fields URL for the action. (This will likely be the same endpoint you used for Custom Action Fields)
  • Ensure that the URL route returns data in the below format, or manipulate it to fit with scripting. Extra data will be ignored, but we require at least the following to properly format your action results.
[
    {
        "type": "unicode",
        "key": "json_key", // the field "name", will be used to construct a label if none is provided
        "label": "Pretty Label",
        "important": true // optional    
    },
    ...
]

Right now parent_key and type=dict is not supported in custom fields.

↑ Was this documentation useful? Yes No
Get Help