Question

Accessing Pipedrive person tags with Javascript


Userlevel 1

Hello everyone,

I am having some problems with a Pipedrive integration and would greatly appreciate any help. In my  Zap, I search for a person by email and, if found, I want to add a new tag to that person's current tags. I am using the “Run JavaScript” action.

The search is going well and I am able to retrieve the tags.

 

However, the input shows this field as a key inside double brackets.

Furthermore, JavaScript always considers the typeof inputData.currenttags as "undefined".

 

What am I doing wrong? Thank you very much.

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +11

Welcome to the Community, @cuentame! 👋

Can you share a screenshot showing the code you’ve got in the Code field? We can’t see into your Zap so that’ll help to give us some more context as to why it’s being seen as “undefined”.

That said, I did a quick test in a Code step and was able to get a list of tags returned with no “undefined” error:
fe158c81b96b40a3d6d712702683c736.png
67152f8d62ddf654f280ae501cfc1dd7.png

So it doesn’t seem to be a bug with the Code app. Perhaps there’s an issue with how the variable for the tags is being defined?

Looking forward to hearing from you!

Userlevel 1

It’s quite weird, maybe a cache issue, now it seems to work perfectly.

A lot of thanks for your help 👏

Userlevel 7
Badge +11

You’re welcome, @cuentame! Glad to hear it’s working now! 😁🎉