« tlly.dev

Playbooks · Integrations

JSON API

Any public or keyed HTTPS JSON or CSV URL. A spreadsheet starts from the Google Sheets KPI template (Make a copy https://docs.google.com/spreadsheets/d/1Ty5X3LkY2unxTNGbkq36qDzuuYxQMsuywaTNyzL_pac/copy).

What you can track

Whatever the URL returns, as dated numbers:

Credential

None for a public URL. For a private API, the owner stores a secret bound to that host and the job uses {{secret:NAME}} in the URL, a header or a string body. The value is filled in at fetch time and never shown.

A stored secret may be sent on GET, on POST when the path contains graphql and the body is a query with no mutation, or on POST https://api.hubapi.com/crm/v3/objects/{deals,contacts,companies}/search (HubSpot's read-only CRM search). Any other POST with a secret is refused.

Where to get it

The owner adds the key under Data sources. list_secrets shows names and hosts. If it is missing, call ask_for_key. Never ask anyone to paste a key into the chat.

tlly job

{"series":"price","cron":"0 7 * * *","request":{"url":"https://example.com/quote.json"},"extract":{"format":"json","value":"price"}}

Paging: request.pages is {"param":"page","start":0,"max":10} (increment that query parameter until items is empty) or {"cursor":"paging.next.after","into":"after","max":10} (copy that JSON path into a JSON body field until it is missing). Max 10 pages. A cursor that remains after max pages is an error. An aggregate of items with no request.pages fails when the body still has a next page (paging.next.after, has_more true, links.next, next, pageInfo.hasNextPage) instead of saving a partial total. A response with no next marker is one complete page and is stored. Link headers are not read. {today}, {yesterday}, {tomorrow}, {year}, {month} and {day} work in the URL and in a string body (UTC).

Gotchas

Alert ideas

Red above a ceiling the user names. Yellow when the series stops moving (the job still returns 200). Say that a quiet series is not the same as a failed job unless they have set a stale alert.

Verification

This playbook describes the extractor and the secret rules in this repo (extract.go, extract_more.go, secrets.go, jobs.go). It does not claim a particular vendor’s URL. Cursor paging and a date-less JSON aggregate are what this server does. A date-less CSV still keeps only the last row for the fetch day.