Skip to content
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

Add webhooks for main events #1007

Open
BenoitSerrano opened this issue Jan 28, 2025 · 3 comments
Open

Add webhooks for main events #1007

BenoitSerrano opened this issue Jan 28, 2025 · 3 comments

Comments

@BenoitSerrano
Copy link

Is this a feature for the backend or frontend?

Backend, Frontend

What would you like?

I'd like to be able to subscribe to webhooks linked to events such as :

  • a card has been created
  • a comment has been posted
  • etc.

Why is this needed?

I use Planka to create a "classified ads" marketplace, and I want to notify my users that an ad has been posted

Other information

No response

@meltyshev
Copy link
Member

Hi! This is already possible via configuring WEBHOOKS environment variable:

WEBHOOKS='[{
  "url": "http://localhost:3001",
  "accessToken": "notaccesstoken",
  "events": ["cardCreate", "cardUpdate", "cardDelete"],
  "excludedEvents": ["notificationCreate", "notificationUpdate"]
}]'

@BenoitSerrano
Copy link
Author

Oh! Thank you!
I couldn't find it in the documentation. Is it written somewhere? Is there any specs on how the access token will be used (bearer token, x-api-key,...) ?

@meltyshev
Copy link
Member

It doesn't seem to be in the docs yet :(

The accessToken will be sent as Authorization: Bearer [accessToken], and all webhooks are sent as POST requests.

Unfortunately, the incoming data hasn't been described yet either, but you can find the general data structure here:

async function sendWebhook(webhook, event, data, prevData, user) {
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants