Jump to content

Recommended Posts

This workflow lets you interact with your account on Toggl (so, you know, you have to already have an account at toggle.com). It provides a fairly basic level of access; you can view time entries for the past few days (the Toggl API default), start/continue and stop entries, add projects, and generate some basic in-Alfred reports.

 

Note: For the most up to date usage notes, release info, etc., please hop over to the workflow's page on GitHub.
 
Usage

The main keyword is tgl -- that will get you the list of available commands. When you first use the workflow, there's just a login command. After you login more commands will become available.

  • timers - List, create, and modify time entries.
  • projects - List, create, and modify projects.
  • tags - List the available tags.
  • report - Get a summary report for today, yesterday, or the current week. The report is grouped by project; tab into them to see times for tasks.
  • sync - Grab the most current data from toggl.com
  • logout - Logout of toggl.com
  • reset - Clear out all local config data and cache

This workflow works well in conjunction with the TogglDesktop application.

 

Download
 
Source

 

For current update status, please see the workflow's release page on GitHub.

 

Update 2016-04-15

 

The GitHub page is the best place to see the status of this workflow, and is the place to file issues. Head over to the Releases page on GitHub to grab the latest release.

 

Update 2015-01-02

 

A new release is out with improved support for projects and tags.

 

Update 2014-11-22

 

Well, after using Toggl for a year or two, I feel like I have a better idea of what to do with it. This version adds some new features (project support, at last!) and some general improvements (faster, easier to understand commands). I've also come up with some better (to me) ways of writing UIs with Alfred, and I got tired of the lag introduced by Python, so this is a total rewrite. Let me know what you think.

 

Update 2013-11-29
 
I just pushed a couple of updates. There is now a command to quickly stop the current timer, and the workflow maintains project IDs when continuing tasks.

Edited by jason0x43

Share this post


Link to post

Just wanted to say huge thank you for this workflow. It works soo nicely (much better than the other one).

 

Now if i could find a quality Task workflow like this, i'd be in heaven. Perhaps i'll try to make one with the Todoist API and model it after this source :)

Share this post


Link to post

I'm not sure where you prefer issues to be posted, but i created a ticket https://github.com/jason0x43/jc-toggl/issues/1

 

It would be nice if this preserved Toggl's continue functionality properly, allowing Projects to still be linked to continued tasks :)

 

It's easier to handle feature requests and bugs through Github. I saw your ticket; it shouldn't be too hard to add project support for tasks.

Share this post


Link to post

Cheers - this is a great workflow - though how do you get your notifier app running in the menu bar?

 

I added the workflow to alfred, no problem, but don't see anything in the menu bar - and the github code doesn't really have an executable app ?

 

Thanks!

Share this post


Link to post

Cheers - this is a great workflow - though how do you get your notifier app running in the menu bar?

 

I added the workflow to alfred, no problem, but don't see anything in the menu bar - and the github code doesn't really have an executable app ?

 

Thanks!

 

Wow, I totally missed this comment. Sorry about that...

 

Anyway, the notifier project is separate from the Alfred workflow. You can get the notifier by downloading the prepackaged workflow (big grey "Download" button on the Github page; this is the easiest thing to do) or by cloning and compiling the notifier project yourself.

Share this post


Link to post

I just pushed out a couple of updates to the workflow. One of them adds a new "toggl." command to quickly stop the current timer (thanks to @donners). It's a bit faster than the normal method since you don't have to wait for the timer list to load.

 

The other update adds some very basic project support to the workflow. Specifically, continuing a timer will maintain its project ID (if it had one).

 

There's an issue on github for adding a slightly more extended syntax to allow projects and tags to be specified when starting or continuing timers. Does anyone have any thoughts/preferences?

Share this post


Link to post

Very useful workflow! Thanks for sharing.

 

Two feedbacks:

 

- What are the two actions modifiers (alt/ctrl) supposed to do?

 

