I work mainly with Asana task management, and I love working with Google Calendar.
Asana allows you to set up a date and time for any task, but when you sync your asana tasks with google calendar it sets up the task as an All day event, instead of putting it in the specified time slot set in Asana task.
I'd like to have a service installed in my own server (I have an Amazon EC2 instance) that can check my asana's tasks every minute, look for dates and times, and create the google calendar at the set time, for one hour slot. Also, if I move a task in Google Calendar, it has to change the date in Asana as well for that task.
Asana API documentation is here:
[login to view URL]
This web should require user login/pwd or registed, with the following information: Name, email, password.
Web asks for Google Calendar Authentication, and also for Asana authentication.
This connection is stored in web's database.
A form then asks for the following data:
- Select project: it shows a dropdown list with all projects from Asana's user account, and also an option for "All projects", meaning that the script will monitorise all tasks within selected projects. Projects can be selected with checkboxes.
- Tasks: 2 options: "All tasks" or "All tasks assigned to me", so user can select which tasks will be synced and created a google calendar entry
Changes should be updated real-time. No save button on this page.
Once this setup is created, it should be possible to modify it later anytime. When this setup is finished, a new Calendar should be created in Google Calendar, named "Asana's tasks".
- When a task is created in asana, an entry in google calendar should be created as well: Calendar Title = Asana task title, date and start-time = Asana date and due time; finish time = asanatime+1h; Google calendar description = Asana's task Description + URL. This entry should be created in "Asana's tasks" calendar for this user. This entry should not be an "all day" type of entry: it's lenght should be 1 hour.
- When a google calendar entry is moved from day or time, it should update Asana's date and time as well.
- When a google calendar "Asana's Tasks" entry is removed from calendar, it doesn't affect Asana's task date/time information
- When an Asana's task changed time and date, it should be updated to google calendar. If it didn't exist, then it should be re-created.
A cronjob in my server should be created, so every minute it checks all calendar entries to review changes, and all asana tasks. If changes / new tasks have happened, then it should call the script to update asana or google as needed.
It's important, then, than any query to APIs go faster then possible. If we run a cronjob every minute, it should take little time to get data and push the changes.