diff --git a/packages/server/src/automations/triggers.ts b/packages/server/src/automations/triggers.ts index 4cbde14c46..e8f30830a0 100644 --- a/packages/server/src/automations/triggers.ts +++ b/packages/server/src/automations/triggers.ts @@ -128,10 +128,7 @@ export async function externalTrigger( throw new Error("Automation is disabled") } if ( - automation.definition != null && - automation.definition.trigger != null && - automation.definition.trigger.stepId === definitions.APP.stepId && - automation.definition.trigger.stepId === "APP" && + automation.definition?.trigger?.stepId === definitions.APP.stepId && !(await checkTestFlag(automation._id!)) ) { // values are likely to be submitted as strings, so we shall convert to correct type diff --git a/packages/server/src/sdk/app/rowActions.ts b/packages/server/src/sdk/app/rowActions.ts index 9540198931..ba5007f68f 100644 --- a/packages/server/src/sdk/app/rowActions.ts +++ b/packages/server/src/sdk/app/rowActions.ts @@ -163,7 +163,8 @@ export async function run(tableId: any, rowActionId: any, rowId: string) { const row = await sdk.rows.find(tableId, rowId) await triggers.externalTrigger(automation, { - fields: { row, table }, + row, + table, appId: context.getAppId(), }) }