Fetching External APIs with Apps Script

UrlFetchApp is Apps Script's built-in HTTP client. It lets you make GET and POST requests to any external REST API, send webhooks, handle authentication headers, parse JSON responses, and integrate your spreadsheets with third-party services.

In this series, we follow the Acme Corp sales team integrating their Sales Tracker with external services — fetching company data from an enrichment API, posting deal updates to Slack, syncing closed deals to a CRM webhook, and more.

All examples use a Sales Tracker Google Sheet with the following columns:

Customer NameEmailProductAmountRegionSales RepStatusDate
Sarah Johnson[email protected]Pro Plan299NorthAlex MartinezClosed2024-03-15
Mark Chen[email protected]Enterprise Plan999EastJordan LeeIn Progress2024-03-18
Lisa Park[email protected]Starter Plan99SouthSam RiveraClosed2024-03-20