Google Now and Trello integration you'll love

I had a problem once. Pretty simple one. I needed to manage my shopping list, but in an efficient way. When I run out of something, I want to be able to add it to my buy list pretty fast. In last couple of months Google Now received a lot of attention and I started to use it more and more. Then I found out that you can set up (location based!!) reminders in Google Keep with “remind me …” command. But I wanted more. Something universal.

I’ve also used Trello for a while and started to google how to integrate my Android device (and mostly Google Now) with Trello. And I’ve found a way I love. You’ll need couple of paid apps but they’re worth it. Here is how to make your life easier with Tasker, Trello and Google Now.

Setting up AutoVoice and Tasker

Our goal here is to create new card in our private Trello’s board in “to buy” list. First you need to filter search query in Google Now on specific command (e.g. “buy a car” - “a car” would be then added to Trello).

Install Tasker and Autovoice plugin. Go to Autovoice application and enable integration with Google Now - keep it only for voice. From now you don’t need to touch anything else in Autovoice (unless you want to explore it further).

In Tasker we’ll create a profile by pressing plus in the bottom of profile tab. Search for autovoice recognized event and add it to your new profile. Now we need to configure it by selecting the pencil in the top right corner. First you need to enable event based behaviour so it automatically disables profile after a while. Then you need to enter a command filter which we’ll use as a trigger pattern. In my case it’s “kúpiť” (“to buy” in English). If this word is matched in command recognized by Google Now, profile will get active and given tasks will be run.

Right now you’ve got your command recognized and profile active. You only need to create tasks which will push the remaining values to Trello.

Integrating with Trello via RESTask

We’ll be using Trello REST API to communicate with Trello. If you’ve already generated app key and token before, you can skip to next part. If not, bear with me for a while.

To communicate with Trello API you need to have your own app key . It will be assigned to your account, so you need to be logged in by now. Once you’re logged in you can generate it here. The other thing we’ll need is token for authenticating you as a user in Tasker’s call. You can generate on by visiting this URL (replace your app key):

https://trello.com/1/authorize?key=PUTAPPKEYHERE&name=yourname-tasker&expiration=never&scope=read,write

Confirm the request and grab your token from response. It will never expire, but you can always revoke it’s access within your account so it’s safe. Last thing we’ll need for Tasker is ID of the list you want to use for this command. We’ll use REST API again and we’ll need app key, token and boardId. You can acquire boardId by visiting your board in the browser - it’s the bold part of following example URL: https://trello.com/b/abcdef/#home.

https://api.trello.com/1/boards/YOURBOARDID/lists?token=YOURTOKEN&key=YOURAPP_KEY

Find your board by it’s name (e.g. “to buy”) and grab it’s id. We now have all the necessary data, let’s back to Tasker.

For next part you’ll need to download RESTask plugin for Tasker. I highly recommend to also install AirDroid or some other tool which will help you copy key and token to your device. You don’t want to enter that manually.

Create new task in Tasker and add only one command - RESTask which will communicate with Trello REST API. Once added, go to configuration and use following set up:

REQUEST:
method: POST
url: https://api.trello.com/1/cards
PARAMS:
idList: YOUR_LIST_ID
token: YOUR_TOKEN
key: YOUR_APP_KEY
name: %avcommfilter

Don’t forget to save it by floppy icon, this one is not being saved automatically. You can test the task by pressing play icon - it sends variable name instead of real command but you at least know whether it works or not.

Conclusion

Using this only for buy list would be probably overkill, but you now have an idea how to create set of very own commands that can be communicating with any kind of external service via API. And that’s something. Have fun and enjoy.

#references