How do I get the information from Kommo's custom fields?

I already have the hubspot to kommo integration, Now I want to send the data from kommo to hubspot, save the hubspot id in a custom field. When I get the contact, it brings it to me, but when I want to send it to a hubspot, it is where the information does not appear. How can I get this information?

Hi @Plusvela,

Since it is an array, it is an intended feature of Make to group all under the same mappings.

To get the Hubspot ID, you will need to use the map function,

{{first(map(1.custom_fields_values; “field_id”; “field_name”; “ID Hubspot”))}}

In here, the Custom Field Values will be the mapping that you get from kommo, field_id is the value that you want to extract from custom fields, which I believe will be under Values that store Hubspot ID & field_name will be the filter that we are using to extract that value.

So, It will look something like this,

Screenshot from 2023-06-28 11-17-29

I haven’t tested it, if it doesn’t work then replace the values.value with values[].value.

1 Like

Hello @Plusvela :wave:

just wanted to ask whether you tried @Runcorn’s solution and made it work.

If yes, could you please mark his response as a solution? This way we keep our community tidy and neat for others.

Thanks a lot! :blueberries:

I had a similar problem finding the custom fields explicitly declared in the Kommo documentation. And from what I could verify, there is no such information directly provided. But, in the Kommo documentation, in the API methods section, in the custom fields section within this, you find a way via API to list the custom fields with all their data such as ID and name. For example, to know all the custom lead fields, which was my case, I wanted to know the references to the UTM variables, I just needed to list them using a GET request in /api/v4/leads/custom_fields which returned the list with all UTMs variables. Remembering that to be able to make this request via API, it is necessary to have access within Kommo defined correctly via OAUTH before making any request. Here is the documentation location where it talks about this:

List with all UTM variables: