Skip to main content

Problem:

  • I’m running an API to fetch a large JSON file cached on a server: https://data.vatsim.net/v3/vatsim-data.json
  • Using a Custom Request (via Webhooks By Zapier) to GET the desired file, it fetches it, and natively decodes and groups the headers across the whole JSON into a single text string, as below:
  • However, this removes the native grouping in the cached JSON;
     
  • This causes an issue because I want to parse the data in a further step using AI to interpret and extract what I want. At present I can’t reference the entire collection as a single text response (formatted as above in the html version).
  • Storing the result as a single variable would work, but I do not know how to do that (I’m a new user)
  • Ideally, I’d like to only save the “Controllers” section (as below) of the JSON to then move on and parse, as the full file is approx. 66,000 lines. My aim is to parse the online ‘controllers’ taking their station callsign and frequency to use in a further step;
     

    Thanks in advance :) 

Hi @Luke_ 

Instead, use a Code step to make the API request and handle the API response however you’d like.

https://zapier.com/apps/code/help


Hi @Luke_ 

Instead, use a Code step to make the API request and handle the API response however you’d like.

https://zapier.com/apps/code/help

Thanks @Troy Tessalone! I was hoping for a walkthrough or a code snippet to help me get going, is that something you can help with? :) 


@Luke_ 

Examples in the Code help links: https://zapier.com/apps/code/help

Code steps have AI to help configure the code: https://help.zapier.com/hc/en-us/articles/15666688064013-Generate-a-Code-step-using-AI-Beta

ChatGPT is a great resource for helping configure the custom code.

 


Reply