Now activated
This commit is contained in:
parent
0a65f0f092
commit
d4b4e19223
|
|
@ -11,6 +11,10 @@ It automates the creation of email forwarding in Google Workspace by reading fro
|
|||
- The entrypoint is `src/Code.js`.
|
||||
- The manifest is `src/appsscript.json`.
|
||||
|
||||
## Status
|
||||
- **Current Mode:** Active Production (`DRY_RUN: false`).
|
||||
- **Target:** All groups managed by this script are tagged with `[Auto-Forwarder] Managed by Google Sheets`.
|
||||
|
||||
## Rules & Safeguards (CRITICAL)
|
||||
1. **Never alter the `GROUP_DESCRIPTION_TAG` logic.**
|
||||
The script achieves declarative state management by finding and deleting Workspace Groups that are NOT present in the Google Sheet. To prevent the catastrophic deletion of real, human-managed groups (e.g., `board@haumdaucher.de`), the script relies on the `[Auto-Forwarder] Managed by Google Sheets` string in the group's description. The script must ALWAYS filter for this exact string before issuing any deletion API calls.
|
||||
|
|
|
|||
|
|
@ -75,13 +75,12 @@ The code is now in the cloud, but the background triggers need to be activated a
|
|||
- Click "Allow" to grant access to the Admin Directory API, Gmail API, and Google Sheets.
|
||||
5. Once authorized, the `setup` function will finish executing. It installs the background `onChange` trigger.
|
||||
|
||||
## Step 5: Going Live
|
||||
By default, the `CONFIG` block has `DRY_RUN: true`. This means the script will parse the sheet, output exactly what it *intends* to do to the logs, and email you a report, but it will **not** actually create, modify, or delete any Google Workspace Groups.
|
||||
## System Status: LIVE
|
||||
The system is currently configured for active production (`DRY_RUN: false`). Any changes to the Google Sheet will result in real-time creation, modification, or deletion of Google Workspace Groups.
|
||||
|
||||
Once you have reviewed the dry-run execution logs and verified that the script correctly parses all rows and maps the email addresses as you expect:
|
||||
1. Open `src/Code.js` and change `DRY_RUN: true` to `DRY_RUN: false`.
|
||||
2. Run `clasp push` in your terminal to deploy the update.
|
||||
3. Edit the spreadsheet one more time to trigger the live sync.
|
||||
To revert to dry-run mode for testing:
|
||||
1. Open `src/Code.js` and change `DRY_RUN: false` to `DRY_RUN: true`.
|
||||
2. Run `clasp push`.
|
||||
|
||||
**You are done!** Whenever a new response is submitted to the configured Google Sheet via Forms, the script will automatically run in the background, reconcile the forwarding groups, and send you an email report.
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const CONFIG = {
|
|||
|
||||
// Dry run mode. If true, the script will only log what it would do and send the email,
|
||||
// but will NOT actually create, update, or delete any groups in Workspace.
|
||||
DRY_RUN: true,
|
||||
DRY_RUN: false,
|
||||
|
||||
// DO NOT CHANGE THIS VALUE.
|
||||
// This tag is added to the description of groups created by this script.
|
||||
|
|
|
|||
Loading…
Reference in New Issue