- I typed "tgl timer" -> toogled fallback searches. And got this error: 

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:32 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/10 08:47:32 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/10 08:47:32 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751}
2014/12/10 08:47:32 loaded cache
2014/12/10 08:47:32 args: []string{"./alfred-toggl", "tell", ""}
2014/12/10 08:47:32 op: 'tell'
2014/12/10 08:47:32 kind: ''
2014/12/10 08:47:32 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751}
2014/12/10 08:47:33 loaded cache
2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "t"}
2014/12/10 08:47:33 op: 'tell'
2014/12/10 08:47:33 kind: 't'
2014/12/10 08:47:33 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751}
2014/12/10 08:47:33 loaded cache
2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "ti"}
2014/12/10 08:47:33 op: 'tell'
2014/12/10 08:47:33 kind: 'ti'
2014/12/10 08:47:33 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751}
2014/12/10 08:47:33 loaded cache
2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "tim"}
2014/12/10 08:47:33 op: 'tell'
2014/12/10 08:47:33 kind: 'tim'
2014/12/10 08:47:33 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751}
2014/12/10 08:47:33 loaded cache
2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "time"}
2014/12/10 08:47:33 op: 'tell'
2014/12/10 08:47:33 kind: 'time'
2014/12/10 08:47:33 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 2: 2014/12/10 08:47:33 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/10 08:47:33 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/10 08:47:33 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751}
2014/12/10 08:47:33 loaded cache
2014/12/10 08:47:33 args: []string{"./alfred-toggl", "tell", "timer"}
2014/12/10 08:47:33 op: 'tell'
2014/12/10 08:47:33 kind: 'timer'
2014/12/10 08:47:33 query: ''
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x6d60]

goroutine 16 [running]:
runtime.panic(0x2e8880, 0x4d6284)
	/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/panic.c:279 +0xf5
main.TimerFilter.Items(0xc2080932b0, 0x6, 0x0, 0x0, 0xc208028ea0, 0x1, 0x1, 0x58aee8, 0xc20800fdd0)
	/Users/jason/Documents/Programming/go/src/github.com/jason0x43/alfred-toggl/main.go:425 +0x3390
main.TimerFilter.Items·i(0x0, 0xc2080932b0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	<autogenerated>:18 +0x90
github.com/jason0x43/go-alfred.(*Workflow).Run(0xc20809fe00, 0xc2080b5e98, 0xb, 0xb)
	/Users/jason/Documents/Programming/go/src/github.com/jason0x43/go-alfred/main.go:135 +0xbd0
main.main()
	/Users/jason/Documents/Programming/go/src/github.com/jason0x43/alfred-toggl/main.go:75 +0xb7c

goroutine 19 [finalizer wait]:
runtime.park(0x27d20, 0x4d98b0, 0x4d8349)
	/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x4d98b0, 0x4d8349)
	/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
	/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
	/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1445

goroutine 17 [syscall]:
runtime.goexit()
	/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1445

Share this post


Link to post

 

- What are the two actions modifiers (alt/ctrl) supposed to do?

 

- I typed "tgl timer" -> toogled fallback searches. And got this error: 

 

The alt and ctrl connections currently don't do anything, they're just there to prevent my generated menu items from being targets of the global ctrl and alt modifiers.

 

Drat, just when you think you've rid yourself of pointer uses...  I'll look into it.

Share this post


Link to post

Perhaps I don't understand how it works, but I seem to be getting "Error: Unknown command ''" a lot.

For example, when I type "tgl project" it still shows the "tgl" icon, but as soon as I make it "tgl projects" the command just disappears. So no option to add a project and the same goes for tags.

When I do "tgl sync" followed by a return I get the "Error: Unknown command ''" again.

Am I doing something completely wrong?

