From aa495312db032a9bd89a4b50dd7efeee4f2e2452 Mon Sep 17 00:00:00 2001 From: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Date: Mon, 15 Jul 2024 19:59:42 +0530 Subject: [PATCH] fix: notion integration (#2888) --- .../integrations/notion/components/AddIntegrationModal.tsx | 4 ++-- apps/web/app/api/pipeline/lib/handleIntegrations.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/web/app/(app)/environments/[environmentId]/integrations/notion/components/AddIntegrationModal.tsx b/apps/web/app/(app)/environments/[environmentId]/integrations/notion/components/AddIntegrationModal.tsx index dee8a49b99..559a506ff0 100644 --- a/apps/web/app/(app)/environments/[environmentId]/integrations/notion/components/AddIntegrationModal.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/integrations/notion/components/AddIntegrationModal.tsx @@ -309,7 +309,7 @@ export const AddIntegrationModal = ({ col={mapping[idx].column} ques={mapping[idx].question} /> -
+
-
+
{mapping.map((_, idx) => ( ))} diff --git a/apps/web/app/api/pipeline/lib/handleIntegrations.ts b/apps/web/app/api/pipeline/lib/handleIntegrations.ts index 79c4c48cd1..8717220bfc 100644 --- a/apps/web/app/api/pipeline/lib/handleIntegrations.ts +++ b/apps/web/app/api/pipeline/lib/handleIntegrations.ts @@ -227,7 +227,7 @@ const buildNotionPayloadProperties = ( } else { const value = responses[map.question.id]; properties[map.column.name] = { - [map.column.type]: getValue(map.column.type, processResponseData(value)), + [map.column.type]: getValue(map.column.type, value), }; } }); @@ -245,7 +245,9 @@ const getValue = (colType: string, value: string | string[] | number | Record ({ name: v })); + if (Array.isArray(value)) { + return value.map((v: string) => ({ name: v })); + } case "title": return [ {