Tool

Fetch time entries from Toggl into searchable documents

Toggl reader fetches time entries from Toggl workspaces and projects into LlamaIndex Documents.

Works with toggl

72
Spark score
out of 100
Updated 2 days ago
Version 0.14.23

Add to Favorites

Why it matters

Extract time tracking data from Toggl workspaces and projects, transforming time entries into structured documents that can be indexed, searched, and analyzed within LlamaIndex workflows.

Outcomes

What it gets done

01

Authenticate with Toggl API using workspace-specific tokens

02

Query time entries by workspace, project, and date range

03

Transform Toggl time entries into Document format with markdown output

04

Load historical time tracking data for analysis and reporting

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/li-reader-readers-toggl | bash

Overview

Toggl reader

Toggl reader is a LlamaIndex integration that retrieves time entries from Toggl Track workspaces and projects via API, converting them into Document objects. It supports filtering by workspace, project, and date range, with configurable output formats including Markdown. Use Toggl reader when you need to load time-tracking data from Toggl into LlamaIndex Document format. It's designed for developers working within the LlamaIndex framework who want to programmatically retrieve time entries from Toggl workspaces and projects.

What it does

Toggl reader is a LlamaIndex integration that fetches time entries from Toggl Track workspaces and projects, converting them into Document objects. It enables developers to pull time-tracking data programmatically using a Toggl API token, with support for filtering by workspace, project, and date range, and formatting output as Markdown.

When to use - and when NOT to

Use Toggl reader when you need to load time-tracking data into LlamaIndex as Document objects for further processing. It's ideal for scenarios where you want to programmatically retrieve time entries from specific workspaces and projects within a date range.

Do not use this tool if you only need basic Toggl reporting features available in the native interface, or if you're working with time-tracking platforms other than Toggl Track.

Inputs and outputs

You provide a Toggl API token (obtained from your Toggl profile settings), workspace ID, project ID, and a start date for filtering entries. Optionally, you can specify the output format.

You receive an array of Document objects containing time entry data, formatted according to your specified output format (such as Markdown), ready for use within LlamaIndex.

Installation and usage

Install the package:

pip install llama-index-readers-toggl

Load time entries from the past week:

from llama_index.readers.toggl import TogglReader
from llama_index.readers.toggl.dto import TogglOutFormat
import datetime

reader = TogglReader(api_token="{{YOUR_API_TOKEN}}")

docs = reader.load_data(
    workspace_id="{{WORKSPACE_ID}}",
    project_id="{{PROJECT_ID}}",
    start_date=datetime.datetime.now() - datetime.timedelta(days=7),
    out_format=TogglOutFormat.markdown,
)

To get your API token: log in to Toggl, open your profile at track.toggl.com/profile, scroll down and click "-- Click to reveal --" for the API token.

Integrations

This reader integrates with LlamaIndex and works with Toggl Track's API to retrieve time entry data.

Who it's for

Toggl reader is built for developers who need to load time-tracking data from Toggl into LlamaIndex Document format. It's designed for anyone working within the LlamaIndex ecosystem who wants to retrieve time entries programmatically.

Source README

Toggl reader

pip install llama-index-readers-toggl

This loader fetches time entries from Toggl workspace and project into Documents.

Before working with Toggl's API, you need to get API token:

  1. Log in to Toggl
  2. Open profile
  3. Scroll down and click -- Click to reveal -- for API token

Usage

from llama_index.readers.toggl import TogglReader
from llama_index.readers.toggl.dto import TogglOutFormat
import datetime

reader = TogglReader(api_token="{{YOUR_API_TOKEN}}")

docs = reader.load_data(
    workspace_id="{{WORKSPACE_ID}}",
    project_id="{{PROJECT_ID}}",
    start_date=datetime.datetime.now() - datetime.timedelta(days=7),
    out_format=TogglOutFormat.markdown,
)

Examples

This loader is designed to be used as a way to load data into LlamaIndex.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.