Page 1 of 2

New Slack Notification plugin

PostPosted: Tue Oct 30, 2018 3:54 pm
by FlyingDiver
The old one was using a discontinued Slack authentication method, and it was easier to write a new plugin from scratch than to fix it.

http://www.indigodomo.com/pluginstore/192/

This one doesn't do all the fancy emojis and file uploads (yet), but it does work with multiple Workspaces.

Enhancement requests and bug reports to the GitHub issues page, please.

Re: New Slack Notification plugin

PostPosted: Wed Oct 31, 2018 8:35 am
by FlyingDiver
Release 1.0.1 has been posted with support for uploading files.

Re: New Slack Notification plugin

PostPosted: Sat Dec 08, 2018 9:04 am
by henkjanvries
Hi Joe,

thanks for working on this.

I cant seem to find how to use the slack 2 notification method in triggers, the plugin itself doesnt have aconfig setup, so how can i connect the plugin to my slack environment?
thanks

Re: New Slack Notification plugin

PostPosted: Sat Dec 08, 2018 4:33 pm
by FlyingDiver

Re: New Slack Notification plugin

PostPosted: Thu Sep 19, 2019 3:15 am
by slackman1
Hi,

Installing the Slack 2 Indigo Plugin, it unfortunately fails on startup. Running Indigo 7.3 on El Capitan, it seems that a Python module cannot be found by the plugin:

Slack 2 Error Error in plugin execution InitializeMain:
Traceback (most recent call last):
File "plugin.py", line 4, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/__init__.py", line 1, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/client.py", line 8, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/server.py", line 14, in <module>
ImportError: No module named websocket
Stopping plugin "Slack 2 1.0.1" (pid 6867)

Should I install this module to have the plugin working correctly? If so, could you maybe advise on the best way to do this?

Thanks, Gerrit Jan

Re: New Slack Notification plugin

PostPosted: Thu Sep 19, 2019 6:07 am
by FlyingDiver
The best way to fix is is to upgrade to a more current version of MacOS X that includes Python 2.7, which has websockets built in. I think El Capitan only has Python 2.6.

You might be able to fix it by manually installing websockets using "sudo pip install websockets"

Re: New Slack Notification plugin

PostPosted: Fri Sep 20, 2019 8:53 am
by slackman1
Hi Joe,

Thanks for your kind reply and suggestions. However, Indigo on El Capitan has Python 2.7.10 available, also if I open a scripting shell from within Indigo:
------
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
Connected to Indigo Server v7.3.1, api v2.1 (localhost:1176)
>>>
------
(and these 2009 Mac mini's keep running and running and running... :D )

Tried the fix you suggest, but could not install as root. Had to do: pip install --user websocket.
This seemed to make websocket available to the plugin, but the next issue is then the 'create_connection' module or function:
------
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/server.py", line 14, in <module>
ImportError: cannot import name create_connection
------

Any further suggestions? Am I missing some obvious prerequisite like installing Slack desktop client or so?

Thanks for your reply in advance.

Best regards, Gerrit Jan

Re: New Slack Notification plugin

PostPosted: Fri Sep 20, 2019 9:13 am
by FlyingDiver
OK, I'm going to have to investigate this. I could have sworn that websockets was pre-installed on the systems this plugin was tested on, but now I'm not so sure.

Re: New Slack Notification plugin

PostPosted: Fri Sep 20, 2019 9:51 am
by FlyingDiver
Looks like you need these two commands to fully install websockets:

Code: Select all
sudo pip install websocket
sudo pip install websocket-client


The install requires the Xcode command line tools, so those need to be installed first, if not already.

Re: New Slack Notification plugin

PostPosted: Fri Sep 20, 2019 1:21 pm
by slackman1
Hi Joe,

Success!

Some additional information, I saw that you already amended the Wiki.
It seems to be (searching the web) that when OS X SIP protection is enabled on a Mac (check with csrutil) with El Capitan, pip cannot install successfully as root.
I used the --user option, works fine and indeed the 2 commands you provide are sufficient to get the plugin running correctly.
Code: Select all
pip install --user websocket
pip install --user websocket-client


Furthermore, some feedback on the info you provide on Scopes. I think it would be more clear to (also) list the 'technical' access designators, like so.

CONVERSATIONS
Code: Select all
Access information about user’s public channels
channels:read
Send messages as user
chat:write:user

FILES
Code: Select all
Upload and modify files as user
files:write:user


I also got a choice of the Scope 'Send messages as <slack app name>' with chat:write:bot designator, which worked equally well with your plugin.

So, thanks you again for building this, helping me and maybe some others in using this plugin...

Best regards, Gerrit Jan

Re: New Slack Notification plugin

PostPosted: Tue Mar 17, 2020 12:17 pm
by slackman1
Hi Joe,

I think the Slack2 plugin connects to Slack with a TLS version that is now phased out by Slack. (1.0 or 1.1)
Is this the case or is this caused by my old OS version (10.11.6)?

Thanks, Gerrit Jan

Re: New Slack Notification plugin

PostPosted: Tue Mar 17, 2020 5:22 pm
by FlyingDiver
slackman1 wrote:
Hi Joe,

I think the Slack2 plugin connects to Slack with a TLS version that is now phased out by Slack. (1.0 or 1.1)
Is this the case or is this caused by my old OS version (10.11.6)?

Thanks, Gerrit Jan


It’s your OS version. You need to be running High Sierra or later.

Re: New Slack Notification plugin

PostPosted: Sun Mar 22, 2020 10:40 am
by slackman1
Hi Joe,

Thanks for clearing that...:-)

Best regards, Gerrit Jan

Re: New Slack Notification plugin

PostPosted: Sun Nov 29, 2020 7:28 am
by avdhil
Hi Joe,

Just installed the plugin. App and token should be fine. But I do get errors:

Code: Select all
 Started plugin "Slack 2 1.0.1"
   Slack 2 Debug                   Slack 2 startup
   Slack 2 Debug                   Slack Mi-Casa: Starting Device
   Slack 2 Error                   Slack Mi-Casa: Slack connection error: method_deprecated


Any idea?

Re: New Slack Notification plugin

PostPosted: Sun Nov 29, 2020 7:32 am
by FlyingDiver
avdhil wrote:
Hi Joe,

Just installed the plugin. App and token should be fine. But I do get errors:

Code: Select all
 Started plugin "Slack 2 1.0.1"
   Slack 2 Debug                   Slack 2 startup
   Slack 2 Debug                   Slack Mi-Casa: Starting Device
   Slack 2 Error                   Slack Mi-Casa: Slack connection error: method_deprecated


Any idea?


Looks like they changed the API. Please open an issue on GitHub.