Resolve Properties in Pipedrive "get" node

I am trying to access data by webhook from Pipedrive. The resolve properties should enable me to access my cusotmm fields and the values. Somehow it only resolves the empty custom fields and the fields which contain values appear only as API keys and labels

{
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "f018b9da-59a4-4b00-bafb-9d8cbea8146f",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        510,
        440
      ],
      "webhookId": "f018b9da-59a4-4b00-bafb-9d8cbea8146f"
    },
    {
      "parameters": {
        "resource": "person",
        "operation": "get",
        "personId": "={{$node[\"Pipedrive1\"].json[\"id\"]}}",
        "resolveProperties": true
      },
      "name": "Pipedrive",
      "type": "n8n-nodes-base.pipedrive",
      "typeVersion": 1,
      "position": [
        940,
        440
      ],
      "credentials": {
        "pipedriveApi": {
          "id": "4",
          "name": "SWEX Pipedrive"
        }
      }
    },
    {
      "parameters": {
        "resource": "person",
        "operation": "search",
        "limit": 1,
        "term": "={{$node[\"Webhook\"].json[\"body\"][\"current\"][\"email\"][0][\"value\"]}}",
        "additionalFields": {}
      },
      "name": "Pipedrive1",
      "type": "n8n-nodes-base.pipedrive",
      "typeVersion": 1,
      "position": [
        730,
        440
      ],
      "credentials": {
        "pipedriveApi": {
          "id": "4",
          "name": "SWEX Pipedrive"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Pipedrive1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pipedrive1": {
      "main": [
        [
          {
            "node": "Pipedrive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

this is the data output from the get person node:

{
"company_id": 7841682,
"related_open_deals_count": 0,
"related_closed_deals_count": 0,
"participant_open_deals_count": 0,
"participant_closed_deals_count": 0,
"files_count": 0,
"notes_count": 0,
"followers_count": 1,
"related_won_deals_count": 0,
"related_lost_deals_count": 0,
"active_flag": true,
"first_char": "t",
"next_activity_time": null,
"next_activity_id": null,
"last_activity_id": null,
"3faad09cdf8c411da46585a605766c43625be71c": "154,153",
"5f31302c74a83900f8af769f75245d0ba00102a0": ",,",
"fa29202a69b7f9418be192d4f71d0fc3cfc5c630": "0",
"org_name": "Inhalt und Form Marketing Technology",
"cc_email": "[email protected]",
"owner_name": "iundf MT Support",
"ID": 30628,
"Eigentümer": {
"id": 12002136,
"name": "iundf MT Support",
"email": "[email protected]",
"has_pic": 1,
"pic_hash": "753c49b0101ac72af5ecc7d8be52231c",
"active_flag": true,
"value": 12002136
},
"Organisation": {
"name": "Inhalt und Form Marketing Technology",
"people_count": 7,
"owner_id": 12002136,
"address": null,
"active_flag": false,
"cc_email": "[email protected]",
"value": 66823
},
"Name": "test5 contact5",
"Vorname": "test5",
"Nachname": "contact5",
"Offene Deals": 0,
"Geschlossene Deals": 0,
"Anzahl E-Mail-Nachrichten": 0,
"Gesamte Aktivitäten": 0,
"Erledigte Aktivitäten": 0,
"Zu erledigende Aktivitäten": 0,
"Gewonnene Deals": 0,
"Verlorene Deals": 0,
"Telefon": [
{
"label": "work",
"value": "123456",
"primary": true
}
],
"E-Mail": [
{
"label": "",
"value": "[email protected]",
"primary": true
}
],
"Zuletzt aktualisiert am": "2022-01-04 08:23:50",
"Kontaktperson erstellt": "2021-08-11 14:23:45",
"Sichtbar für": "gesamtes Unternehmen",
"Profilbild": null,
"Nächstes Aktivitätsdatum": null,
"Letztes Aktivitätsdatum": null,
"Letzte E-Mail erhalten": null,
"Letzte gesendete E-Mail": null,
"Label": null,
"Funktion Kontakt": null,
"Opt-out Date": null,
"Erfassungsdatum": null,
"Mutationsdatum": null,
"Anrede": "Frau",
"Publikationen": null,
"Job Titel": "",
"Firmenabteilung (Kontakt)": "",
"Land": "",
"Kanton / Bundesland / Land": "",
"Briefanrede": null,
"Kontaktstatus / Beziehung": null,
"Austrittsdatum Mitgliedschaft": null,
"Eintrittsdatum Mitgliedschaft": null,
"Hauptkontakt Mitgliedschaft": null,
"Postfach Nr. (Kontakt)": null,
"Postfach PLZ (Kontakt)": null,
"Sprache": "Deutsch",
"Letztes Aktivitätsdatum (ZOHO)": null,
"Postfach (Kontakt)": null,
"Adresszusatz": null,
"Ort (Kontakt)": "",
"PLZ (Kontakt)": 0,
"Strasse (Kontakt)": "",
"Email opt-out": null,
"Seminar Teilnahmen": null,
"Geburtsdatum": null,
"Interessen": null,
"Privat Person": null,
"Quelle": null,
"Update Feld": "API",
"Primäre Organisation": "Inhalt und Form Marketing Technology",
"Marketinglabel Kontakte (Friendly)": null,
"Aktuelle Marketing Kampagne": "",
"Gast von Unternehmen": "",
"Stellung in der Unternehmung": null
}

Anyone knows how to properly encript the data so i can afterwards create a new contact in mautic?

Thank you for your help. :slight_smile:

Information on your n8n setup

n8n Version:
0.144.0

Source Code:

License:
Apache 2.0 with Commons Clause

Hi @iundf_Marketing_Tech, the data format you have shared would be the one used by Pipedrive’s API. If instead of having values like this:

(...)
    "Organisation": {
        "name": "Inhalt und Form Marketing Technology",
        "people_count": 7,
        "owner_id": 12002136,
        "address": null,
        "active_flag": false,
        "cc_email": "[email protected]",
        "value": 66823
    },
(...)

You would like to see something like Organisation: Inhalt und Form Marketing Technology, I’d recommend using the Set node. Here’s a quick example using your sample data:

Example Workflow
{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "const example_data = {\n\"company_id\": 7841682,\n\"related_open_deals_count\": 0,\n\"related_closed_deals_count\": 0,\n\"participant_open_deals_count\": 0,\n\"participant_closed_deals_count\": 0,\n\"files_count\": 0,\n\"notes_count\": 0,\n\"followers_count\": 1,\n\"related_won_deals_count\": 0,\n\"related_lost_deals_count\": 0,\n\"active_flag\": true,\n\"first_char\": \"t\",\n\"next_activity_time\": null,\n\"next_activity_id\": null,\n\"last_activity_id\": null,\n\"3faad09cdf8c411da46585a605766c43625be71c\": \"154,153\",\n\"5f31302c74a83900f8af769f75245d0ba00102a0\": \",,\",\n\"fa29202a69b7f9418be192d4f71d0fc3cfc5c630\": \"0\",\n\"org_name\": \"Inhalt und Form Marketing Technology\",\n\"cc_email\": \"[email protected]\",\n\"owner_name\": \"iundf MT Support\",\n\"ID\": 30628,\n\"Eigentümer\": {\n\"id\": 12002136,\n\"name\": \"iundf MT Support\",\n\"email\": \"[email protected]\",\n\"has_pic\": 1,\n\"pic_hash\": \"753c49b0101ac72af5ecc7d8be52231c\",\n\"active_flag\": true,\n\"value\": 12002136\n},\n\"Organisation\": {\n\"name\": \"Inhalt und Form Marketing Technology\",\n\"people_count\": 7,\n\"owner_id\": 12002136,\n\"address\": null,\n\"active_flag\": false,\n\"cc_email\": \"[email protected]\",\n\"value\": 66823\n},\n\"Name\": \"test5 contact5\",\n\"Vorname\": \"test5\",\n\"Nachname\": \"contact5\",\n\"Offene Deals\": 0,\n\"Geschlossene Deals\": 0,\n\"Anzahl E-Mail-Nachrichten\": 0,\n\"Gesamte Aktivitäten\": 0,\n\"Erledigte Aktivitäten\": 0,\n\"Zu erledigende Aktivitäten\": 0,\n\"Gewonnene Deals\": 0,\n\"Verlorene Deals\": 0,\n\"Telefon\": [\n{\n\"label\": \"work\",\n\"value\": \"123456\",\n\"primary\": true\n}\n],\n\"E-Mail\": [\n{\n\"label\": \"\",\n\"value\": \"[email protected]\",\n\"primary\": true\n}\n],\n\"Zuletzt aktualisiert am\": \"2022-01-04 08:23:50\",\n\"Kontaktperson erstellt\": \"2021-08-11 14:23:45\",\n\"Sichtbar für\": \"gesamtes Unternehmen\",\n\"Profilbild\": null,\n\"Nächstes Aktivitätsdatum\": null,\n\"Letztes Aktivitätsdatum\": null,\n\"Letzte E-Mail erhalten\": null,\n\"Letzte gesendete E-Mail\": null,\n\"Label\": null,\n\"Funktion Kontakt\": null,\n\"Opt-out Date\": null,\n\"Erfassungsdatum\": null,\n\"Mutationsdatum\": null,\n\"Anrede\": \"Frau\",\n\"Publikationen\": null,\n\"Job Titel\": \"\",\n\"Firmenabteilung (Kontakt)\": \"\",\n\"Land\": \"\",\n\"Kanton / Bundesland / Land\": \"\",\n\"Briefanrede\": null,\n\"Kontaktstatus / Beziehung\": null,\n\"Austrittsdatum Mitgliedschaft\": null,\n\"Eintrittsdatum Mitgliedschaft\": null,\n\"Hauptkontakt Mitgliedschaft\": null,\n\"Postfach Nr. (Kontakt)\": null,\n\"Postfach PLZ (Kontakt)\": null,\n\"Sprache\": \"Deutsch\",\n\"Letztes Aktivitätsdatum (ZOHO)\": null,\n\"Postfach (Kontakt)\": null,\n\"Adresszusatz\": null,\n\"Ort (Kontakt)\": \"\",\n\"PLZ (Kontakt)\": 0,\n\"Strasse (Kontakt)\": \"\",\n\"Email opt-out\": null,\n\"Seminar Teilnahmen\": null,\n\"Geburtsdatum\": null,\n\"Interessen\": null,\n\"Privat Person\": null,\n\"Quelle\": null,\n\"Update Feld\": \"API\",\n\"Primäre Organisation\": \"Inhalt und Form Marketing Technology\",\n\"Marketinglabel Kontakte (Friendly)\": null,\n\"Aktuelle Marketing Kampagne\": \"\",\n\"Gast von Unternehmen\": \"\",\n\"Stellung in der Unternehmung\": null\n}\nreturn [{\n  json: example_data\n}];"
      },
      "name": "Set Example Data",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "Organisation",
              "value": "={{$json[\"Organisation\"][\"name\"]}}"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        680,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Set Example Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Example Data": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

You can add as many fields in the Set node as needed.

thank you @MutedJam

the problem is, that the output depends also on the field values.
With the resolved properties function enabled i get with one value a different fieldname in the output. this is only for multipicklist fields.

With two values i get the following output:

"company_id": 7841682,
"related_open_deals_count": 0,
"related_closed_deals_count": 0,
"participant_open_deals_count": 0,
"participant_closed_deals_count": 0,
"files_count": 0,
"notes_count": 0,
"followers_count": 1,
"related_won_deals_count": 0,
"related_lost_deals_count": 0,
"active_flag": true,
"first_char": "t",
"next_activity_time": null,
"next_activity_id": null,
"last_activity_id": null,
"3faad09cdf8c411da46585a605766c43625be71c": "151,152",
"5f31302c74a83900f8af769f75245d0ba00102a0": ",,",
"fa29202a69b7f9418be192d4f71d0fc3cfc5c630": "0",
"org_name": "Inhalt und Form Marketing Technology",
"cc_email": "[email protected]",
"owner_name": "iundf MT Support",
"ID": 30628,
"Eigentümer": {
"id": 12002136,
"name": "iundf MT Support",
"email": "[email protected]",
"has_pic": 1,
"pic_hash": "753c49b0101ac72af5ecc7d8be52231c",
"active_flag": true,
"value": 12002136
},
"Organisation": {
"name": "Inhalt und Form Marketing Technology",
"people_count": 7,
"owner_id": 12002136,
"address": null,
"active_flag": false,
"cc_email": "[email protected]",
"value": 66823
},
"Name": "test5 contact5",
"Vorname": "test5",
"Nachname": "contact5",
"Offene Deals": 0,
"Geschlossene Deals": 0,
"Anzahl E-Mail-Nachrichten": 0,
"Gesamte Aktivitäten": 0,
"Erledigte Aktivitäten": 0,
"Zu erledigende Aktivitäten": 0,
"Gewonnene Deals": 0,
"Verlorene Deals": 0,
"Telefon": [
{
"label": "work",
"value": "123456",
"primary": true
}
],
"E-Mail": [
{
"label": "",
"value": "[email protected]",
"primary": true
}
],
"Zuletzt aktualisiert am": "2022-01-06 11:51:08",
"Kontaktperson erstellt": "2021-08-11 14:23:45",
"Sichtbar für": "gesamtes Unternehmen",
"Profilbild": null,
"Nächstes Aktivitätsdatum": null,
"Letztes Aktivitätsdatum": null,
"Letzte E-Mail erhalten": null,
"Letzte gesendete E-Mail": null,
"Label": null,
"Funktion Kontakt": null,
"Opt-out Date": null,
"Erfassungsdatum": null,
"Mutationsdatum": null,
"Anrede": "Frau",
"Publikationen": null,
"Job Titel": "",
"Firmenabteilung (Kontakt)": "",
"Land": "",
"Kanton / Bundesland / Land": "",
"Briefanrede": null,
"Kontaktstatus / Beziehung": null,
"Austrittsdatum Mitgliedschaft": null,
"Eintrittsdatum Mitgliedschaft": null,
"Hauptkontakt Mitgliedschaft": null,
"Postfach Nr. (Kontakt)": null,
"Postfach PLZ (Kontakt)": null,
"Sprache": "Deutsch",
"Letztes Aktivitätsdatum (ZOHO)": null,
"Postfach (Kontakt)": null,
"Adresszusatz": null,
"Ort (Kontakt)": "",
"PLZ (Kontakt)": 0,
"Strasse (Kontakt)": "",
"Email opt-out": null,
"Seminar Teilnahmen": null,
"Geburtsdatum": null,
"Interessen": null,
"Privat Person": null,
"Quelle": null,
"Update Feld": "API",
"Primäre Organisation": "Inhalt und Form Marketing Technology",
"Marketinglabel Kontakte (Friendly)": null,
"Aktuelle Marketing Kampagne": "",
"Gast von Unternehmen": "",
"Stellung in der Unternehmung": null
}

with only one value the exact same field looks like this:


"company_id": 7841682,
"related_open_deals_count": 0,
"related_closed_deals_count": 0,
"participant_open_deals_count": 0,
"participant_closed_deals_count": 0,
"files_count": 0,
"notes_count": 0,
"followers_count": 1,
"related_won_deals_count": 0,
"related_lost_deals_count": 0,
"active_flag": true,
"first_char": "t",
"next_activity_time": null,
"next_activity_id": null,
"last_activity_id": null,
"5f31302c74a83900f8af769f75245d0ba00102a0": ",,",
"fa29202a69b7f9418be192d4f71d0fc3cfc5c630": "0",
"org_name": "Inhalt und Form Marketing Technology",
"cc_email": "[email protected]",
"owner_name": "iundf MT Support",
"ID": 30628,
"Eigentümer": {
"id": 12002136,
"name": "iundf MT Support",
"email": "[email protected]",
"has_pic": 1,
"pic_hash": "753c49b0101ac72af5ecc7d8be52231c",
"active_flag": true,
"value": 12002136
},
"Organisation": {
"name": "Inhalt und Form Marketing Technology",
"people_count": 7,
"owner_id": 12002136,
"address": null,
"active_flag": false,
"cc_email": "[email protected]",
"value": 66823
},
"Name": "test5 contact5",
"Vorname": "test5",
"Nachname": "contact5",
"Offene Deals": 0,
"Geschlossene Deals": 0,
"Anzahl E-Mail-Nachrichten": 0,
"Gesamte Aktivitäten": 0,
"Erledigte Aktivitäten": 0,
"Zu erledigende Aktivitäten": 0,
"Gewonnene Deals": 0,
"Verlorene Deals": 0,
"Telefon": [
{
"label": "work",
"value": "123456",
"primary": true
}
],
"E-Mail": [...], // 1 items
"Zuletzt aktualisiert am": "2022-01-06 11:44:02",
"Kontaktperson erstellt": "2021-08-11 14:23:45",
"Sichtbar für": "gesamtes Unternehmen",
"Profilbild": null,
"Nächstes Aktivitätsdatum": null,
"Letztes Aktivitätsdatum": null,
"Letzte E-Mail erhalten": null,
"Letzte gesendete E-Mail": null,
"Label": null,
"Funktion Kontakt": null,
"Opt-out Date": null,
"Erfassungsdatum": null,
"Mutationsdatum": null,
"Anrede": "Frau",
"Publikationen": null,
"Job Titel": "",
"Firmenabteilung (Kontakt)": "",
"Kontaktpräferenz": "Post",
"Land": "",
"Kanton / Bundesland / Land": "",
"Briefanrede": null,
"Kontaktstatus / Beziehung": null,
"Austrittsdatum Mitgliedschaft": null,
"Eintrittsdatum Mitgliedschaft": null,
"Hauptkontakt Mitgliedschaft": null,
"Postfach Nr. (Kontakt)": null,
"Postfach PLZ (Kontakt)": null,
"Sprache": "Deutsch",
"Letztes Aktivitätsdatum (ZOHO)": null,
"Postfach (Kontakt)": null,
"Adresszusatz": null,
"Ort (Kontakt)": "",
"PLZ (Kontakt)": 0,
"Strasse (Kontakt)": "",
"Email opt-out": null,
"Seminar Teilnahmen": null,
"Geburtsdatum": null,
"Interessen": null,
"Privat Person": null,
"Quelle": null,
"Update Feld": "API",
"Primäre Organisation": "Inhalt und Form Marketing Technology",
"Marketinglabel Kontakte (Friendly)": null,
"Aktuelle Marketing Kampagne": "",
"Gast von Unternehmen": "",
"Stellung in der Unternehmung": null
}

Is this an issue with the resolve properties function, or any suggestions what is happening here??

Thank you

So your problem is that for some items fields like Kontaktpräferenz or 3faad09cdf8c411da46585a605766c43625be71c are available, but not for others?

This shouldn’t break anything though. If a field doesn’t exist, the Set node would just ignore it. Or in other words, an expression like {{$json["3faad09cdf8c411da46585a605766c43625be71c"]}} would just return nothing if this field doesn’t exist for some of your items.

So you can still use the Set node to format your data as needed.

It is more like the this is the same field and depending on the values in this field, the pipedrive Get node’s output is different.

if i understand right, i would have to set values for each custom field which would be set, in my case, when there is more than two values in the field. Correct?