How to get board updates or inserts in webhook or api

I notice that the mattermost webhooks are only for posts. Is there a way to receive board updates/inserts in a webhook or through some api call? I’m currently running mattermost on ubuntu server.

Eventually I want to create a record in Salesforce when a board ‘card’ reaches a certain status.

Hi @cheezymcsquibble and welcome to the Mattermost forums!

Focalboard is having several APIs but I’m not sure if the one you’re looking for is available at the moment. Via API you can create a subscription to a block (a block can also be a board) for a user and you will then get notified about changes to this block, but some tooling would need to react on those changes and interact with the salesforce API then to set a status there.

Does that need to be happening in realtime or could it be a bit delayed? I’m thinking of creating a small script which “watches” all your cards and searches for the required status and if it finds them, the script triggers an API call to salesforce to create the record there.

Should be an easy task for someone familiar with developing things like that.
Would that be a viable option for the time being for you?

Hi @agriesser ! Thanks for the quick reply. I use node-red frequently so I’m fine with building the logic to connect to Salesforce from there. Node-red can handle listening/querying from mattermost and then forward to Salesforce.

Alright, so here’s a link to the API documentation:

https://htmlpreview.github.io/?https://github.com/mattermost/focalboard/blob/main/server/swagger/docs/html/index.html

The focalboard plugin API (if you’re using Boards as a plugin on your Mattermost server) can be accessed via https://yourmattermost.com/plugins/focalboard/api/v1/

Let me know if this helps you with getting your project done!

hi @agriesser, I was just thinking: as there is a bot that posts to a channel for every board update - can I connect a webhook to it and then whenever a board update is posted to that channel I would use the webhook info to query the board information via the api to get the details? This way I wouldn’t have to poll the boards for any changes.

I’m not really that deep into Boards as of yet, I wasn’t aware that you can “subscribe” a board to a channel.
How did you do that? I just clicked around a bit and did not find an option to do that.

Are you referring to the “Follow” Feature on cards (Work with cards — Mattermost documentation)?

I’m not 100% sure if an update posted by a bot in a channel will trigger an outgoing webhook, but as soon as I know how to set up a board subscription to a channel, I’ll give it a try :slight_smile:

Actually its not what I thought; I have to manually ‘follow’ a card and then a ‘boards’ channel appears where all board updates are then posted by a bot. So perhaps not something I can use…

Yes, exactly - this is what I found and even if that would work, you would not get your own updates.
Boards 7.2 has just been released and will be available on self-hosted installations in about a month (you can manually install the plugin, though, but it requires Mattermost server 7.2) and it will have a lot of new features and a new permissions and role model; Heavy development is ongonig currently with this product, so I think such a feature will be available soon.

I also came across the Salesforce addon for Slack; is that something I can use somehow? Salesforce | Slack App Directory

Unfortunately not, slack plugins can not be installed on your Mattermost server.
I’ve linked this topic to the feature request for boards, BTW.