Clean outputs

This commit is contained in:
Adria Navarro 2024-07-25 16:15:23 +02:00
parent b12641e467
commit 173a9cb75a
1 changed files with 6 additions and 1 deletions

View File

@ -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 }