Skip to main content

I can’t fathom why this is so difficult. Hopefully I'm just missing something.

I need to extract the string values of a label type custom field. Is this even possible? More concretely, if my labels are: Alpha, Beta, Gamma, I simply want to get Alpha, Beta, and/or Gamma.

From the task data coming in, I can see and get the id of the labels, which is some unique string ClickUp generates in the background to identify the string value, but it seems by default you can’t just get the actual human readable string values?

That being the case, the next solution is to reverse engineer the string values by filtering the id’s extracted. In order to do that though, I need a simple mapping of the label’s “unique id’s → string values” (e.g, a1234 → Alpha), which does not seem to exist. I can get each of them individually, a collection of the unique id’s and a collection of the string values, but they’re not meaningfully mapped. I could potentially assume they’re ordered the same, but I don’t love that.

I'm happy to do this via a code step, but again, if I don’t have a good mapping of id → string values, my hands are tied. I happen to be doing this for a label type field, but I suspect I'd run into the same issue with a dropdown field as well.

 

Any solutions here?

Hi @rango 

Good question.

To help us have more context, please post screenshots with how your Zap steps are configured along with the data output from the Zap step that you are trying to use.


@Troy Tessalone thanks for reaching out. Hmm, getting this captured and communicated might be tricky.

I did find on my Trigger under Test I can see the json payload coming in. In the payload, I can see the mapping I laid out above. I still find it vexing there’s not an easier way to do this. Even with this found, it’s going to take some tedious traversal logic.

As for how the payload comes in, suffice it to say it’s a large, nested object that’s tricky to scroll through on the minimal windows we get in Zapier. If you’ve worked with ClickUp, you may have seen a similar payload.

Below I'll sketch out roughly what the nesting looks like and where the id → string value mapping can be found. Hope this helps more than it hurts.

Essentially though, I can get the current unique id, then it would be a matter of extracting the ‘options’ collection to extract the corresponding ‘label’. Open to any suggestions if there’s some simpler solution. Again, this seems like an incredible amount of work to simply extract the human readable value for a custom field:

task

→custom fields

→→1 where each index contains nested data about a custom field]

→→2

→→→name iname of custom field]

→→→type_config

→→→→options

→→→→→1

→→→→→→id = a1234

→→→→→→label = Alpha

→→→→→2 - 4

→→→value

→→→→1 = a1234 Aunique id of label set on this task]


@rango 

Working with nested line items in Zaps can be tricky and usually involves advanced approaches using Code.