Best answer

Mixpanel Webhook Trigger

  • 30 July 2020
  • 3 replies
  • 315 views

Userlevel 1

I’m trying to create a Mixpanel Trigger in Zapier using Webhooks, and have a question about how the payload is handled. 

Mixpanel says that they’re sending in an array of json blobs for each user as below: 
 

 

When Zapier gets the payload, it is rendered as one giant string (as below): 

 

If I choose to “Pick off a child key” and set the value to ‘users’, then zapier seems to be able to parse the values appropriately. However, I am only seeing one users values as below (when really it should be an array of many) ...

 

I’d think I read somewhere that Zapier does in fact handle arrays appropriately in the backend, but for some reason, the UI and test steps only show one value? Is that accurate in this case? 

Thank you!!

icon

Best answer by Ginny 3 August 2020, 20:33

View original

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 +9

Instead of picking it off, have you tried splitting on $distinct_id

Userlevel 1

Thanks! that appears to work for getting each user separately into an array, but subsequent steps only seem to be letting me access it as one giant value. 

See the output below, which is great.

But I’d like to be able to parse the json blob for properties for each value in the array. However, when I try to access the output in a subsequent code step, it shows as below

 

and appears to come in as one giant string. 

Is there a way to access it as an array? Zapier’s UI on this is confusing me a bit

Userlevel 1

Update! (in case anyone else runs into the same problem)

I change the webhook to a Raw request, and am now using the below logic to parse the information: 

 

 

It gives it to me like below: 

 

which is what i’d been looking for! 

 

May be a roundabout way of doing it, but it’s working for me :)