harvest2sheet

1.2.2 • Public • Published

Harvest2Sheet

Allows you to download time sheet data from a project within Harvest into Google sheets.

Running harvest2sheet can batch several tasks together

Install

To install this app you need NodeJS installed.

Install via:

npm install -g harvest2sheet

Creating login credentials

harvest2sheet has the ability to help you with setting up your credentials for harvest and google. IT will lead you through the process to create them and then generate the project.json for you that you can get started with.

To start the wizard run:

harvest2sheet login

Run

To run the program make sure you specify which month you want to target.

harvest2sheet 2020-08

harvest2sheet will then create a sheet (if it doesn't already exist) in your spreadsheet and fill it with the time entries found in harvest for that month.

The sheet name will be in the format of H|Aug'20 and have gray as a color.

Configure

harvest2sheet requires a project.json file to run its tasks off of.

The project.json format is as follows:

{
    "HARVEST_ACCESS_TOKEN": "Add your personal token here",
    "HARVEST_ACCOUNT_ID": 666,
    "GOOGLE_ID": "Add your google ID here",
    "GOOGLE_SECRET": "Add your google secret here",
    "GOOGLE_REFRESH_TOKEN": "Add your google refresh token here",
    "tasks": {
        "project1": {
            "harvestProject": 42,
            "spreadsheetID": "Add your google sheets ID here"
        },
        "project2": {
            "harvestProject": 42,
            "spreadsheetID": "Add your google sheets ID here"
        }
    },
    "output": [
        "date",
        "user",
        "client",
        "project",
        "task",
        "hours",
        "rounded_hours",
        "notes",
        "billable_rate",
        "billable_amount",
        "cost_rate",
        "cost_amount",
        "currency"
    ]
}

The login block on the top is important and can be generated by running harvest2sheet login.

The tasks object

The project name, used internally only. Can be anything.

harvestProject

The harvest project ID. Find it by navigating to the project inside the harvest web app and look at the URL.

An example might be https://yourorg.harvestapp.com/projects/1234567 in which case the harvestProject is 1234567.

spreadsheetID

This is the spreadsheet ID. Find it by navigating to your spreadsheet in the web app and look at the URL.

An example might be https://docs.google.com/spreadsheets/d/1ZZS15TTMxQRjeX2nI-u4zJMQJu0QzhlKRgOC17jLG6X/edit#gid=0 in which case the spreadsheetID is 1ZZS15TTMxQRjeX2nI-u4zJMQJu0QzhlKRgOC17jLG6X.

The output array

The output array let's you pick and sort what things you want to be added to the spreadsheet.

If you don't specify anything harvest2sheet will default to:

"output"[
    "date",
    "user",
    "client",
    "project",
    "task",
    "hours",
    "rounded_hours",
    "notes",
    "billable_rate",
    "billable_amount",
    "cost_rate",
    "cost_amount",
    "currency"
]

Choose from the below items:

Property Description
date Date
hours Hours
rounded_hours Rounded Hours
notes Notes
locked Locked
locked_reason Locked Reason
closed Closed
billed Billed
timer_started_at Timer Started At
started_time Started Timer
ended_time Ended Timer
running Running
billable Billable
budgeted Budgeted
billable_rate Billable Rate
billable_amount Billable Amount
cost_rate Cost Rate
cost_amount Cost Amount
created_at Created At
updated_at Updated At
user User
client Client
currency Currency
project Project
project_code Project Code
task Task

Release History

  • 1.2.2 - fixed date range for harvest
  • 1.2.1 - fixed isDate detection, added version flag support
  • 1.2.0 - added global dates, caught more errors
  • 1.1.1 - fixed settings error handling
  • 1.1.0 - added support for shaping the output
  • 1.0.1 - added support for multi line time entries
  • 1.0.0 - Launch

};

Readme

Keywords

none

Package Sidebar

Install

npm i harvest2sheet

Weekly Downloads

1

Version

1.2.2

License

GPL-3.0

Unpacked Size

60.9 kB

Total Files

10

Last publish

Collaborators

  • dominikwilkowski