From 304bfcf355e62912600bcbaf1414d6908673f3c5 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Tue, 21 May 2024 11:20:35 +0200 Subject: [PATCH] :ambulance: (httpRequests) Fix save variable parsing --- .../blocks/integrations/webhook/resumeWebhookExecution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bot-engine/blocks/integrations/webhook/resumeWebhookExecution.ts b/packages/bot-engine/blocks/integrations/webhook/resumeWebhookExecution.ts index 8de36c64f..cbad413b7 100644 --- a/packages/bot-engine/blocks/integrations/webhook/resumeWebhookExecution.ts +++ b/packages/bot-engine/blocks/integrations/webhook/resumeWebhookExecution.ts @@ -57,11 +57,11 @@ export const resumeWebhookExecution = ({ const existingVariable = typebot.variables.find(byId(varMapping.variableId)) if (!existingVariable) return newVariables const sandbox = vm.createContext({ - data: response.data, + data: response, }) try { const value: unknown = vm.runInContext( - parseVariables(typebot.variables)(varMapping?.bodyPath), + `data.${parseVariables(typebot.variables)(varMapping?.bodyPath)}`, sandbox ) return [...newVariables, { ...existingVariable, value }]