I want to build a Zap to track U.S. Department of Defense contracts on a spreadsheet. Here's what's up:
Every day, the DoD publishes a new story to an RSS feed detailing the day's new contracts. Here's the RSS feed: https://www.defense.gov/DesktopModules/ArticleCS/RSS.ashx?ContentType=400&Site=945&max=10
And here's the story in the latest <item>: https://www.defense.gov/News/Contracts/Contract/Article/3916067/
That story describes 34 new contracts, each described in a different paragraph. (Another day, it might be 23, or 50, or 7.) I want to use something like ChatGPT or Gemini to extract data from each contract and put it into a Google Sheet (or other sheet) with a standard set of headings: Service, Awardee, Location, Contract Value, Contract Type, Contract Details, Work Locations, Procurement, Contracting Activity.
The problem I'm running into is that variable number of contracts/paragraphs, which means there would be a variable number of outputs each time this is run. I've been toying around with ChatGPT's "extract structured data," but it seems like it's set up for a single task, not a task of variable length.
I feel like I need to do something like:
1. Trigger: New item in RSS Feed
2. Fetch the copy from the linked item
3. Break the copy into 'n' chunks
4. Start a loop of length 'n'
5. For each 'n' extract the data and push it to a new row of the Google Sheet
I guess I just don't really know how to do Steps 3 and 4 here, and I could use some help. Am I thinking about this the right way? Or is there a faster, all-in-one approach to this?