[Released!] Accessing time-tracking log via the API

I’d like to add to this thread. At a minimum, exporting time logs should be a simple thing. I’m doing a test run of Monday.com and I’m loving everything I’ve seen, but Time Tracking is critical to be able to use it for what we need. Especially the ability to export the logs without spending a ton of time doing it.

Thanks !

4 Likes

With some effort I was able to filter this data out from the “activity log” via the API.

Start by querying the activity log for your board, then filter that down by several things:

  • “update_column_value” event
  • the column name of your time tracker (under the json event object)
  • ignore 0 duration logs
  • only “running” logs

That should just about leave you with all the time logs from a particular board. Be careful, this will likely be paginated since it’s a lot of data. From there you can query the pulse_id for more info on each log item.

It’s a lot of data to filter through so I have it running on a nightly cron to keep up to date behind the scenes. It’s quite a few steps do get what you need, but it’s possible.

5 Likes

This is absolutely aggravating, Ben. Monday’s core audience are development teams who need to manipulate data, and expect to be able to do so. The fact that there is no good way to access or export simple timetracking data is beyond frustrating. Why in the world can’t you guys generate a simple CSV export? I can’t imagine it would take a developer more than a day or two to implement. The Excel-export-that-thinks-it’s-a-Monday-board is useless. How do you expect people to use this? We don’t need to reproduce the board. We need to manipulate the data for invoicing and budgeting.

Instead, one of my team members has to spend nearly a day each month re-formatting the data to generate the necessary reports. It makes me angry again every month when he has to waste his time doing something that should be dead simple.

5 Likes

@clayanderson We gave up entirely on trying to use Monday’s time tracking because their spreadsheet export was so unusable. Instead, we wrote a browser extension to trigger time tracking in Harvest, and inject the pulse’s name and URL into the time entry. If anyone is interested in this extension, I’d be happy to share it.

@BenP-monday.com Can you please share if there has been any movement to improve time tracking in Monday?

4 Likes

@Winn Thanks, Winn – I’d be curious to see that. I had briefly tried to make Harvest (and several others) work, but that frustrated me too. I migrated my team to Monday to avoid having to devote precious dev hours to hacking around limitations like this in other systems…only to find that Monday’s time-tracking is also half-baked. :-/

2 Likes

@clayanderson We’ve made our git repository public. Here’s the URL:

There are some instructions in the readme.md file. The only thing you’ll need to do is change the hard-coded harvest ID. This has been working well for us, since it uses Harvest’s time tracking system, which works well. Harvest also has proper csv exports of projects and time entries. I just can’t believe that the spreadsheet export from Monday.com is essentially a webpage export of what is shown on screen, and not a real data export. I’d be surprised if there is anyone who is actually using those exports on a regular basis.

5 Likes

+1 for access to specific item sessions via the API

2 Likes

Is there any update on when updates will be made in this area? My company signed with Monday.com for their time tracking functionality and we are now very disappointed by what we can do via the API and Export.

4 Likes

@dipro , any update? please :confused:

2 Likes

Any news on this. I also need it

3 Likes

Hey @MartinSvava, @lizarazomiller, @ccrouse and @dorshiff

Sorry for the delay in response on our end here. I’ve just heard back from the team that we are getting really close to release some further updates here, but need a bit more time to test things out and make sure the new features are ready to use. :slight_smile: As soon as this is released, I’ll post in this thread to confirm as well.

-Alex

3 Likes

Are you looking to make the time tracking session data available in the API in this update?

@AlexSavchuk

3 Likes

Any updates, ETA? please

1 Like

Also need this functionality for our project.

1 Like

Where are we on getting a better way to export or access the time tracking data?

1 Like

Hey everyone!

Sorry for the radio silence on this thread. It’s now possible to access the individual time tracking sessions in a cell via the API. In each cell, you can retrieve the additional_values field. This contains a JSON of all the sessions in that cell.

Each session contains the following data:

account_id: 12345,
column_id: "time_tracking",
created_at: "2020-10-29 16:29:27 UTC", // when the session was added to the cell
started_at: "2020-10-29 16:29:26 UTC", // only applicable if the session was added by pressing the play button or via automation
ended_at: "2020-10-29 16:29:28 UTC", // only applicable if the session
started_user_id: 4012689,
ended_user_id: 4012689,
id: 40949481, // unique session ID
manually_entered_start_date: false, // true if the session was manually entered
manually_entered_start_time: false, // true if manually entered
manually_entered_end_date: false, 
manually_entered_end_time: false,
project_id: 162169281, // item ID, 
status: "active",
updated_at: "2020-10-29 16:29:28 UTC"

EDIT: for a full example of a query and the returned data, check out the last post in this thread (link).

4 Likes

Thanks dipro!
I’m going to hand this information over to my colleague who will test it.
Would be great, if this works out to fulfill our needs:
Greetings from Vienna,
Ruth

1 Like

I use this M script to conect to the board:

let
Key = “XXXXXXXXXXXXXX”,
Board = “12345678”,
Source = Web.Contents(
https://api.monday.com/v2”,
[
Headers=[
#“Method”=“POST”,
#“Content-Type”=“application/json”,
#“Authorization”=“Bearer " & Key
],
Content=Text.ToBinary(”{““query””: ““query { boards(ids: " & Board & “) { items { name, updated_at, group { title }, columns: column_values { title, text } } } }””}”)
]
),
Data = Table.FromList(Json.Document(Source)[data][boards]{0}[items], Record.FieldValues, {“Title”, “UpdatedAt”, “Group”, “Columns”}),
#“Monday” = Table.FromRecords(Table.TransformRows(Data, each
List.Accumulate([Columns], [
Title = [Title],
UpdateDate = [UpdatedAt],
Group = [Group][title]
], (state, current) => Record.AddField(state, current[title], current[text]) )
))
in
#“Monday”

How cai i access the individual time tracking sessions ?

what should I change in the script ?

could you please provide a sample query for ‘additional_values’ field?
I have been unable to find this additional_values field:
Field ‘additional_values’ doesn’t exist on type ‘ColumnValue’
Field ‘additional_values’ doesn’t exist on type ‘Query’
Field ‘additional_values’ doesn’t exist on type ‘Board’
Field ‘additional_values’ doesn’t exist on type ‘Item’
Selections can’t be made on scalars (field ‘additional_info’ returns JSON but has selections [additional_values])

EDIT:
actually after some more trial and error I have discovered a correct format:
$query = “{ boards(ids:”.$boardid."){ items(){ column_values() { id text value }}}}";
So it turns out the important data iis found inside Board>Item>column-value>value>additionalvalues

1 Like

Here is an example query that will return this data:

query {
  boards (ids:11111111) {
    items(ids:22222222) {
      column_values(ids:"time_tracking") {
        value
      }
    }
  }
}

The value field will be a JSON string, and inside the JSON there will be an additional_values key. That’s where the time tracking data is!

Here is an example of the returned data (from the query above):

{
  "data": {
    "boards": [
      {
        "items": [
          {
            "column_values": [
              {
                "value": "{\"startDate\":1613080702,\"duration\":90000,\"running\":\"false\",\"additional_value\":[{\"id\":63372124,\"account_id\":1825528,\"project_id\":162169283,\"column_id\":\"time_tracking\",\"started_user_id\":4012689,\"ended_user_id\":4012689,\"started_at\":\"2021-02-10 20:58:00 UTC\",\"ended_at\":\"2021-02-11 21:58:00 UTC\",\"manually_entered_start_time\":true,\"manually_entered_end_time\":true,\"manually_entered_start_date\":true,\"manually_entered_end_date\":true,\"created_at\":\"2021-02-11 21:58:22 UTC\",\"updated_at\":\"2021-02-11 21:58:22 UTC\",\"status\":\"active\"}]}"
              }
            ]
          }
        ]
      }
    ]
  },
  "account_id": 12345
}

I’m going to close this thread to encourage folks to open new topics for their questions. Please open a new topic in the GraphQL API FAQ category if you have additional thoughts or queries.

1 Like