frankspin Posted October 28, 2014 Posted October 28, 2014 (edited) Attention: I am no longer actively working on this Workflow. I don't have the time to dedicate to it anymore and provide the kind of updates I'd like. If you want to fork and contribute back to it, please do so via GitHub. I appreciate all the support and kind words shown by users for making this. slackfred ========= Alfred workflow to interact, and perform various functions with the service Slack Alfred workflow to interact, and perform various functions with the service [slack](http://slack.com/). Now with multi-team support! I'm currently in the process of getting this updated to work with multiple organizations where possible, as well as adding some extra workflow options like private groups, stars and a few more things. Stay tuned! ## Getting started 1. Install slackfred by visiting the download page in Github or via the [Packal page](http://www.packal.org/workflow/slackfred) 2. Open alfred and type `slt`, then hold `cmd` (apple key) and press `enter`. This will open up the Slack API page. Then look for your team (make sure you're logged in) near the bottom. Next to your team name will be your token. 3. Launch alfred and re-run `slt` to enter your token. ##### Multi-team use instructions In order to use the workflow with multiple organizations you will need to enter all of your keys as comma seperated strings with **no** spaces. Example: `team-org-api-token-1,team-org-api-token-2` ## Currently Available Functionality * `slk`: Let's you switch easily between channels, groups and IMs. Thanks to buzali for getting this working with Slack's URL scheme. * `slt`: Set your API Token * Open alfred and type `slt`, then paste your token. If you don't have a token, then hold `cmd` to open the API page to get one (look for your team near the bottom of the page). * `slm`: Send messages to a channel * Open alfred and type `slm` to populate channels. Use your arrow keys to select a channel and hit TAB. Then you can enter your message and hit ENTER. * `slf`: Search files * Open alfred and type `slf` to search files. Selecting a file opens it in your browser * `slp`: Set your presence * Open alfred and type `slp active` or `slp away` * `slc`: View, leave and join channels or private groups * Open alfred and type `slc` to display a searchable list of channels. Selecting a channel with `alt` leaves and `ctrl` lets you join. Currently only `alt` is functional with groups. * `slclr`: Clear unread messages * This currently only marks Channels as read and not groups. Depending on the size of your organizations this can also take a few seconds to run. * `slim`: Enter a users name to search for most recent DM messages * `slr`: Search your starred items * Highlight a result and hitting enter opens the web client to that result * `sls`: Perform a query across all your channels in your organizations * Highlight a result and hitting enter opens the web client to that result * Depending on the size of your organization this can take a few seconds to run * `slz`: Snooze teams: * After finding a team hit TAB and enter the length of snooze in minutes * To turn off snooze to the above and enter 0 ## To-do * Create a smoother API key/token process * Improve speed and performance This workflow was created with the help of Dean Jackson's library. Edited August 8, 2019 by frankspin thec13, palobo and thanasut 3
joel Posted November 18, 2014 Posted November 18, 2014 Hey, this is awesome, but two things: First, any chance you could make it press return after entering the query in the cmd-k area? Second, I'm using the new beta of slack with several organizations. Could this possibly switch to the right org? Thanks so much for making this!
Vero Posted November 18, 2014 Posted November 18, 2014 slackfred Just to let you know, your workflow was featured on the blog yesterday: http://blog.alfredapp.com/2014/11/17/getting-work-done-with-slack-github-and-pinboard/ Thanks for creating it frankspin 1
frankspin Posted November 18, 2014 Author Posted November 18, 2014 Just to let you know, your workflow was featured on the blog yesterday: http://blog.alfredapp.com/2014/11/17/getting-work-done-with-slack-github-and-pinboard/ Thanks for creating it I am beyond flattered. Thank you so much!
frankspin Posted November 18, 2014 Author Posted November 18, 2014 Hey, this is awesome, but two things: First, any chance you could make it press return after entering the query in the cmd-k area? Second, I'm using the new beta of slack with several organizations. Could this possibly switch to the right org? Thanks so much for making this! Question 1: Open Alfred preferences and double click on the action for 'Run NSAppleScript'. It should be attached to the keyword 'slk'. Replace the Applescript with this: on alfred_script(q) tell application "Slack" to activate tell application "System Events" keystroke "k" using {command down} tell process "Slack" to keystroke (q as string) key code 36 end tell end alfred_script Question 2: The Slack API is still in beta form and needs to authenticate against each organization. There is no larger API that returns everything you're associated with. I might be able to whip something up, I just need some time to think it through.
mrgreen Posted March 2, 2015 Posted March 2, 2015 hey there great workflow, have been using it for several weeks now! awesome! +1 for automatic organization switch... would be enough to add a function to switch to the connected organization before the actual command for each request.
ryanwalker118 Posted May 13, 2015 Posted May 13, 2015 I had issues getting Slack to display properly if it was minimized or hidden in the background. Recommend trying something like this: on alfred_script(q) tell application "Slack" reopen activate end tell tell application "System Events" keystroke "k" using {command down} tell process "Slack" to keystroke (q as string) key code 36 end tell end alfred_script
frankspin Posted June 1, 2015 Author Posted June 1, 2015 Bumping this for those of you asking for multi team support as it's now available. A few caveats though: 1. Speed isn't the best for certain workflow options. I'll be working to improve 2. Getting support for teams within the desktop client is tough. Since I have no way of knowing the order your teams were added it's hard for me to build that functionality in. Until Slack offers proper deep linking with the client I wont be able to move forward there. 3. With #2 stated, the command `slk` isn't terribly effective with multiple teams since it's using the client. I left it in there for those who are on single teams.
Maddog Posted June 13, 2015 Posted June 13, 2015 Hey, Been using this for a few days, using mostly 'slk'. Very useful! Few things: 1. Both 'slim' and 'sls' don't work for me, as soon as I type the command, after I hit space, it just reverts to searching the default search engines. Not sure if I'm supposed to type username or the query, but neither seemed to work. 2. Sometimes someone messages me and I just want to quickly reply 'ok' or '2 min', how feasible is it to just type the name and quick message and send, without ever activating slack? If not feasible directly, would it be possible to use applescript to mimic this? Switch to user like 'slk', type the message, hit enter and then cmd+tab back to wherever I was before? Thanks! Great idea and execution!
YesThatAllen Posted June 14, 2015 Posted June 14, 2015 Has anyone made a workflow to take something from slack and send it to Things? Working with: http://support.culturedcode.com/customer/portal/articles/1625470-creating-to-dos-with-a-launcher
frankspin Posted June 18, 2015 Author Posted June 18, 2015 Hey, Been using this for a few days, using mostly 'slk'. Very useful! Few things: 1. Both 'slim' and 'sls' don't work for me, as soon as I type the command, after I hit space, it just reverts to searching the default search engines. Not sure if I'm supposed to type username or the query, but neither seemed to work. 2. Sometimes someone messages me and I just want to quickly reply 'ok' or '2 min', how feasible is it to just type the name and quick message and send, without ever activating slack? If not feasible directly, would it be possible to use applescript to mimic this? Switch to user like 'slk', type the message, hit enter and then cmd+tab back to wherever I was before? Thanks! Great idea and execution! 1. Try it but without hitting space after you enter a name or query. Admittedly what I'm doing isn't the fastest or most feasible solution so it can sometimes mess up or hang for a bit 2. Applescript is hard to use right now with multi-orgs since I cannot account for how they're set up. I asked the SlackAPI twitter about callback urls / deep linking in the desktop app and it's currently not there. Having it would make this kind of thing a lot easier to pull off. As for sending messages in general I want to eventually look into sending messages I just haven't had a ton of time to do so. I know it would be through Webhooks I just need to find sometime.
frankspin Posted June 18, 2015 Author Posted June 18, 2015 Has anyone made a workflow to take something from slack and send it to Things? Working with: http://support.culturedcode.com/customer/portal/articles/1625470-creating-to-dos-with-a-launcher You could probably add an additional modifier to the workflow that uses applescript. For example: if you use 'slf' you hold 'ctrl' while clicking a result you can have Applescript relaunch Alfred with '+' and paste in the result.
SCEMOS Posted June 20, 2015 Posted June 20, 2015 Great work, yet! I like the idea of sending Messages directly without using the Slack client. Instant Sending via API would be awesome!
nateswart Posted June 22, 2015 Posted June 22, 2015 I'm seeing the same behavior as Maddog above. Here's a quick clip to demonstrate as I'm not sure the suggestion solution works. Any tips? https://www.dropbox.com/s/tnvl6to9wlh4692/sls.mp4?dl=0 SCEMOS 1
frankspin Posted June 24, 2015 Author Posted June 24, 2015 I'm seeing the same behavior as Maddog above. Here's a quick clip to demonstrate as I'm not sure the suggestion solution works. Any tips? https://www.dropbox.com/s/tnvl6to9wlh4692/sls.mp4?dl=0 Can you open Alfred Preferences, go to the Slackfred workflow, turn on debugger and then run this. That may help me narrow down what is happening.
smarg19 Posted July 11, 2015 Posted July 11, 2015 (edited) Can you open Alfred Preferences, go to the Slackfred workflow, turn on debugger and then run this. That may help me narrow down what is happening. Hit the same problem. The issue is that the codebase is behind your GitHub code. The slackfred-search.py file attempts to import requests and then tries to use it once for a GET requests. The other time, you use the web.py module from the Alfred-Workflow library. Your GitHub code doesn't have this issue. All you need to do is update the Packal download with the up-to-date codebase. - - - PS. Nice workflow! Edited July 11, 2015 by smarg19
frankspin Posted July 22, 2015 Author Posted July 22, 2015 Hit the same problem. The issue is that the codebase is behind your GitHub code. The slackfred-search.py file attempts to import requests and then tries to use it once for a GET requests. The other time, you use the web.py module from the Alfred-Workflow library. Your GitHub code doesn't have this issue. All you need to do is update the Packal download with the up-to-date codebase. - - - PS. Nice workflow! Good catch! I just updated the workflow file to include the library. Can you give it another go? https://github.com/fspinillo/slackfred/blob/master/workflow/Slackfred.alfredworkflow smarg19 1
Maddog Posted August 26, 2015 Posted August 26, 2015 (edited) @frankspin - I tried with the updated file and still get the same problem. However today, I noticed that (sort of relevant) results flickered for a second before reverting back to default engine search (happened also before I updated). So it's doing something right before getting messed up (sls worked I think, not slim). Edited August 26, 2015 by Maddog
frankspin Posted September 1, 2015 Author Posted September 1, 2015 @frankspin - I tried with the updated file and still get the same problem. However today, I noticed that (sort of relevant) results flickered for a second before reverting back to default engine search (happened also before I updated). So it's doing something right before getting messed up (sls worked I think, not slim). Can you open the debug menu and run slim? I should clarify a bit more, but when using slim it should be used with their chat name and not their real name. So if your real name is John Doe but your chat name is Maddog, search for maddog.
frankspin Posted November 10, 2015 Author Posted November 10, 2015 Hey everyone, this now supports sending messages to channels. Give it a shot and let me know what you think!
pasteur Posted November 11, 2015 Posted November 11, 2015 Somehow workflow does not work for me. When I type "sl" alfred shows me many available Slack options. However, when I continue and add 'k' to have 'slk' then Alfred only provides me an option of searching 'slk' on google. Am I missing some setup step?
frankspin Posted November 12, 2015 Author Posted November 12, 2015 Somehow workflow does not work for me. When I type "sl" alfred shows me many available Slack options. However, when I continue and add 'k' to have 'slk' then Alfred only provides me an option of searching 'slk' on google. Am I missing some setup step? Thanks. Somehow all the files got overwritten. I'm updating it now.
bongaards Posted November 18, 2015 Posted November 18, 2015 I'm using Slackfred and Things by Cultured Code. I want to publish a selected task with tag from Things into Slack after a shortcode. (cmd+shift+s) How to do this with AppleScript and Slackfred? I select a task in Things Shortcode (cmd+shift+s) will trigger Slackfred with custom code The task with tag(s) are published in Slack Someone made this code for me, but he doesn't have Alfred Powerpack, so he can't make workflows. tell application "Things" set selectedToDo to the first selected to do tell selectedToDo set theToDoTitle to the name set theToDoTags to name of tags end tell end tell return {theToDoTitle, theToDoTags} I have no experience as a developer. How to do this?
pasteur Posted November 20, 2015 Posted November 20, 2015 Thanks. Somehow all the files got overwritten. I'm updating it now. It works now. Awesome workflow, thanks!
scottdhead Posted December 2, 2015 Posted December 2, 2015 Hi there, this tool is great. Thanks for making it. I'm a total noob with scripts and such. How would I trigger the screensaver at the same time as setting my presence to "away"?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now