The console shows a huge amount of errors without any error message btw:

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:10 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/25 12:04:10 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/25 12:04:10 loaded config: {316397782fb522ae3a43b76ba057bba0}
2014/12/25 12:04:10 loaded cache
2014/12/25 12:04:10 args: []string{"./alfred-toggl", "tell", "p"}
2014/12/25 12:04:10 op: 'tell'
2014/12/25 12:04:10 kind: 'p'
2014/12/25 12:04:10 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:11 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/25 12:04:11 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/25 12:04:11 loaded config: {316397782fb522ae3a43b76ba057bba0}
2014/12/25 12:04:11 loaded cache
2014/12/25 12:04:11 args: []string{"./alfred-toggl", "tell", "pr"}
2014/12/25 12:04:11 op: 'tell'
2014/12/25 12:04:11 kind: 'pr'
2014/12/25 12:04:11 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:11 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/25 12:04:11 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/25 12:04:11 loaded config: {316397782fb522ae3a43b76ba057bba0}
2014/12/25 12:04:11 loaded cache
2014/12/25 12:04:11 args: []string{"./alfred-toggl", "tell", "pro"}
2014/12/25 12:04:11 op: 'tell'
2014/12/25 12:04:11 kind: 'pro'
2014/12/25 12:04:11 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:24 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/25 12:04:24 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/25 12:04:24 loaded config: {316397782fb522ae3a43b76ba057bba0}
2014/12/25 12:04:24 loaded cache
2014/12/25 12:04:24 args: []string{"./alfred-toggl", "tell", "projects "}
2014/12/25 12:04:24 op: 'tell'
2014/12/25 12:04:24 kind: 'projects'
2014/12/25 12:04:24 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:26 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/25 12:04:26 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/25 12:04:26 loaded config: {316397782fb522ae3a43b76ba057bba0}
2014/12/25 12:04:26 loaded cache
2014/12/25 12:04:26 args: []string{"./alfred-toggl", "tell", "projects"}
2014/12/25 12:04:26 op: 'tell'
2014/12/25 12:04:26 kind: 'projects'
2014/12/25 12:04:26 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:27 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/25 12:04:27 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/25 12:04:27 loaded config: {316397782fb522ae3a43b76ba057bba0}
2014/12/25 12:04:27 loaded cache
2014/12/25 12:04:27 args: []string{"./alfred-toggl", "tell", "project"}
2014/12/25 12:04:27 op: 'tell'
2014/12/25 12:04:27 kind: 'project'
2014/12/25 12:04:27 query: ''
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2014/12/25 12:04:28 Using config file Workflow Data/com.jason0x43.alfred-toggl/config.json
2014/12/25 12:04:28 Using cache file Workflow Data/com.jason0x43.alfred-toggl/cache.json
2014/12/25 12:04:28 loaded config: {316397782fb522ae3a43b76ba057bba0}
2014/12/25 12:04:28 loaded cache
2014/12/25 12:04:28 args: []string{"./alfred-toggl", "tell", "projects"}
2014/12/25 12:04:28 op: 'tell'
2014/12/25 12:04:28 kind: 'projects'
2014/12/25 12:04:28 query: ''
Edited by wolph

Share this post


Link to post

Perhaps I don't understand how it works, but I seem to be getting "Error: Unknown command ''" a lot.

For example, when I type "tgl project" it still shows the "tgl" icon, but as soon as I make it "tgl projects" the command just disappears. So no option to add a project and the same goes for tags.

When I do "tgl sync" followed by a return I get the "Error: Unknown command ''" again.

Am I doing something completely wrong?

 

 

You've been able to login, so we're starting out well. The fact that the 'projects' command causes the tgl list items to disappear can indicate that an error has occurred or that you don't have any projects. (Yes, not the most helpful output ever.) Project creation through the workflow isn't yet available but should be in the next day or so.

 

To sync with toggle.com, type 'sync' and wait for a second or two. The item title will switch to 'Synchronized!' if syncing was successful. (The 'sync' command isn't meant to be actionable; that will be fixed in a future release.) If that works, you're successfully retrieving data from toggl.com.

Share this post


Link to post

Tried the lasted version (1.1.0) from Packal. And got this error : 

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 2015/01/05 11:11:30 Using config file /Users/user/Library/Application Support/Alfred 2/Workflow Data/com.jason0x43.alfred-toggl/config.json
2015/01/05 11:11:30 Using cache file /Users/user/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.jason0x43.alfred-toggl/cache.json
2015/01/05 11:11:30 loaded config: {ec6de4eadf2b2e243b4cc304e3b55751 false}
2015/01/05 11:11:30 loaded cache
2015/01/05 11:11:30 args: []string{"./alfred-toggl", "tell", "timers"}
2015/01/05 11:11:30 op: 'tell'
2015/01/05 11:11:30 kind: 'timers'
2015/01/05 11:11:30 query: ''
Edited by politicus

Share this post


Link to post

If by output, you mean "what do I see when I type the workflow's keyword", I see that everything looks like to be working well  :)

I can use every feature of the workflow.

Case closed?

Share this post


Link to post

