I use Toggl Track to track time for WebSpace projects, and I use Plutio to invoice people for those billable hours. Manually adding these Toggl time entries into Plutio once a month was a headache and usually took a long time (Doesn't help that Plutio's UI for adding entries is a bit awkward).
So I built this server which does the following:
- Fetches all entries from Toggl with the tag "To be billed"
- Sorts through all the entries and organise them via Project
- Turns them into a format that Plutio is familiar with
- Creates a time entry on Plutio for each
- Marks each Toggl entry as "Billed"
The server has two endpoints:
/api/billable
- Fetch all entries to be billed from Toggl and send them to Plutio/api/clear
- Clears all unpaid entries in Plutio (because it's a pain to delete each one individually on Plutio)
- Node (17.4.0)
- NPM (8.3.1)
These versions are recommended but not obligitory, but should you have problems running the application you should ensure your versions match these.
- Clone this repository to your local machine.
- You'll need both a Toggl and Plutio account.
- Run
cp .env.example .env
and fill in the appropiate values - Run
npm install
to install the dependencies - Run
npm run dev
to run the application in development - Run
npm run build
to build the application - Run
docker-compose up
to run it as a Docker container