Tasks may be the best thing about Podio. Especially since you can connect any content (status updates, files, app items) to a task and have all the important information right in front of you just when you need it. You can always connect automatic tasks to a new app item. However, sometimes you might want to have a new task added upon specific changes, for example when the status in the item changes from one state to another. That’s when Podio’s terrific API comes in.
Disclamer: While the functionality in this article should be of interest to all Podio users, you need basic understanding of PHP to execute it.
At Elvenite we use Podio for all kinds of activities; CRM, event planning, discussion boards, even the employee exercise benefits are calculated and tracked. But our most evolved workspace is our recruitment workspace. Recently we took our first step in implementing “event-based” tasks for some of the apps in this workspace. We use web hooks and the Podio PHP API Library to create auto tasks triggered by the following:
- New applicant through web form or by e-mail
Whenever a new applicant sends his or her resume to us by web form or e-mail, a new task is assigned to our Administrative Assistant asking her to send a “Thank You for Your application” e-mail response. (If the application is registered in Podio.com by our administrator, we assume the applicant already is aware of the action.)
- An application is rejected
Each application has a status field for all the stages in the recruitment process. When the status changes to “Rejected”, a new task is assigned to our Administrative Assistant asking her to send a “We’ve decided not to continue with Your application” e-mail response.
What you need:
- The PHP library from Podio and be able to authenticate with the username and password flow.
- A candidates app, we use the Recruitment app pack with a candidates app in our Recruitment workspace.
- Set up webhooks for the candidates app:
- Go to your candidates app, click the wrench icon -> Developer
- Click Add hook and fill in the URL to your PHP script, it cannot be localhost or similar.
- Verify the hook as described here.
- The user id of the person who should be assigned the tasks, you find it in the url on the users’ profile page.
The field id of the stage field in the candidates app. Go to https://developers.podio.com/doc/items/get-item-basic-61768 and submit an item id from the candidates app, look for Candidate Stage in the response and copy the field id.
The PHP code we need is actually really simple and should be somewhat self-explanatory thanks to the awesome PHP library. You find the complete code here on my pastebin account.
- Code block 1 filters new applications from web form and e-mail
- Code block 2 catches updates where the application is rejected
This is our first try with event based custom tasks. There are a lot of further development opportunities, net changes for example. Now, our script will only look for the correct value, regardless of changes in other fields. Podio’s revision capability can be a real help here.
Also, it would definitely be possible to have a group of users sharing the tasks, and the script would ”wisely” assign the task to the user with least tasks on her to-do list.
I’d be happy to answer any questions and feeback for improvements is much appreciated.