Back

Appwrite Webhook and Cloud Functions

  • 0
  • Flutter
  • Webhooks
  • Functions
Zionnite
16 Jan, 2024, 17:55

hello guys, I'm caught between Webhook and cloud function, I don't know how to use Webhook.

THIS IS WHAT I INTEND TO DO: currently in my app, when a user post a video to my 3rd party CDN, the 3rd party encodes the video and sends the status of the video via a Webhook, so I need to use the status of the video to update the appwrite database regarding the post

I don't know how to use this Webhook in Appwrite.

Does Appwrite Webhook connect to the cloud function?

TL;DR
The developer is seeking help with using Appwrite Webhooks and Cloud Functions. They want to update the Appwrite database with the status of a video that is encoded by a third-party CDN. They are unsure of how to use Webhooks in Appwrite and whether Webhooks connect to Cloud Functions. Solution: Appwrite Webhooks allow Appwrite to call an external URL on an event. To update the Appwrite database with the video status, the developer needs to set up a Webhook that will be triggered by the third-party CDN. They can pass the video status as body data in the request, which will be available as `context
ideclon
16 Jan, 2024, 18:13

Like your (literal) metaphor! πŸ˜†

No, Appwrite Webhooks allow Appwrite to call an external URL on an Event.

You can trigger an Appwrite Function by calling it's domain, which you can see in the Function Deployments page (you can see it's [FUNCTION_ID].appwrite.global in the attached screenshot).

ideclon
16 Jan, 2024, 18:14

Calling that domain will trigger the function. You can pass body data into the request, which will be available as context.req.body within the Function - https://appwrite.io/docs/products/functions/development#request.

Zionnite
16 Jan, 2024, 18:21

thanks @ideclon I'm grateful you clarify this out for me

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