Communote / communote-server

Communote server with core plugins
http://communote.github.io/
Apache License 2.0
22 stars 4 forks source link

Content API or outgoing hook #40

Closed datenwort closed 7 years ago

datenwort commented 7 years ago

Hi,

I tried to add an external communication channel which should listen to the content on a specific topic. Maybe I am blind but I cannot find an introduction how to get the content of a topic? Is therer currently a possibility?

datenwort commented 7 years ago

So I was blind. Found the .../timelineNotes/ API. But is there a way to implement a hook?

scrobbleme commented 7 years ago

What hook do you mean? Do you have an example?

datenwort commented 7 years ago

Outgoing webhooks are mostly used to react on something. In Wekan for example a notification is send via this webhook if a card is changed, moved or something else. The listener then can analyse the change and react (e.g. refresh the burn down chart, adding a new requirement to the requirements document). In Slack is also a possibility to use this.

Reason is for example to react on communication with a users (e.g. bots) or in a room. So you send a note in a room and the listener (bot, ai) analyse the text and react on it (e.g. send back an answer)

Hope this was understandable.

rwi commented 7 years ago

There is a hook which allows you do something after a note was created or updated, but it's a bit more low-level (and because of this more powerful 😉 ) than in your examples. What you have to do is something like this:

If you have further questions don't hesitate to ask 😃

datenwort commented 7 years ago

Thanks for this very detailed information. I will do my best to implement it.