Skip to content

Commit 668f818

Browse files
Add instructions for configuring the database webhook
1 parent 0d1c580 commit 668f818

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,22 @@ If the command ☝️ doesn't work for you, try executing the command with the `
199199

200200
[![asciicast](https://asciinema.org/a/nHeUle77fZcsoyXAMzwcB3329.svg)](https://asciinema.org/a/nHeUle77fZcsoyXAMzwcB3329)
201201

202+
### Create Database Webhook
203+
204+
For detailed instructions on creating a webhooks, please refer to the [Supabase docs](/assets/webhook-setup/02-select-create-a-new-webhook.png).
205+
206+
![Database Webhooks page](/assets/webhook-setup/02-select-create-a-new-webhook.png)
207+
208+
1. Select **Create a new hook** button
209+
2. Name the hook "push-order-confirmation-to-user"
210+
3. Set the table to `orders`
211+
4. Select **Insert** checkbox
212+
5. Set hook type to HTTP Request
213+
6. Set the HTTP request method to **POST**
214+
7. Set the URL to the edge function, `push-order-confirmation-to-customer`
215+
8. Add a HTTP Header named `Authorization` and set the value to `Bearer [Your Supabase project's anonKey]`
216+
9. Select **Confirm** confirm button to complete setup ![Review before confirm](/assets/webhook-setup/03-select-confirm.png)
217+
202218
## How to the Test
203219

204220
Submit an HTTP request to the function.

0 commit comments

Comments
 (0)