{"id":13817130,"url":"https://github.com/thinkinglabs/toggl-google-sheet","last_synced_at":"2025-04-09T21:32:59.164Z","repository":{"id":26751786,"uuid":"30209597","full_name":"thinkinglabs/toggl-google-sheet","owner":"thinkinglabs","description":"Import Toggl time entries into a Google Sheet","archived":false,"fork":false,"pushed_at":"2024-08-30T10:49:44.000Z","size":660,"stargazers_count":20,"open_issues_count":8,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T23:26:50.800Z","etag":null,"topics":["google-sheets","hexagonal-architecture","javascript","ports-and-adapters","timesheet","toggl"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinkinglabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-02T21:28:48.000Z","updated_at":"2024-08-30T10:47:49.000Z","dependencies_parsed_at":"2023-02-18T22:45:21.475Z","dependency_job_id":"d841dc30-ad33-49cb-8719-f1aa7b90bb9a","html_url":"https://github.com/thinkinglabs/toggl-google-sheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkinglabs%2Ftoggl-google-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkinglabs%2Ftoggl-google-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkinglabs%2Ftoggl-google-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkinglabs%2Ftoggl-google-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkinglabs","download_url":"https://codeload.github.com/thinkinglabs/toggl-google-sheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114919,"owners_count":21050142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-sheets","hexagonal-architecture","javascript","ports-and-adapters","timesheet","toggl"],"created_at":"2024-08-04T06:00:34.628Z","updated_at":"2025-04-09T21:32:59.133Z","avatar_url":"https://github.com/thinkinglabs.png","language":"JavaScript","funding_links":[],"categories":["Miscellaneous"],"sub_categories":[],"readme":"# Toggl Google Sheet [![Build Status](https://travis-ci.org/thinkinglabs/toggl-google-sheet.svg?branch=master)](https://travis-ci.org/thinkinglabs/toggl-google-sheet)\n\nThis Google Apps script imports time entries from Toggl.com into a Google Sheet\nusing their [Detailed Report API](https://github.com/toggl/toggl_api_docs/blob/master/reports/detailed.md).\n\nFor a given month it aggregates the time entries per day and per customer.\n\n## Installation\n\n### Simple\n\nOpen [this Google Sheet](https://docs.google.com/spreadsheets/d/1rXMdRwkMCeC2kq0yEMb54Y8SU2DUk-TFOJ0gxgBugEk/edit?usp=sharing)\nand make a copy in your Google Drive account.\n\n### From scratch\n\nCreate a new Google Sheet.\n\nCreate a new script in your newly created Google Sheet and paste the contents of\nall of the `src/*.gs` files in their respective script files.\n\nRename the first sheet as _Config_.\n\nAdd the following information in cell A1 of the _Config_ sheet:\n\n| |A: Variable   |B: Value                 | C: Description     |\n|-|--------------|-------------------------|--------------------|\n|1|timesheetDate | 01/01/2015              | Timesheet Month    |\n|2|workspaceId   | _workspaceId_           | Toggl Workspace Id |\n|3|apiToken      | _your toggle api token_ | Toggl API Token    |\n\nTo figure out your *workspace_id*: go to Team in toggl.com. The number at the\nend of the URL is the workspace id.\n\nTo figure out your *api_token*: go to your Profile in toggl.com, your API token\nis at the bottom of the page.\n\n## Usage\n\nRe-open your Google Sheet. Now you will have a new menu called \"*Toggl*\" with a\nsub-menu \"*Get Timesheet for Month*\".\n\nFill a date of the month you want to import in cell B1. If you want your\ntimesheet for December 2014, fill the date 01/12/2014 and click *Toggl \u003e Get\nTimesheet for Month*.\n\nIt also calculates the number of days worked during that month.\n\n## Implementation\n\nGoogle App Scripts only supports EcmaScript 5 because it is powered by Mozilla's\nRhina Javascript Interpreter.\n\n_toggl-google-sheet_ is written in ES6 (aka EcmaScript2015). But the codebase\nstill implements classes the old way using functions. That is because of\nhistorical reasons. The codebase started in full ES5 mode as a pure hack.\nGradually, it got refactored by introducing classes, the hexagonal\narchitecture and DDD concepts.\n\nWebpack and Babel are used to transpile ES6 to ES5.\n\n- `./src/Code.js` : contains the global functions required by Google Apps Script\n  written in ES5.\n- `./src/App.js` : entry point for Webpack bundle. Here we can use ES6 modules\n  written in ES6. The bundle is exposed as a global variable `app` to `Code.js`.\n\nSince early 2020, Google App Scripts is now supported by the V8 Runtime that\npowers Chrome and Node.js. But ES6 modules are not yet supported.\n\nBecause ES6 modules are not supported, there is still value in transpiling. And,\nthe right now the Google Sheets still use the Rhino powered Google App Scripts.\n\n## Run tests\n\nTo run the tests:\n\n```bash\nnpm install\nnpm test\n```\n\nTests are implemented using [Jest](https://jestjs.io/en/).\n\n## Build\n\nTo transpile the ES6 to ES5 for Google Apps Script:\n\n```bash\nnpm run build\n```\n\n## Acknowledgment\n\n[koen-github](https://github.com/koen-github) for providing an example on how to\nuse the Toggl API with Google Sheet.\n\n[GSmart.in](https://github.com/gsmart-in) for providing an [example of using ES6\nand webpack/babel for Google Apps Script](https://github.com/gsmart-in/AppsCurryStep2).\nSee also [Creating a complete web app on Google Apps Script using Google Sheet\nas database](https://dev.to/prasanthmj/creating-a-complete-web-app-on-google-apps-script-using-google-sheet-as-database-26o8).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkinglabs%2Ftoggl-google-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkinglabs%2Ftoggl-google-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkinglabs%2Ftoggl-google-sheet/lists"}