Back

How/Can I trigger a function call when a document is created in a specific collection?

  • 0
  • Databases
  • Functions
alizea
21 Sep, 2024, 23:33

I'm not exatly understanding how triggers/events work, how can I specify that it should only trigger when an event happens in this collection by collectionID?

:appwritepeepo:

TL;DR
To trigger a function when a document is created in a specific collection, you need to set up events and triggers. Specify that it should only trigger for a particular collection by using its ID.
Steven
21 Sep, 2024, 23:59

Make sure to change it to trigger on documents. Then, change the * to the collection id

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