Back

[SOLVED] Getting payload from event

  • 0
  • Users
  • Functions
  • Android
sivagowda
9 Jun, 2023, 13:01

My function is triggering (users.*.create) whenever a new user is created. Is there any way to get new user data(such as email, userId etc) inside that function?

TL;DR
Solution: The payload from the event can be accessed using the `APPWRITE_FUNCTION_EVENT_DATA` variable. You can check the documentation for more information on function variables. In your case, if you want to get new user data such as email and userId when a new user is created, you can access this information inside your function using `APPWRITE_FUNCTION_EVENT_DATA`.
Binyamin
9 Jun, 2023, 13:02

Yes.

sivagowda
9 Jun, 2023, 13:02

Please tell how

Binyamin
9 Jun, 2023, 13:03

It will be inside the APPWRITE_FUNCTION_EVENT_DATA

You can check about variables more here: https://appwrite.io/docs/functions#functionVariables

sivagowda
9 Jun, 2023, 13:04

Thank You Very Much!!😆

Binyamin
9 Jun, 2023, 13:04

<:appwriteupvote:899677724615016528>

Drake
9 Jun, 2023, 17:46

[SOLVED] Getting payload from event

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more