function onRatingClicked(e) {
  let key = e.parameters.key;
  let title = e.parameters.title;
  let pageSummary = e.parameters.pageSummary;

  const properties = PropertiesService.getScriptProperties();
  let rating = Number(properties.getProperty(key) ?? 0);
  properties.setProperty(key, ++rating);

  let card = buildCard(title, pageSummary, false);
  let linkPreview = CardService.newLinkPreview()
    .setPreviewCard(card)
    .setTitle(title)
    .setLinkPreviewTitle(title);

  return linkPreview;
}
Action handler for a good rating .

@param {!Object} e The event passed from click action.
@return {!Card}