Back

Create documents with webhook

  • 0
  • Webhooks
jaydenclerk
27 Jul, 2023, 19:46

Basically what I want to do is have a webhook to listen to some even and create a document in the Model collection in my database with some data coming from the payload.

TL;DR
User wants to create documents with a webhook and asks about the need for an endpoint before the cloud function. Respondent explains that the request needs to be in a specific format and suggests using a workaround like 'appwrite-funcover'. In the next version of Appwrite, this won't be necessary. User wants a webhook to create a document in the Model collection in their database with data from the payload.
Drake
27 Jul, 2023, 21:23

That's essentially an Appwrite Function. However, the limitation right now is the request needs to be in a very specific format (headers and body).

The workaround is to put something in front to translate the request. you can use something like this: https://github.com/BoolCode/appwrite-funcover. In the next version of Appwrite, you won't need this.

dammy
29 Jul, 2023, 02:42

I appreciate you sir @Steven

dammy
29 Jul, 2023, 16:56

but @Steven why an endpoint before reaching the cloud function?

Drake
29 Jul, 2023, 17:16

Please create a new post

dammy
7 Aug, 2023, 09:52

Okay @Steven

dammy
7 Aug, 2023, 09:55

I just did @Steven

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