i watched your youtube video end to end and followed each step i’m completely stuck here this is the error it shows
An error occured while running Execute Code card: Error: Cannot destructure property 'tenantId' of 'workflow.userData.userData' as it is undefined.
Transpiled Code:
003 async function __ROOT__() {
004 var __defProp = Object.defineProperty;
005 var __name = (target, value) => __defProp(target, "name", {
006 value,
007 configurable: true
008 });
009 async function __ROOT__() {
010 const {
> 011 tenantId
^^^^^^^^^^
012 } = workflow.userData.userData;
013 if (tenantId) {
014 const config = await tenant2kbTable.findRecords({
015 filter: {
016 tenantId: {
017 $eq: tenantId
018 }
019 }
020 });
021 const {
022 KBId,
023 id,
024 ...restaurantConfig
025 } = config[0];
026 conversation.kbId = KBId;
027 conversation.restaurantConfig = restaurantConfig;
028 } else {
029 throw new Error("tenantId not provided");
030 }
031 ;
032 }
033 __name(__ROOT__, "__ROOT__");
034 ;
> 035 return await __ROOT__();
^^^^^^^^^^
036 ;
> 037 }; return await __ROOT__();
^^^^^^^^^^