From 173a9cb75a9ada2cecb21f83c0bd056309d514e9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 25 Jul 2024 16:15:23 +0200 Subject: [PATCH] Clean outputs --- packages/server/src/automations/triggers.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/server/src/automations/triggers.ts b/packages/server/src/automations/triggers.ts index 87fb1a957b..febc8b6a56 100644 --- a/packages/server/src/automations/triggers.ts +++ b/packages/server/src/automations/triggers.ts @@ -140,7 +140,12 @@ export async function externalTrigger( } params.fields = coercedFields } else if (sdk.automations.isRowAction(automation)) { - params = { ...params, ...params.fields } + params = { + ...params, + // Until we don't refactor all the types, we want to flatten the nested "fields" object + ...params.fields, + fields: {}, + } } const data: AutomationData = { automation, event: params }