Fully working and finalized mail forwarding sync

This commit is contained in:
Moritz Graf 2026-04-25 15:18:33 +02:00
parent 82acc4e7d5
commit 6d43326562
2 changed files with 8 additions and 1 deletions

View File

@ -58,6 +58,8 @@ Once configured, you need to create an Apps Script project in your Google Accoun
clasp push clasp push
``` ```
> **⚠️ Important:** `clasp push` only uploads the code. It does **not** install or update the background triggers. You must always re-run the `setup` function in the Apps Script IDE after a push to ensure the triggers are active and up to date.
## Step 4: Initialization ## Step 4: Initialization
The code is now in the cloud, but the background triggers need to be activated and the Admin SDK authorized. The code is now in the cloud, but the background triggers need to be activated and the Admin SDK authorized.

View File

@ -67,7 +67,12 @@ function setup() {
.onChange() .onChange()
.create(); .create();
console.log("Setup complete. The 'syncForwardings' trigger has been installed."); // Verify and log the installed triggers so we can confirm the setup is correct
const installedTriggers = ScriptApp.getProjectTriggers();
console.log(`Setup complete. ${installedTriggers.length} trigger(s) are now active:`);
for (const trigger of installedTriggers) {
console.log(` - Function: ${trigger.getHandlerFunction()}, Event: ${trigger.getEventType()}, Source: ${trigger.getTriggerSource()}`);
}
} }
/** /**