-
-
Notifications
You must be signed in to change notification settings - Fork 203
feature: Webhook #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feature: Webhook #184
Conversation
@marconneves this is so cool, i'll try to review this over the weekend! |
bugbot run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Function Returns Incorrect Type
The toWebhookEvent
function returns string literals (e.g., "EMAIL_SENT") instead of WebhookEvent
enum values. This leads to a type mismatch when passed to WebhookService.triggerWebhook
, which expects a WebhookEvent
type. The function should return WebhookEvent
enum values.
apps/web/src/server/service/ses-hook-parser.ts#L191-L209
apps/web/src/server/service/ses-hook-parser.ts#L178-L179
BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
@marconneves lemme know if get some time on addressing bugbot comments |
0001-fix-return-WebhookEvent-enum-values-instead-of-strin.patch git apply 0001-fix-return-WebhookEvent-enum-values-instead-of-strin.patch |
@marconneves would be really cool to have it |
This new webhook system allows you to receive notifications about events that happen in your account. You can use webhooks to integrate with third-party services, such as a CRM, a marketing automation platform, or a custom
application.
How to create a webhook
How it works
When an event occurs in your account, such as when an email is sent or a domain is verified, we will send a POST request to the URL that you specified. The body of the request will be a JSON object with the following format:
The event property will be the name of the event that occurred, and the payload property will be an object containing the data related to the event.
Caching
To improve performance and reduce the number of database queries, we cache the webhook configurations for 10 minutes. This means that when an event occurs, we will first check if we have the webhook configurations in the cache. If
we do, we will use the cached data to send the webhook notifications. If we don't, we will fetch the data from the database and store it in the cache for future use.