From 1f9ac476b4d0a8c728604aff216b762bb3e4374d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 2 Feb 2026 21:13:35 -0500 Subject: [PATCH] fix: correct environment variable name in sync scheduler The scheduled sync was using AUTOTASK_INTEGRATION_CODE but the actual environment variable is AUTOTASK_API_INTEGRATION_CODE. This caused scheduled syncs to fail with 'IntegrationCode is invalid' while manual syncs worked fine. Changed: - AUTOTASK_INTEGRATION_CODE -> AUTOTASK_API_INTEGRATION_CODE This aligns the scheduler with autotask-factory.ts which was already using the correct variable name. --- lib/services/sync-scheduler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/sync-scheduler.ts b/lib/services/sync-scheduler.ts index 3dc58b6..824c525 100644 --- a/lib/services/sync-scheduler.ts +++ b/lib/services/sync-scheduler.ts @@ -43,7 +43,7 @@ class SyncScheduler { apiUrl: process.env.AUTOTASK_API_URL || '', username: process.env.AUTOTASK_USERNAME || '', password: process.env.AUTOTASK_SECRET || '', - apiIntegrationCode: process.env.AUTOTASK_INTEGRATION_CODE || '', + apiIntegrationCode: process.env.AUTOTASK_API_INTEGRATION_CODE || '', }); this.syncService = createSyncService(autotaskClient); }