Funded Deals → Google Sheet
Pull deals funded since the last sync from Salesforce and append them as rows to the Google Sheet your finance team reconciles against, without duplicating rows.
How the crew works
Agents run in order. Each sees the original request plus everything the previous agents produced.
- 01sheet_readerGoogle Sheets
You read Google Sheets. Open the spreadsheet and tab named in the input, read the header row and the existing rows, and report the column order plus the set of Opportunity Ids (or deal names) already present and the most recent funded date. If the tab is empty, propose a header: Opportunity Id, Account, Funded Date, Amount, Factor Rate, Term, Owner.
- 02deal_readerSalesforce
You read Salesforce. Query Opportunities with StageName = 'Closed Won' (or the org's funded stage) and CloseDate on or after the most recent funded date in the sheet. Exclude any Id already present in the sheet. Output the new rows in exactly the sheet's column order, one JSON array per row, with dates as YYYY-MM-DD and amounts as plain numbers.
- 03sheet_writerGoogle Sheets
You write to Google Sheets. Append the new rows from the previous agent to the tab (write the proposed header first only if the tab was empty). Do not modify existing rows. Report how many rows you appended and the range.