You’re probably in the middle of creating a form integration via Zapier. While setting up a template, Zapier will ask you to define the IDs of custom fields. It’s a way to make sure that the communication between both apps runs as smoothly as possible.


Unfortunately, these IDs can’t simply be found in Teamleader: you’ll have to fetch them using an endpoint the program ‘Insomnia’. You don’t need any developing skills whatsoever, you only need to download the program for free here and authenticate yourself in Insomnia.


Authenticate yourself


You will need to choose 'OAuth2' as authorization type after creating a new request in Insomnia.


The Authorization URL and Access token URL can be copy pasted to the corresponding fields in Insomnia:

https://app.teamleader.eu/oauth2/authorize

https://app.teamleader.eu/oauth2/access_token



To obtain the Client ID, the Client secret and the Redirect URL, you will need to go to our Marketplace, and create a new test integration. In your integration, you only need to fill out the following data:

  • Name of the integration, e.g. 'Test'
  • Valid redirect URLs, e.g. https://www.mywebsite.eu/redirect
  • OAuth scopes: check all boxes except for 'Administrator only'
  • Add a long and a short description, both can be 'Test' (at least one language not being English should be filled out)
  • All other fields can be ignored, you can save the integration

Now copy the Client ID, Client secret and Redirect URL in Insomnia OAuth2. You should be able to fetch the tokens.


Fetch your custom field IDs


After authenticating yourself (and thus connecting your Teamleader account to Insomina), you fill in the endpoint https://api.teamleader.eu/customFieldDefinitions.list and press ‘SEND’. This will provide you with a list of all your custom fields and their IDs. Now you only have to copy the IDs you need and paste them in Zapier.






Note: you can only use certain custom field types in Zapier:

  • Single line text 

  • Number

  • Yes/No fields

  • Single selection

  • Multiple selection (enter these values in the following way: ["value1", "value2"])

  • Money

  • Integer


Note: if you have more than 20 custom fields, you can put the following content in your POST request in order to see the IDs of all custom fields.


{

  "page": {

    "size": 100,

    "number": 1

  },

  "sort": [

    {

      "field": "label",

      "order": "asc"

    }

  ]

}




Note: The technical reason behind all of this is that our integration with Zapier is built on the API v2. You can find more information about these principles (& other places you can use them) in our the developer space of our Knowledge Base.