This project is no longer being maintained as my company no longer uses CRM for our timesheets 🎉
We shall wait and see if the replacment is better, if not we can all expect a fork of this to deal with it.
If you are using this project I suggest you fork it and start maintaining it yourself. It's MIT Licensed baby!
Toggl to crm timesheet export script
Toggl.ApiKey
- Your Toggl API token, findable on your toggl profile page.Toggl.Workspace
- The Toggl workspace to target, to find visit the dashboard for the workspace, and copy the number from the urlCrm.Username
- User to log the time entries under on CRM, including domainOutput.DefaultLocation
- Default location to output to if--outfile
is passed without a parameterSettings.HaltOnMissing
- If the program should stop and error if there is a time entry that can not be resolvedProjects
- Array of Toggl to CRM lookup rules, rules are evaluated in order and the first one that matches is used.
Each lookup rule can specify checks against the client, the project, or both. If both are specified they both need to match for the rule to be valid. If a rule specifies none, then it will match any time entry. Time entries are matched through the rules from the top to the bottom, so more specific rules should be placed higher than generic rules.
You can either specify a Regex rule or a plain string rule. If you specify both the Regex rule will override the plain text rule.
ClientRegex
- A regular expression to match against the name of the client for the toggl time entry.Client
- A string that needs to exactly match the name of the client.ProjectRegex
- A regular expression to match against the name of the project for the toggl time entry.Project
- A string that needs to exactly match the name of the project.
Lookup rules then state how to log the information into CRM. At least one of order, opportunity, or ignore needs to specified.
Order
- The ID of the Order to log against.Opportunity
- The ID of the Opportunity to log against.Ignore
- If this time entry should not be included in the output