Question

How I can get raw data from previous action

  • 19 October 2022
  • 5 replies
  • 1034 views

Hey,

I have a zap running schedule job to read Trello board lists, pass the list data to Code for some custom logic

I have a requirement that I would like to use the raw json data returned from previous actions which is a Trello action rather than Zapier parsed json data.

Is it supportive by Zapier


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

5 replies

Userlevel 7
Badge +14

Hi @delexw 

Good question.

Please clarify what you are trying to do by providing detailed screenshots in order for us to have context.

Hey @Troy Tessalone 

As the screenshot, any of input data is a string.

The logic in the code is to split the string to an array (cardIds), then iterate the list of card ids to read value from other lists such as cardDesc based on the index. However, it doesn’t work always 

When I split cardTime to an array, the length of the array is only 1 because only one Trello card has the attribute, then I can’t use index from card ids array to look up time

So I would like the raw json from passed in

 

Userlevel 7
Badge +14

@delexw 

Zap app integrations steps don’t return the raw JSON.

It’s a feature request I’ve previously submitted via a ticket to Zapier Support: https://zapier.com/app/get-help

Try using a Formatter > Utilities > Line Items step to first prep the data before trying to handle the data in the Code step.

@Troy Tessalone 

Thanks. It would be helpful

Userlevel 4
Badge +1

Hi @delexw ,

If there is no value in the array, it may indeed not work. One solution here would be to return a fallback value, in case it’s null: 

 

To note: if the first item in the array (index 0) is null, this does not work. To resolve this, you can add a “dummy line” before this, like this.

If the trigger can be a webhook, we do have a Catch Raw Hook in Webhooks by Zapier trigger, which won’t parse the json. To parse JSON with a Code step, use this Zapier Community post: 

I hope those resources help, but please let me know if there is anything else, thanks!

 

All the best,

~ Leo