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 ...

API Integration Part 2: User Management

- Posted in Uncategorized by

If you've made it through the first part of this tutorial, you should know how to connect an API to ProcFu and the general method by which we call the API based on a user ID.

If you're the only user in your Podio system, or if you intend to make API calls on behalf of only one user, then you can use the same user ID in all your flows. However, if you're planning on making calls on behalf of multiple users, it would make the process easier by having a system that handles the authorization process and then gives you a database of IDs to search.

To perform this process, I have created an App Pack in the Podio App Market, the ProcFu API Integrator. All you need to do is install this pack into the workspace of your choice and then perform a couple of quick extra installation steps.

  1. After you have refreshed GlobiFlow and the flows have installed, there are two flows (the one in APIs and the one in Users) that involve ProcFu calls, but the headers are without auth info. If you haven't already done so, sign up for a Procfu account, get your API key and place Authorization: Basic {API_KEY} in the header of every GlobiFlow POST action in both flows. This is actually made much easier if you install and setup the ProcFu Chrome Extension first. Then, all you have to do is open the flow and save it again.
  2. Open up the "01" flow in both Approvals and Denials and fix the broken tokens for the External URLs.

The first step after install is to set up an API in both Podio and ProcFu. I've attempted to make this easier as well by starting a repository in the ProcFu Users workspace. This repository will be expanded over time and will contain all the info you need to add to ProcFu to start using the API. By including the corresponding slug when adding a new item in your APIs App, it will automatically populate the item with all the URLs you need. After this, it's a simple matter of copying and pasting them into ProcFu.

Now that you have an API ready to go, you can add your first user. All of the fields in the Users app are required. I would suggest the following format for best results:

  • The User Name should be the Podio user's display name, making it easier to search for it using triggers such as Revision Creator Name or Item Creator Name, or a Podio Contact field.
  • The User ID must contain an email address and should be the email address of the Podio user.

Once you have created a new user item, a login link will be generated and added as a comment, after which the item will be shared with the email used as the user ID. After clicking the link, the user will be directed to the service to approve or deny, then redirected to a GlobiFlow external URL which will update Podio with the result.

Once the user is authorized, you simply need to write a flow that uses ProcFu to make an API Request and use the correct user ID.

That's it! There are a few APIs in the repository already, but if you find one that we should add, drop me a line in the workspace.


Andrew Cranston is the CTO of We Are Gamechangers.

Comments