function renameFile(e) {

  const newName = e.formInput.names
  const id = e.drive.activeCursorItem.id
  DriveApp.getFileById(id).setName(newName)

  const eUpdated =
  {
    hostApp: 'drive',
    drive:
    {
      selectedItems: [[Object]],
      activeCursorItem:
      {
        title: newName,
        id: id,
        iconUrl: e.drive.activeCursorItem.iconUrl,
        mimeType: e.drive.activeCursorItem.mimeType
      },
      commonEventObject: { hostApp: 'DRIVE', platform: 'WEB' },
      clientPlatform: 'web'
    }
  }

  return onCardUpdate(eUpdated)

}
Renames a file based on user selection / updates card.

@param {!Event} e Add-on event context
@return {!Card}