You can customise the webhooks payload Ref: <http...
# developers
a
s
Hey @Ali Thanks for this doc. I think these are predefined data. I have to pass my own data into booking and get back through webhook.
a
You can pass your own data in a similar fashion. The variables are predefined but you can write in regular text as you require.
s
Sorry I couldn't get you. Actually my user case is, I need to show embed view in my web application. So can I pass my custom data and then get by webhook payload? If yes, could you give example? Thanks.
Hey @Ali It's better if I can get a answer asap.
@Ali ^^
a
Copy code
{
  "content": "A new event has been scheduled",
  "type": "{{type}}",
  "name": "{{title}}",
  "organizer": "{{organizer.name}}",
  "booker": "{{attendees.0.name}}"
}
From the page I shared 🙏
Note that the variables should be added with a double parenthesis as shown above.
Static text goes normally, recognized variable goes within
{{}}
s
Thanks for the info @Ali. How can I pass this in embed UI config? Since I need to pass dynamic data. Let's say I need to pass a value for userId. Then how can I achieve that?
a
How can I pass this in embed UI config?
Hmm... I'm not entirely sure how that can be done
s
I see.. I'm actually looking that for.. Could you point someone who has idea on that?
a
cc: @Hariom Balhara for embed related question
h
Hey @Sathees, here is a codesandbox that sends metadata through embed which you can read in webhook https://codesandbox.io/s/cal-component-embed-inline-demo-react-passing-metadata-that-you-can-receive-in-webhook-cie07g?file=/src/App.tsx
This is in React and you can do it similarly for Vanilla JS embed if you use that
In Vanilla JS, this is how you pass the config
s
Hey @Hariom Balhara Thanks for the info. I have tried to pass custom data like userId, some token and other staff from our web application. But I couldn't get my custom data in the webhook response. Let me recheck again with this and get back to you.