function retrieveSentiment(text) {
  // Sets REST call options   
  let apiEndPoint =
    'https://language.googleapis.com/v1/documents:analyzeSentiment?key=' +
    googleAPIKey;
  let jsonReq = JSON.stringify({
    document: {
      type: "PLAIN_TEXT",
      content: text
    },
    encodingType: "UTF8"
  });

  let options = {
    'method': 'post',
    'contentType': 'application/json',
    'payload': jsonReq
  }

  //  Makes the REST call
  let response = UrlFetchApp.fetch(apiEndPoint, options);
  let responseData = JSON.parse(response);
  return responseData;
}
Calls the Natureal Language API to get sentiment response for headline.

Important note: Not all languages are supported by Google document 
sentiment analysis. 
Unsupported languages generate a "400" response: "INVALID_ARGUMENT".