/GoogleWorkspace-CreateAlias

Google Apps Script to creates aliases for Google Workspace users in bulk, from a spreadsheet

Primary LanguageJavaScriptMIT LicenseMIT

GoogleWorkspace-CreateAlias

Google Apps Script to creates email aliases for Google Workspace users in bulk, from a Google Sheet

This script is intended for Google Workspace admins to bulk-add aliases from a Google Sheet. While Google Admin Console allows this functionality already via bulk CSV upload, it only creates aliases if the user's email prefix before the @ is the same; with this script, you can bulk-add aliases with varying prefixes.

Requirements

The user running the script must be a Super Admin in Google Workspace.

Installation and Use

  1. Create a new Google Sheet named Create Alias *
  2. For A1 enter Primary ID - for B1 enter Alias id - for C1 enter Alias Creation Status Sheet heading
  3. Enter the Primary user IDs and the desired aliases in the appropriate columns.
  4. Click Tools - Script Editor.
  5. On the Editor view, copy and paste the contents of CreateAlias.js. From the services menu, enable AdminDirectory directory_v1.
  6. Press run and accept the OAuth prompt. If all went well, the status column in the Sheet will fill in with Alias Created Successfully

* (if you want a different name for the Sheet, you must change the file reference on line #5)