Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by frankspin

  1. Seeing errors for ZSFNote as it pertains to the SQL databases
  2. Just re-uploaded the file to Packal and my GitHub. Please try again!
  3. If you're having trouble getting the workflow to work and you're on V2 I am currently working on a solution. The issue is related to exporting a workflow from V3 and trying to have it run on V3.
  4. What version of Alfred are you running? If you turn on debug mode does it show any errors?
  5. Can you give more concrete examples? What commands are failing? Are you putting any queries with them? That kind of stuff
  6. Just pushed a fix to GitHub and packal. There was a key error but it should be fixed. Let me know. Can you specify what's not working?
  7. This should be in the workflow already. Make sure you have the latest version.
  8. Feel free to add it. The current functionality for sending messages to channels isn't ideal, but it gets the job done. When I started working on this I had a lot more free time, but since my time has been a bit limited. My hope/plan was to implement some kind of DB or text file feature so that an API request wasn't required every single time and you can more easily navigate your stuff. It's just a time thing for me.
  9. Thanks. Somehow all the files got overwritten. I'm updating it now.
  10. Hey everyone, this now supports sending messages to channels. Give it a shot and let me know what you think!
  11. 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.
  12. 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
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. That all makes sense. Thanks for the tips!
  18. Thanks for the feedback. I'll go through and make some adjustments. For some reason that search query was not working under .web so I was using requests It will return 'ok': False but I use some of the info in the auth check in the results I'm returning. The normal calls don't return data like team name so I have to make that call anyway I had a feeling this might look bad. I was splitting them with the intention of eventually trying to turn some of it into a wrapper to learn OOP a bit. I realize iterating through a loop for each key probably isn't the best idea and in some cases speed would be a huge help. I'll have to look into how to properly do threading.
  19. Woo, haven't posted here in a bit. Just to follow up to the multiple keys question I asked a while back, I did come up with a solution. It involces saving each key comma seperated, then splitting them out. Not the most ideal solution, but it's working for me. A situation I'm running into now though is properly iterating through my for loops. In every other work flow this is working fine, but I think because this one is relying on a search endpoint it's hanging me up. What I'm trying to do is let someone enter a search query, get the results, then display all the results. For some reason it's only displaying 1, then after a few seconds updates to show the last result. I can't seem to figure out why it's only showing the one. I've tried using sleeps to prevent it from querying the search before someone finishes, but that isn't working. import sys import argparse import requests from workflow import Workflow, web, PasswordNotFound def slack_keys(): wf = Workflow() try: slack_keys = wf.get_password('slack_api_key') except PasswordNotFound: wf.add_item(title='No API key set. Please run slt', valid=False) wf.send_feedback() return 0 keys = slack_keys.split(",") return keys def search_slack(keys, query): wf = Workflow() search_results = [] for key in keys: api_key = str(key) slack_auth = web.get('https://slack.com/api/auth.test?token=' + api_key + '&pretty=1').json() if slack_auth['ok'] is False: wf.add_item('Authentication failed.' 'Try saving your API key again', valid=False) wf.send_feedback() else: results = requests.get('https://slack.com/api/search.messages?token=' + api_key + '&query=' + query + '&count=10&pretty=1').json() if results['messages']['total'] > 0: for result in results['messages']['matches']: if result['type'] == 'message': search_results.append({'text': result['text'], 'channel': result['channel']['name'], 'user': result['username'], 'team': slack_auth['team'], 'link': result['permalink']}) else: search_results.append({'text': 'False', 'team': slack_auth['team']}) return search_results def main(wf): parser = argparse.ArgumentParser() parser.add_argument('query', nargs='?', default=None) args = parser.parse_args(wf.args) query = args.query search_results = search_slack(keys=slack_keys(), query=query) for results in search_results: if results['text'] == 'False': wf.add_item(title='No search results found', subtitle=results['team'], valid=False) else: wf.add_item(title=results['text'], subtitle='%s - %s - %s' % (results['user'], results['channel'], results['team']), arg=results['link'], valid=True) wf.send_feedback() if __name__ == u"__main__": wf = Workflow() sys.exit(wf.run(main))
  20. I use it with Airmail 2 pretty regulary. Can you describe what's happening?
  21. I get that, and I've used them in workflows, but I'm referring to making this all seemless when building out the remote features. I'm speaking specifically to the part where you do add in the Remote trigger.
  22. I should have expanded further, but I mean how with some workflows you have to hit enter to finish whatever it's doing. An example would be with Pinboard: you can search, but you need to highlight the item and hit enter. It's not so much for triggering them via a script, but for allowing more interaction with workflows that use them. IE: After searching for an item in Pinboard holding ctrl would delete it instead of opening it
  23. First off let me start by saying congratulations to the Alfred team for getting this shipped. I wasn't expecting this level of completion for v1, but it's pretty well stocked. Now for the feedback: Receving user input via the iOS app would be hugely beneficial. For example in my Slack worflow I let people set status with 'active' or 'away', but can't allow this input in the app. If I walk away from the computer it'd be great to set that status without having to go back. Simulating key press (enter/cmd/ctrl) would also be pretty great, but understand there could be limitations I noticed if you build a remote trigger, add it to "Remote" and then rename it the trigger wont work anymore. I think it'd be ideal if names and adjustments were reflected without needing to add/remove. Pie in the sky request here but the ability to have workflows output back to the app/phone. Example: In my Digital Ocean workflow it checks status and returns some stats. My thinking is rather than just display it in the desktop, you can modify an output to format the results back to the app. Again, the idea being running certain workflows while away from the computer for an extended period of time.
  24. Slack requires a seperate token for each organization you're part of. I'd like to allow people to enter multiple tokens via alfred versus requiring them to edit a file. I think based on your example, I have figured out a way to do this. Thanks
  • Create New...