1.2.2 • Published 4 years ago

harvest2sheet v1.2.2

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
4 years ago

Harvest2Sheet

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

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:

PropertyDescription
dateDate
hoursHours
rounded_hoursRounded Hours
notesNotes
lockedLocked
locked_reasonLocked Reason
closedClosed
billedBilled
timer_started_atTimer Started At
started_timeStarted Timer
ended_timeEnded Timer
runningRunning
billableBillable
budgetedBudgeted
billable_rateBillable Rate
billable_amountBillable Amount
cost_rateCost Rate
cost_amountCost Amount
created_atCreated At
updated_atUpdated At
userUser
clientClient
currencyCurrency
projectProject
project_codeProject Code
taskTask

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

};

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago