Serverless cron job to sync Toggl time entries to Zoho Invoice. It is designed to run as AWS Lambda function triggered by Cloudwatch.
This script syncs the last 7 days (up until yesterday) from Toggl to Zoho invoice.
You can be notified about the sync result via Slack.
It uses the Zoho notes
field to store Toggl record IDs. This will break if you use notes for something else or modify the content of the field.
It will not detect changes in Toggl after the fact and re-sync automatically, but you can delete the record in Zoho completely and it will re-sync it.
Hardcoded timezone "Europe/Berlin" in Zoho.
You need to create a config.ini
file in the project directory:
[Toggl]
access_token = _your_toggl_access_token_
[Zoho]
api_key = _your_zoho_api_key_
org_id = _numerical_zoho_organisation_id_
user_id = _numerical_zoho_user_id_
[Slack]
webhook_url = _webhook_url_
[Mapping]
# Mapping format is Toggl-Project-ID = zoho_project_id:zoho_task_id
# example
123 = 456:789
virtualenv -p python3 env
pip install -r requirements.txt
serverless deploy
to update, use
serverless deploy function -f cron