stale-balloon-4068
06/03/2025, 3:45 AMclerkUserId, email, userPlan from website to Botpress
What I've Tried:
javascript
// Website sends (confirmed in console):
iframe.contentWindow.postMessage({
type: "webchat:user-data",
payload: { clerkUserId: "user_123", email: "user@example.com", userPlan: "pro" }
}, "*");
// Also tried: "user-data", "config", "webchat:set-user-tags", "event"
Botpress Flow:
- Set_User_Data_from_Website node tries to extract from event.payload, event.data, event.tags
- Always empty: user.email = '', user.clerkUserId = ''
Questions:
1. What's the correct postMessage format for Botpress Cloud shareable iframe?
2. How should I extract the data in my Botpress flow? Which event properties?
3. Is there a better way to pass authenticated user data from website to Botpress?
4. Any working examples of website → Botpress data transfer?
Goal: Pass user authentication data from my website to Botpress so the bot knows the user's subscription plan.
Any help appreciated! Been stuck on this for days.wooden-beard-40210
06/03/2025, 11:00 AMwooden-beard-40210
06/03/2025, 11:00 AMstale-balloon-4068
06/04/2025, 7:54 PMbright-arm-28545
06/06/2025, 9:25 PMstale-balloon-4068
06/10/2025, 4:23 PMbright-arm-28545
06/12/2025, 4:43 PMstale-balloon-4068
06/13/2025, 12:19 PMbright-arm-28545
06/13/2025, 1:15 PMstale-balloon-4068
06/13/2025, 2:28 PMbright-arm-28545
06/13/2025, 2:38 PMstale-balloon-4068
06/13/2025, 3:06 PMbright-arm-28545
06/13/2025, 5:16 PMbright-arm-28545
06/13/2025, 5:18 PMbright-arm-28545
06/13/2025, 5:19 PMstale-balloon-4068
06/13/2025, 5:46 PMbright-arm-28545
06/13/2025, 7:19 PMstale-balloon-4068
06/14/2025, 1:46 AM