Pushing Podio

Fun Experiments pushing Citrix Podio to the limit so you can get more done.
... with a little help from GlobiFlow, ProcFu, and other friends ...

Android Quick Podio Entry

- Posted in Uncategorized by

As much as mobile phones have promised to make life easier and more productive, they're a pain to use.

I was frustrated with how cumbersome it is to get a basic note into Podio. Sometimes you just want to click a button, speak a sentence, and be done.

Not click, nagivate, tpye, correct, type, click, wait, etc.

As a small experiment, I created my first Android app to do just that.

It's called vNote and you put the app right on your homescreen.

Hit the icon, and Google starts listening.

Say something important and put the phone back in your pocket.

Seconds later, a task appears in Podio.

Note: I just happened to choose creating a task as the default action. You can set this up to create an item or do anything else in Podio that GlobiFlow can do.

How to set this up

First, download and extract vNote from this link

Next, install the APK from that ZIP file on your phone. You may need to allow insecure sources first. Here's a nice tutorial on sideloading APK's into Android.

Sorry for the complex install, but I have not navigated the Google Play store yet to get vNote listed there.

Once installed, add it to your homescreen for easy access.

Now head on over to your GlobiFlow account and create a new Webhook Flow.

Take particular note of the the ID in the URL for this flow.

Next, open up vNote on your phone. The settings page should come up automatically on first install, but if not, just click on the settings button.

This will allow you to enter the URL of the GlobiFlow hook, as well as select an option to let you confirm the text before sending it, or just sending it without confirmation.

Once configured, run the app and dictate something. Anything. Doesn't matter what. We just want some payload to go to GlobiFlow so that we can complete the Webhook flow there.

After sending a note, clicking the "refresh" link in your flow should show you a payload with the variable "v".

You should now be able to use this "v" variable as a token to perform any action you want.

Here's my create task action.

If you instead want to create an item, just use a create item action.

Pushing the Limits

Of course, this is not the end. You could, if you were so inclined, base your actions on voice commands.

For example, you could use the first word to describe what you want to do, and then use the rest of the note as the payload.

Some examples:

  • "to do remember the milk"
  • "note new laptop set up as 192 168 1 75"
  • "text Mary I'm on my way"

Now, you could chain together a lot of if-then blocks in GlobiFlow, but using a custom functon in ProcFu is a lot more powerful and a lot easier.

Here's a concept code block:

/*
 * VNOTE DEMO
 * "to do remember the milk"
 * "note new laptop set up as 192 168 1 75"
 * "text Mary I'm on my way"
 */

$text = strtolower($pf_payload);

// to do = create a task
if ( substr($text,0,6) == "to do " ) {
    $task = substr($pf_payload, 6);
    call_pf_script("podio_task_create.pf", ["task_name" => $task, "responsible" => "andreas@globi.ca", "due_date" => date("Y-m-d")]);

// note = new note item
} elseif ( substr($text,0,5) == "note " ) {
    $note = substr($pf_payload, 5);
    call_pf_script("podio_item_create.pf", ["app_id" => 12688467, "fields" => ["title"=>$note]]);

// text = send sms - expect name to be the second word
} elseif ( substr($text,0,5) == "text " ) {
    $name = explode(" ", $text)[1];
    $message = preg_replace("/(^.*?\s.*?\s)(.*)/", "$2", $pf_payload);
    $addresses = ["mary"=>"+15555781698", "john"=>"+1555786458", "susan"=>"+15556348"];
    $url = "https://rest.clicksend.com/v3/sms/send";
    pf_include("secrets");
    if ( isset($addresses[$name]) ) {
        $json = json_encode(["to"=>$addresses[$name], "body"=>$message]);
        call_pf_script("remote_curl.pf", ["url" => $url, "method" => "POST", "headers" => $secret_sendgrid_headers, "values" => $json]);
    } else {
        $message = "could not text ".$name;
        $json = json_encode(["to"=>"+15559864265", "body"=>$message]);
        call_pf_script("remote_curl.pf", ["url" => $url, "method" => "POST", "headers" => $secret_sendgrid_headers, "values" => $json]);
    }

// fallback - if all else fails create a task
} else {
    call_pf_script("podio_task_create.pf", ["task_name" => "WTF? ".$pf_payload, "responsible" => "andreas@globi.ca", "due_date" => date("Y-m-d")]);
}

The point is that what you can do here is almost endless.

Resources

vNote APK

Comments