Jump to content

Slackfred: Interact with your Slack channels, groups and IMs


Recommended Posts

On 4/26/2016 at 2:54 PM, mdorf said:

Hi frankspin,

 

I too would like to know the answer to jwhitmarsh's question. When slackfred sends me to https://api.slack.com/web, all is see is a button that allows me to generate test tokens. Someone at my work suggested creating a slack bot and using its API token, but that's not ideal, since the bot will be a completely separate user.

 

Can you please provide some input on this?

 

Thanks!

 

Michael

 I've tested and using the Test Tokens work perfectly.

Link to comment
  • 5 weeks later...
  • 2 months later...

@triley60 Sorry about the lack of response here - I expected a fellow community member might be able to help you and this thread fell off my radar.

 

To get the token, type "slt", press cmd and hit return. This will send you to the API page, where you can request and get your token.

 

Once you have your token, re-type "slt" and paste the token you've just copied. Hit return and you'll get a notification confirming the token is set.

 

Screen Shot 2017-01-11 at 10.28.38.png

 

Link to comment

@gustavomd I've had a play with the "slr" keyword to take a look at these starred items. From what I can see, messages that are starred are returned but not files or images.

 

As such, if there are no matches, the workflow falls back to the Alfred default results. Really, it'd be better practice for it to fall back to a "no starred items found" message, but that's up to the workflow creator @frankspin.

 

Are you certain that 1. You've got the Slack workflow looking at the correct Slack channel? and 2. There are relevant starred messages in that channel?

 

You could always try starring a few messages and testing again as, when there are starred messages, these are correctly returned in my test. :)

 

Screen Shot 2017-01-11 at 10.34.14.png

 

Cheers,
Vero

Link to comment

Just found and installed this workflow today. Nice work!

 

I hacked my own copy to make a few changes to the slm keyword:

  • You can send direct messages to individuals as well as to channels
  • Deleted users are excluded from the filter list
  • You can use URL-unsafe characters in your message (e.g. using & produced unexpected behavior for me)

Let me know if these features are something you'd be interested in rolling into the "official" version...

Link to comment
On 1/18/2017 at 4:34 PM, pwharrison said:

Just found and installed this workflow today. Nice work!

 

I hacked my own copy to make a few changes to the slm keyword:

  • You can send direct messages to individuals as well as to channels
  • Deleted users are excluded from the filter list
  • You can use URL-unsafe characters in your message (e.g. using & produced unexpected behavior for me)

Let me know if these features are something you'd be interested in rolling into the "official" version...

I'm interested in this, would you mind sharing a copy? :)

Link to comment
  • 3 weeks later...

Requests if possible :)

 

  1. Is there a way to have a command where I can search and toggle through recent messages in descending order? i find that when I get a message I have to type slk and the persons name. Would be nice to have just a command to quickly see the list of those messages.
  2. when typing slk can the IMs/channels be ordered by last received messages or by the last message I've sent?

Thank you! Great workflow!

Link to comment
  • 1 month later...
On 18.1.2017 at 7:34 PM, pwharrison said:

Just found and installed this workflow today. Nice work!

 

I hacked my own copy to make a few changes to the slm keyword:

  • You can send direct messages to individuals as well as to channels
  • Deleted users are excluded from the filter list
  • You can use URL-unsafe characters in your message (e.g. using & produced unexpected behavior for me)

Let me know if these features are something you'd be interested in rolling into the "official" version...

2

 

Would be very much interest to get a copy to send individual users messages. That would be a key feature for me. Thanks!

Link to comment
  • 2 weeks later...
  • 1 month later...
  • 1 month later...
On 11/01/2017 at 11:30 AM, Vero said:

@triley60 Sorry about the lack of response here - I expected a fellow community member might be able to help you and this thread fell off my radar.

 

To get the token, type "slt", press cmd and hit return. This will send you to the API page, where you can request and get your token.

 

Once you have your token, re-type "slt" and paste the token you've just copied. Hit return and you'll get a notification confirming the token is set.

 

Screen Shot 2017-01-11 at 10.28.38.png

 

 

I'm very new to both Alfred and Slack. I cannot seem to get the required Slack token to make Slackfred to work.

Could somebody please help in describing what has to be done on Slack side to get it ?

Thanks in advance

Edited by shakenmilk
Link to comment
  • 4 months later...
  • 3 weeks later...
  • 2 months later...

Hi @czwengel. Welcome to the forum.

 

The problem is the workflow's code mixing Unicode and encoded strings. Could you provide some additional information, as described in the Reporting Problems with Workflows thread?

 

There should be a full traceback in Alfred's debugger, which will show where in the source code the problem is. Without that information, the bug is a whole lot harder to fix.

Edited by deanishe
Link to comment

Hi Denishe, thank you for that information, here ist the debug output:

 

Starting debug for 'Slackfred'

[2018-02-18 20:38:40][ERROR: input.scriptfilter] Code 1: 20:38:39 workflow.py:1971 DEBUG    get_password : fspinillo.alfredv2.slackfred:slack_api_key
20:38:40 workflow.py:1531 DEBUG    Cached data saved at : /Users/alskdjalsdjk/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/fspinillo.alfredv2.slackfred/channels.cpickle
20:38:40 workflow.py:1830 ERROR    'ascii' codec can't encode character u'\xfc' in position 15: ordinal not in range(128)
Traceback (most recent call last):
  File "/Users/laksdjalskjd/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.kjkhkhkhA/workflow/workflow.py", line 1828, in run
    func(self)
  File "slackfred-message.py", line 97, in main
    autocomplete='{0} : {1} > '.format(channels['team'], channels['name']),
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 15: ordinal not in range(128)

Link to comment

It appears you're not using the latest version of the workflow. At least, the line numbers don't line up with code in the repository.


In any case, changing this (line 97 of slackfred-message.py according to your traceback):

autocomplete='{0} : {1} > '.format(channels['team'], channels['name']),

to this:

autocomplete=u'{0} : {1} > '.format(channels['team'], channels['name']),


should fix the problem. There are likely other places in the code with the same issue, however (i.e. they'll explode with non-ASCII text).

Link to comment
  • 2 months later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...