These nodes don’t seem to work with private channels. I can see the ‘general’ and ‘random’ channel that Slack adds to new users/apps by default, but can’t get it to see any additional channels I add the app/bot to. Any suggestions?
would it be possible to have step by step guide how to configure your slack for the version 2.0 to work? I had the version 1.0 sending messages for public channels but I need Knime to send messages for private and I had high hopes that it would work with the version 2.0 but after installing it and trying to configure slack I only get this error in Knime: “ERROR Message Slack channel 0:2 Execute failed: Provided channel name of knime_test is not valid”. knime_test channel is public channel and after installing the version 2.0 I cannot send messages to either public nor private channels. Would be really nice to get this working.
Odd, I don’t recall any tests failing so the recent change to enable private shouldn’t have prevented any old workflows from working.
My first guess would be the permissions that were needed before aren’t the same as now and I happened to have both set. However, when you get a permissions based issue the error message is supposed to report this.
I’ll knock something together on my lunch break and hopefully we can get your workflows working again.
Yes, I was using the bot oAuth but even with oAuth I’m getting this same error. How ever now I think I found the cause, but I do not know why this behavior. If I use the Get Channels or Channel Names node it will only return 57/150+ public channels and this public channel and private channel I have added to the bot user are not in the list.
I also recreated the whole app to make sure everything should be right. As a note, from the setup you are missing the step for adding the bot user which is required for bot scope. Here is the list of scopes I have added for the bot user: bot, channels:history, groups:history, im:history, mpim:history, channels:read, groups:read, im:read, mpim:read, users:read, users:read.email, channels:write, chat:write:user, chat:write:bot, groups:write, im:write, mpim:write, users:write
Sorry if I was unclear, same problem with both public and private channel. I think this is somehow related to issue with Get Channels as it does not list those channels I try to use even though it should have permission to them, I have not tried to message on channels it will list successfully as I don’t want to spam on channels other people use.
I ran some more tests, with the 1.0.1 version I can message to public channel with same same oAuth token that does not work with 2.0.0 version. Also with the 1.0.1 I can list all public channels with Get Channels node, 2.0.0 version Get Channels node only returns 57/291 public channels we have. So it seems like this 2.0.0 version has some limitations somehow on what it can access.
Thanks for the update. I will have to do some testing to find out why you can’t list all the channels.
In terms of posting to the channels though I think this is most likely to be a permissions problem. Version 1 and version 2 use different slack API calls to post and I think they require different permissions.
Let’s see if you can post to my workspace. There tokens are temporarily:
Bot OAuth: ------
The private channel is called private-test and the general and random channels are public.
Something like this which should work with both tokens:
Both of those channels works with your tokens. I also tested this now with one of the public channels that gets listed with version 2.0.0 and messaging to those channels seems to work as well. So this issue is related to what you can see with the token. But why would it limit the visibility for some of the public channels?
Hrm, we’ve definitely ventured outside of my slack knowledge now.
The package I depend on for the slack interaction is jslack (https://github.com/seratch/jslack). The author of this package says to select all permissions except for the identity based ones. It may be worth trying that and seeing if it works? I’m not sure why the subset posted above works for me and not you though.
If this does work I’d probably still recommend trying to work which permissions can be removed as having a token with permissions you don’t need doesn’t seem like a good idea.
I’ll have a look over the slack docs and see if I can find anything that might be causing your problem. I don’t currently know how to recreate it with my workspace.