If by output, you mean "what do I see when I type the workflow's keyword", I see that everything looks like to be working well  :)

I can use every feature of the workflow.

Case closed?

 

 

Yes, it sounds like it's working as intended.

Share this post


Link to post

@jason So, I think I've updated to the new version of your Toggl workflow. It now uses the 'tgl' keyword, right? It seems to me like your other version was better (i.e., easier to understand). Why the change? Also, what happened to the menubar notification component?

Share this post


Link to post

@jason So, I think I've updated to the new version of your Toggl workflow. It now uses the 'tgl' keyword, right? It seems to me like your other version was better (i.e., easier to understand). Why the change? Also, what happened to the menubar notification component?

 

Yes, it uses the 'tgl' keyword. I actually designed this version to be generally easier to pick up than the original. The previous version was simpler to use when creating timers, but I wasn't a huge fan of using sigils to specify tags and projects. I opted instead to go for a menu-driven workflow instead, which isn't quite as fast when you just want to start a timer (although tab-completion still keeps things pretty quick), but it makes it more straightforward to present lists of projects and tags and such. It's also much easier to advertise new functionality when everything's a visible menu option vs an implicit part of a data entry language.

 

I stopped updating the notification component in favor of Toggl's own TogglDesktop client. Aside from being more generally useful, their client keeps a persistent, live connection open to toggl.com, so it's more reliable than the menubar component.

Share this post


Link to post

Yes, it uses the 'tgl' keyword. I actually designed this version to be generally easier to pick up than the original. The previous version was simpler to use when creating timers, but I wasn't a huge fan of using sigils to specify tags and projects. I opted instead to go for a menu-driven workflow instead, which isn't quite as fast when you just want to start a timer (although tab-completion still keeps things pretty quick), but it makes it more straightforward to present lists of projects and tags and such. It's also much easier to advertise new functionality when everything's a visible menu option vs an implicit part of a data entry language.

 

I stopped updating the notification component in favor of Toggl's own TogglDesktop client. Aside from being more generally useful, their client keeps a persistent, live connection open to toggl.com, so it's more reliable than the menubar component.

 

Thanks for the reply. So, almost immediately after posting my question(s) to you, I started using the Toggl desktop client. I would have to agree with you. It's great. Still some solid workflow work though. Much appreciated.

Share this post


Link to post

Hello,

 

I was happy to find a Workflow for Toggl here!

 

Unfortunatly I cannot authenticate using my Email or API token. When I enter "tgl" for the first time, I have 2 options:

 

login - Login to toggl.com

token - Manually enter toggle.com API token

http://note.io/173LzmB

 

I'm sure that I have entered the correct credentials / token. Please note, that I am using the free-plan on toggle.com

 

But the workflow keeps requesting Login or Token.

 

Any idea what went wrong and how I can get it running correctly?

 

Thank you!

 

Sascha

Share this post


Link to post

Hello,

 

I was happy to find a Workflow for Toggl here!

 

Unfortunatly I cannot authenticate using my Email or API token. When I enter "tgl" for the first time, I have 2 options:

 

login - Login to toggl.com

token - Manually enter toggle.com API token

http://note.io/173LzmB

 

I'm sure that I have entered the correct credentials / token. Please note, that I am using the free-plan on toggle.com

 

But the workflow keeps requesting Login or Token.

 

Any idea what went wrong and how I can get it running correctly?

 

Thank you!

 

Sascha

 

Could you try pasting some debug info here? Open Alfred's preferences, select "Workflows" at the top of the dialog, select the Toggl workflow, then click the little "bug" icon in the upper right part of the workflow area. A console pane should pop up in the bottom of the preferences dialog. Try logging into toggl through the workflow, then copy and paste the console output into this thread. There shouldn't be any sensitive information in the console output, but glance through it before posting, just to make sure.

Share this post


Link to post

Thank you Jason for an excellent workflow.

 

I wish I'd known you'd updated it sooner!  It wasn't until today while telling my business partner about it I notice the new version.  It's great!  Hurray for project support!.

 

Project support in the workflow means I can finally use projects in toggl and that in turn means I'll finally be motivated enough to work out an API integration between Toggl and our (home built / bespoke) time card and invoicing system.  Yay! no more manual entry between things is coming soon.

Edited by jb510

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...