Twilio Sub-Account Cleanup: Google Sheets Trigger → Paginated API Sweep → Auto-Close with Status Write-Back
Problem:
The client had accumulated hundreds of Twilio sub-accounts that kept billing, and Twilio's console only allows closing them one at a time, making bulk cleanup a multi-day manual job.
Solution:
Built a Make.com scenario triggered by Google Sheets Watch Changes. After a Sleep buffer, a Router splits the work: the first path builds the API request URL, uses a Repeater to page through Twilio's Get Sub-Accounts endpoint, and iterates plus aggregates every page into a stored sub-accounts array variable; the second path pulls that array, iterates it, and a downstream Router matches each sheet row, found accounts trigger a Twilio Close Sub-Account API call and a Google Sheets row update with a Retry error handler, already-closed accounts hit a Skip handler, and unmatched accounts write a 'not found' status back with their own Retry.
Result:
Sub-accounts flagged in a spreadsheet are now closed automatically in bulk with per-row status write-back, replacing hundreds of manual console clicks with a single sheet edit.
