Recall & Review
beginner
What is the purpose of using API calls in Google Apps Script?
API calls let your script talk to other web services to get or send data automatically, like fetching weather info or sending emails without manual work.Click to reveal answer
beginner
Which Apps Script service is used to make HTTP requests to APIs?
The UrlFetchApp service is used to send HTTP requests like GET or POST to APIs and get responses back.
Click to reveal answer
beginner
How do you send a GET request to an API using Apps Script?
Use UrlFetchApp.fetch(url) where url is the API endpoint. This sends a GET request and returns the response.
Click to reveal answer
intermediate
What is the role of the 'options' object in UrlFetchApp.fetch(url, options)?
The options object lets you set method (GET, POST), headers, payload, and other settings to customize your API request.
Click to reveal answer
beginner
Why should you parse the API response in Apps Script, and how is it done?
API responses are often in JSON text. You parse them with JSON.parse(response.getContentText()) to turn them into usable objects in your script.
Click to reveal answer
Which Apps Script service do you use to call an external API?
✗ Incorrect
UrlFetchApp is the service designed to make HTTP requests to external APIs.
What HTTP method does UrlFetchApp.fetch(url) use by default?
✗ Incorrect
By default, fetch() sends a GET request unless you specify otherwise in options.
How do you include headers in an API request using UrlFetchApp?
✗ Incorrect
Headers are added inside the options object as a headers property.
What is the correct way to parse a JSON response from an API in Apps Script?
✗ Incorrect
You use JSON.parse() on the text content of the response to get a JavaScript object.
Which option is NOT a valid HTTP method you can use in UrlFetchApp options?
✗ Incorrect
FETCH is not an HTTP method; valid methods include GET, POST, PUT, DELETE, etc.
Explain how to make a POST API call from Google Apps Script and handle the JSON response.
Think about setting method, headers, payload, and parsing the response.
You got /4 concepts.
Describe the steps to fetch data from a public API and insert it into a Google Sheet using Apps Script.
Focus on fetching, parsing, and writing data to the sheet.
You got /4 concepts.