No, but you get different functionality depending on whether using the bit token or the oauth token.
I think the node descriptions should say which scope is needed and if you haven’t got it set the error message should report what scope was required.
However, as they’ve changed the permissions/scopes this is likely no longer correct. I will try to provide further details of which node needs which new scope soon.
Install or reinstall depending on whether this is the first configure
Use the bot token in the KNIME nodes:
This seems to work, I didn’t need to add any user scopes.
If your intention is to have a generic ‘knime’ user post to a user or channel then I think the bot permissions are sufficient. It appears the user scopes are to allow KNIME to post on behalf of a specific user and this sin’t something I’ve tried myself.
To post into a private channel the bot must have been invited.
If your intention is to have a generic ‘knime’ user post to a user or channel then I think the bot permissions are sufficient. It appears the user scopes are to allow KNIME to post on behalf of a specific user and this sin’t something I’ve tried myself.
It would appear this is incorrect. Bots are not able to read public and private channel history and this must be done with a user token.
To use the shortly to be released version 2 of the Channel History node the following user scopes must be set up:
I have added above mentioned scopes but I am still getting Missing scope error.
2020-04-07 14:01:46,655 : ERROR : KNIME-Worker-29-Message Slack channel 0:5 : : Node : Message Slack channel : 0:5 : Execute failed: API call failed: missing_scope
java.lang.Exception: API call failed: missing_scope
at com.sjwebb.knime.slack.api.SlackBotApi.getChannelNamesViaConversations(SlackBotApi.java:134)
at com.sjwebb.knime.slack.api.SlackBotApi.channelExists(SlackBotApi.java:342)
at com.sjwebb.knime.slack.nodes.messages.send.SendMessageNodeModel.execute(SendMessageNodeModel.java:48)
at org.knime.core.node.NodeModel.execute(NodeModel.java:740)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:574)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1229)
at org.knime.core.node.Node.execute(Node.java:1016)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:557)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:218)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:124)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
I’ve set up the permissions as described in the most recent posts with intrusctions.
The bot token is: xoxb-1056175597284-1050207073526-eU6gUb8scQ0NSPxp9XwimW3X The user token is: xoxp-1056175597284-1056175597428-1050207068598-ca146920f53c9c2f41d358f7144f5953
Can you try using my tokens? Follow the invite link if you want to check the messages went through.
EDIT: It would appear I can’t get history of private channels or send messages to users with this config. So my previous instructions must not have been correct.
The build didn’t work properly so not all of the fixes made it through. It’s re-running now - when the nightly zip as been updated you can find the link here: https://www.knime.com/community
This workflow uses the above tokens. If you download and execute this workflow it should work (if using the nodes that built this morning) - if so the issue is with your workspace app setup.
Either way knowing if this workflow runs for you should help us continue diagnosing.
Thanks for the inputs, Swebb. I am getting following errors by using provided tokens. Look like something wrong with my workspace.
ERROR Message Slack User (beta) 0:9 Execute failed: Failed to post message: user_not_found
ERROR Message Slack channel 0:5 Execute failed: Provided channel name of rmylavaram is not valid
I have recreated the workspace and I am getting user not found error using Slack user node and missing scope error using Slack channel node.
2020-04-08 09:21:44,020 : ERROR : KNIME-Worker-42-Message Slack User (beta) 0:9 : : Node : Message Slack User (beta) : 0:9 : Execute failed: Failed to post message: user_not_found
java.io.IOException: Failed to post message: user_not_found
at com.sjwebb.knime.slack.api.SlackBotApi.directMessage(SlackBotApi.java:362)
at com.sjwebb.knime.slack.nodes.user.messages.send.MessageSlackUserNodeModel.execute(MessageSlackUserNodeModel.java:46)
at org.knime.core.node.NodeModel.execute(NodeModel.java:740)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:574)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1229)
at org.knime.core.node.Node.execute(Node.java:1016)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:557)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:218)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:124)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Can I just check that you downloaded my workflow, reset the nodes and tried to execute them? Did this work but you still have issued when interacting with your own Slack workspace with your own tokens?
If not can we do the following test:
Download my workflow
Reset the nodes
Execute the nodes
We hopefully won’t get an error message here as I have successfully executed this workflow on the latest build of the nodes.
When trying to message a user in your Slack workspace can I also check you are using the user ID and not the username. If I message the user @swebb I need to enter that users ID. You can find this using the Get User node.
So for user swebb this would be U011N55HKCL.
Please see this section of the Message Slack User node description for more details:
Unfortunately the display name in Slack is not unique. So the @{username} value you may use is not directly usable within this node as the username. Instead you must find the user’s ID (e.g. looking it up int he Get Users node) and provide this.
Do any of the nodes work? Such as Get Users, Channel names, Channel History?
I am using User ID to send message after adding these scopes but I am still getting missing_scope error. Howerever, I am able to get list of Users using Get Users node and Get Channels (but not private channels).
How to get private channels? Following are the scopes that I have in my workspace.
Have you invited the Knime bot/app into the channels you want to send messages to?
Channel names are unique so you should be able to use the channel name and don’t need the ID.
Are you using the bot or user token to try to send messages? If you are using the bot token it looks like you should no longer get a missing_scope error.