Set Slack Status

Hey everyone! I was able to get the Slack integration setup and can now post messages in Slack via Node Red and Hassio. This is great.

However, I would love to be able to set my status with this integration as well. Is this possible and if so can someone get me pointed in the right direction?

Thanks!

did you find a way with this? looking for something similar way to send homeassistant app/sensor for activity status to slack (e.g. driving, in_bed, etc)?

I did find a way to do this, but it was 2 years ago, so I’m not positive that the solution I used then is still available. I believe I’m using a grandfathered Token option to accomplish this.

Basically what I ended up doing though is updating the status via the Slack API. You can set your status with a simple HTTP POST, and I do that using Node-Reds http request node:

I use a function node right before the HTTP Request node in order to create the payload that is send with that API call. Here is an example of one that sets my status to home at the end of my day.

I believe the problem with this solution today is that I used Slacks Legacy Token to authenticate my http requests, but I don’t believe you are allowed to create new legacy tokens anymore. I believe everything must be oAuth now and I’m not sure how to do that.

I know this isn’t a complete answer, but hopefully it will help get you started down the right path.

After posting this I had another thought. I know there is a Slack integration for Home Assistant, but it doesn’t offer the ability to update your status.

Requesting that this functionality be added is one option, since they have the API authentication already figured out. However, even if they don’t add that functionality, you may be able to use it to authenticate with Slack, and then somehow get your token from them. If you can get the oAuth Token that they receive from Slack during the authentication process, then you should be able to put that in the “Token” field in my first photo and authenticate that way.

1 Like

your suggestion is still valid, among many other options to link nodered to slack. Fortunately also someone did this already with a custom flow which still works!