Skip to main content

Hi,

We are developing an integration for Zapier. It's a CRM. We are implementing the 'add contact' action.
A contact in our CRM has, by default, four fields: contact_id, contact_first_name, contact_last_name and contact_email.
None are required, so we're adding all four in the form editor.
Our clients can customize contacts with new fields specific to their companies.
We cannot know them at this time. Will our customers be able to add new fields when using this integration in a Zap?
For example, our client has added the 'country' field to their contact. Will our client be able to add the country field when creating a zap even though it is not defined in our integration?
Thank you

Hi @Carlos Asensio ,

Great question! From your description, I might suggest checking out the following resource:

It’s possible to fetch your clients custom fields and render fields for them within the Zap editor. 

Hope this helps!


Thanks a lot for your answer.

We have developed in our api a way to get dynamic fields as you told us. We have created an action in your integration with just one dynamic field.

This is the code of the dynamic field:

 

const options = {
  url: 'https://xxx.xxxxx.xxx/i2mapi/v1_0/getFieldNamesFromElement/0',
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Authorization': bundle.authData.api_key,
  },
  params: {

  }
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;

 

    return results.fields;
  });

Note: our service returns a json object with a result code field and a json array field with the dynamic fields. The field with the array of fields is called ‘fields’.

First question: In the Platform UI → Action → Input Designer in the Zap Editor Preview does not appear any field. I understand it should be shown the fields fetched from our application

 

 

 

Second Question: In the Platform UI → Action → Api Configuration: in the second step → Test Setup, only shows one line with a field named ‘key’ and anything else.

 

This is the raw view of the Test Setup

{
  "inputData": {
    "undefined": ""
  },
  "authData": {},
  "environment": {},
  "subscribeData": {},
  "cleanedRequest": {
    "url": "https://example.com/hook-request-origin",
    "method": "POST",
    "body": {},
    "headers": {
      "Content-Type": "application/json"
    }
  }
}

 When I press ‘Test Your request’ is when zapier goes to retrieve the the dynamic input fields and, after that, executes the real service with no data. I undestand zapier should retrieve the dinamyc fields before. Then I will fill these fields with data and then, when I press ‘Test your request’ to execute the request with the data I have just filled out.

I have not found any documentation , tutorial about implementing dynamic fields in an integration.

Thanks for your help

Carlos