Automated tracking time in ClickUp based on Google Calendar events

Hello, so i want to automate tracking time. I usually have all my meetings and tasks in Google Calendar and need to track time to ClickUp tasks every day. So I planned to put ClickUp task ID to the description of each meeting and after meeting ends, it should automatically track time to the task.

I face several issues:

  • I use “watch events” for G Calendar module, but it get ALL events from my calendar, that means several years… I need to check only “today” (I want to run this scenario each work day)
  • In G Calendar, there is nothing like duration variable of the event so I tried to format start and end time and simply calculate difference, but it doesn’t work {{addMinutes(9.end; “-” + 9.start)}}

Can someone please help? Thank you

Hey Simon,

Try to choose where to start.

If it won’t work try to set up a custom instant trigger with mailhook. This is the old post with an explanation: Google Calendar instant trigger - #3 by samliew

3 Likes

Thank you mania_braun,

this helps to limit the data from the beginning of June. I probably will have to edit this scenario few times per year to update this start date (to save data), but it is OK.

Now I need to solve another issues:

  1. I need to filter only “today” events. I tried this, but it doesn’t work

  2. Than I ClickUp module (create time entry) I need to figure the time track issue
    image

Can you show what 9. End is providing inside of the output bundle where it is being generated? I wonder if it has the string DD. MMMM YYYY inside of it? Most likely it is an ISO compliant date string so you may need to apply the formatDate funciton on 9. End as well to convert it into the DD. MMMM YYYY format you wish to compare it to.

There are also Date operators available in the filter and you can evalate 9.End directly by specifiying a Date operator later than of equal to {{addDays(now;-1)}} to see if the end date happened later than yesterday.

1 Like

There will be a few issues here I think:

The start date parameter for Clickup will just be a date field so just leave 9. Start in there - no need to format it in anyway. formatDate() converts your date string ready for use into a string of your choosing, but the Clickup system may not accept the date in that format (most likely it won’t) so it will throw an error.

To calculate the duration in minutes this formula won’t work since the second parameter needs to be the number of minutes and you are placing a - before a date string. It needs to be a negative or positive integer instead.

The duration can be just calculated by doing {{9.End - 9.Start}} which will apply the date math for you. You will get the result in milliseconds difference so you will need to divide by 1000 and then divide by 60 to get the number of minutes.

Here’s the a sample scenario that shows how to do this:

I set 2 variables, a start and end

Then I do the math with the expression {{round((2.End - 2.Start) / 1000 / 60)}}

1 Like