Best answer

I can't access the raw JSON data after catching it

  • 26 October 2023
  • 4 replies
  • 211 views

Userlevel 1

I had built a Zap for a client a year ago where I was able to pull the raw JSON data into a JavaScript code snippet in order to pull nested arrays apart for use. Well I guess something changed over that time and the reference is no longer valid. I can’t find a way to access the JSON code anymore from the given list nor do I see any way to reference the raw code, which is a shame because Zapier is garbage at handling nested arrays passed via JSON. I could go into more detail, let’s just suffice it to say that the ‘normal’ methods would return the whole list repeatedly - even the AI got it wrong (every.single.time.) when I relinquished my own control.

All of my searches turn up what used to be possible, not what is current.

(a bit of an aside: Zapier wouldn’t handle creating an array of web addresses passed via JSON when some of them were blank and maintaining the association with their relative parent, so grabbing the raw JSON had been my workaround… now it’s time for a workaround for the workaround it seems)

Thanks in advance.

icon

Best answer by WAV-Tech 27 October 2023, 01:26

View original

4 replies

Userlevel 7
Badge +14

Hi @WAV-Tech 

Good question.

We would need to see screenshots with how the Zap steps are configured in order to have more context along with specific data examples.

Userlevel 1

We have JSON data passed from CognitoForms in which I used to be able to grab the raw JSON data and manipulate it with JavaScript. Here, I used to slice at RoomTypes (for example) at each room and grab the needed information as well as any attachments associated with said room.

Some rooms had a single attachment, some multiple attachments, and some had none at all so coding it worked quite well. Now I see no way to pass the raw JSON as there is no reference to such a thing within the Zapier blocks. 

There are a tremendous amount of objects to search through, but none of them represent the original raw data.

 

---maybe could/should be a different question, but it’s why I created the above workaround:

Zapier doesn’t handle turning a set of web addresses into a list very well. This was out of 6 separate “rooms” and this list only shows 2, both rooms containing the same 2 items that were originally in separate rooms.

 

 

I’m okay with a different workaround, but I also feel that others might like to know how to manipulate their JSON once it’s been acquired as that was the original intention of this question.

 

Userlevel 7
Badge +14

@WAV-Tech 

How is data being sent to the Zap trigger webhook? (e.g. from a webhook configured in Cognito Forms or from a different Zap)

If so, then perhaps something changed with Cognito Forms.

Userlevel 1

So I’ve found that now Zapier separates the Catch Hook options. It appears that it can’t parse the information and maintain the unparsed body for reference later in the Zap. I’ve had to accept it unparsed and then parse it in the next step so I can maintain having both available.

Reply