DEV Community

loading...
Cover image for Track time you spent on your projects using your #Voice

Track time you spent on your projects using your #Voice

denisvalasek profile image Denis Valášek Originally published at blog.valasek.dev ・3 min read

Why?

If you are a freelance developer, you probably have to track your time for the projects you do - or perhaps you just want to know, how long did you work on your side project, that you never finished. But keeping some app open all the time and keeping the entries in sync is a bit of a hassle and distracting. I was facing the same problem, so I decided to solve it with my favorite interface - Voice!

Alt Text

Solution

I have created Action for Google Assistant called Tracker for Toggl. Why Toggl? Because while voice is great, voice app itself is not enough for timetracking, you probably want web access, fancy reports and mobile app too. Toggl is a time-tracking app, which is available for free, so I picked it as a "backend" for the Action.

How does it work? Google Assistant offers Actions on Google platform, which you can use to build your own conversational experiences, where you take full control over what the user says and how you respond.
That means you have to understand, what the user says. I use Dialogflow to do the NLU and Firebase Cloud Functions for fulfillment and web hosting.

Showcase

There are several ways, how you can try the Action out! If you have a Google Assistant enabled device - like Google Nest Mini or Home Hub, you can say "Hey Google, talk to Tracker for Toggl", which will get you talking with the Action! Or if you are on the computer, use the Assistant Directory (Google Play version for voice apps) to send it easily to your phone or smart speaker.

At the launch, you are welcomed with initial introductions and an opportunity to sign in with your Toggl API Token, which is used for communication between Action and Toggl.

Welcome message

Now, if you are using a smart speaker or display, you will be redirected using notification to perform the sign in using web popup. You enter the token, it will verify that it is actually token for your account and hurray, back to the Action! Don't worry, you have to sign in only once.

Login page

Now you can access all features that the Action has to offer + your previous entries, projects, and workspaces are also available!

The simplest thing you can do is to start tracking, lets try it out by saying "Start tracking Writing an article for project Toggl Action".

Several things have to happen here. First, the NLU has to recognize the intent itself - to start new time tracking. After that, there are 2 Slots to extract. First is the name of the task "Writing an article" and second is "Toggl Action", which will get matched to users projects.

Success!

Now that tracking is running, we can confirm in Toggl web app that it's working! So you can combine webapp and the Action, whenever you need it.

Sync with Toggl

And we can easily stop it, by saying "Hey Google, ask Tracker for Toggl to stop tracking" anytime.

You can also get reports, so for example, if you want to know how long did you work today, you can just ask.

Report today

Of course, you can choose different time intervals or even filter by specific projects. Let's follow up by saying "And past month?".

Month report

Here we have a wider variety of tasks, so we get a nice sum up. You can filter this more with projects and workspaces.

Few other things you can do:

  • Hey Google, ask Tracker for Toggl to start tracking Testing (go right to the task)
  • Continue last tracking
  • Get name and project for current tracking
  • Set description/project/tags after the tracking has started
  • Get help any time, to get you back on track
  • and some easter eggs.. :)

You can check out the full feature list at the Tracker for Toggl web!

The project is still in the early phase and I would appreciate any feedback, thanks for reading!

Discussion (0)

pic
Editor guide