Label id GUID Pipedrive

Dear Community,

Working for a new client and need to work more with automated labels.
I have two questions regarding labels in leads.

Unfortunately i can’t get the proper labels in the lead modules from Pipedrive in my Make scenario. DataError 400: provided dataset is not valid (“label_ids[0]” must be a valid GUID)

How can i find the proper label id’s for this field?
image

Next question is, how can i add extra labels without overwriting the present one?
In the deal module i have added these, but unfortunately it overwrites the already attached labels.

Thank you al for your time!

Best, TT

To get the Label GUID, you’ll need to have already “searched” using a module from the same app that does searching for existing Leads, OR you’ll need a trigger module that passes in the Lead.

Do you already have such a module in your scenario? If not, see which one suits your requirements here https://www.make.com/en/integrations/pipedrive

Looks like you’ll need to get existing labels from the same lead, and append the new label to the list of labels.

Do you already have a module that contains the existing Lead data? If not, see which one suits your requirements here https://www.make.com/en/integrations/pipedrive

If you need further assistance,

1. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

2. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

3 Likes

Dear @samliew ,

Lets first handle situation one:

I used the “search leads” module, and already looked to this data and no “Label GUID” id’s are shown here… See below output data:

The lead is found in the output data.

In the active lead in PD are all possible labels attached…

If i upload my blueprint many time emailadress is shown so for this reason i dont share this to the community :wink:

@samliew

I managed to get the label id’s via the direct api link in the browser.
https://(YourCompany).pipedrive.com/api/v1/leadlabels/?api_token=(YourAPItoken)

Only when i add these “label GUID’s” via the Make “update lead” module it overwrites al the already attached labels to this lead…

How do i append “label id’s” via the body of a API call, as i can’t search the data of the already attached labels?
I tried to find this label get methode in the api docs, but nothing i can find, only post and patch.
https://developers.pipedrive.com/docs/api/v1/Leads#searchLeads

PipeDrive has many get and search modules, could you see if any of them can return Lead details with labels?

Maybe this?

Screenshot_2024-01-20_150156

2 Likes

Managed it! Below via API get call:

And yes indeed via “Get a Lead” module same results as above👌🏻

What function is the best to append extra id’s to the array?

1 Like

Since Labels field has a “Map” toggle, as long as you have an array of tag IDs, you can Iterate + Aggregate.

In the array aggregator, set the “Destination Module Field” as the field you want to insert the IDs into.

e.g.:

Screenshot_2024-01-20_150110

Field you want to map the array values to.

3 Likes

Dear @samliew

Apologies for my delayed response.
Thank you for your assistance; I’ve nearly got it working with the iterator and aggregator. However, I’ve encountered something unusual.

The aggregator is consolidating all the values into one array. Yet, when updating the mapping field of the lead, it doesn’t append the new label GUID. Instead, it retains only the labels already associated with the lead.

As shown below, the array separated by a comma represents two labels attached to a lead within PD. Adding these again in the “update a lead” module is not an issue, even when three labels are already present.
image
image

When I adjust the settings in the iterator correctly to have all label IDs in one array, it only adds the ones that are already present again.

The values are combined and correct, but no extra label output in the updated lead??

Tried many other settings etc. but unfortunately i cant get the right output in the update a lead module…

Small late-night update:

I couldn’t manage to get the values added into one array in the “map” toggle, as advised and explained above.
However, I found a workaround by adding them as individual items.

1 Like

Heya @TT92 :wave:

Great job figuring out a workaround for this and thanks so much for sharing it here for the benefit of the community :pray: