sissbruecker / linkding

Self-hosted bookmark manager that is designed be to be minimal, fast, and easy to set up using Docker.
https://linkding.link/
MIT License
6.87k stars 326 forks source link

Feature idea: webhooks #492

Open pettijohn opened 1 year ago

pettijohn commented 1 year ago

I was looking into self-hosted options that take web snapshots similar to Internet Archive Wayback Machine (see a few options here), and thinking how that could be integrated with Linkding. A generic solution could be to add the ability to add webhooks that Linkding triggers upon saving a new bookmark. Configuration would allow end user to pick HTTP method (GET/POST at least) and a URL with tokens of at least bookmarked url, comma separated list of tag; title & description maybe, and possibly a user identifier for who initiated (but really that should be handled by the remote service with an API key or similar). POST methods might need another textarea input to construct the body. An example user input might be: on new bookmark save «or other trigger action», trigger GET «or POST» to https://my.archive.service/api/save?urlToSave={url}&tags={tags_comma_separated}

Not sure if there is any demand for such a feature, but I thought I'd share the idea. Personally, I like the idea of being able to trigger services that export a web page to PDF or MHTML, or perhaps trigger youtube-dl for links with certain tags, storing those in my own personal archive.

sissbruecker commented 1 year ago

I'm not sure that a generic mechanism provides a good user experience here. Then everyone who would want to configure some service would have to start from scratch in figuring out which URL, headers etc. to configure. Looking at Miniflux for example they support a specific set of services, each with their own configuration UI, and building the request just happens under the hood.

Another aspect is surfacing links in the UI. If you configure a custom archiving service, you would probably expect that the bookmark list shows links to the archived snapshots that have been created through that. That would just be another hassle if you would have to configure those manually, even if it's just a name for the service.

pettijohn commented 1 year ago

I take your point, especially showing the link to archived snapshot inline. Does linkding have a plugin/extension architecture to allow third parties to add functionality without modifying the linkding source code?

mzehrer commented 3 months ago

I second the the wish for a general purpose webhook to publish lifecycle events (CRUD) for bookmarks. Linkding is a central part in my knowledge retrieval workflows and I would love to be able to integrate it with my other applications. I would be happy with just sending out the bookmark data to a http endpoint.

voltagex commented 2 months ago

Just found this project and issue. I would also definitely use a webhooks feature to be able to take actions when certain links or domains are saved

voltagex commented 2 months ago

https://github.com/danihodovic/django-webhook/ might be an option