kinbrowserdocs

Automations, workflows and Google / Microsoft 365 (1.0)

Automations

When something happens, run steps — with what happened filled in.

WhenWhat fills {{event…}}
webhook — POST /api/v1/hooks/<id> with the header X-Kin-Hook: <key> (on a cloud machine's API address, or http://127.0.0.1:<port> locally)event.body (the JSON sent), event.query
watch — a watch or scheduled job (job: <its id>) finds new items, a change, a price, or failsevent.newItems, event.changes, event.price, event.url, event.summary
email — mail arrives in the test inbox (optionally to an address)event.from, event.subject, event.text, event.codes, event.links
schedule — every minutes, or dailyAt HH:MMevent.at

Each step is any verb agents have, and {{steps.N.…}} is step N's result:

{
  "name": "New tender → research → CRM → draft",
  "when": { "kind": "watch", "job": "tenders-gov" },
  "steps": [
    { "verb": "research", "args": { "target": "{{event.newItems.0.buyer}}" } },
    { "verb": "crm", "args": { "action": "createDeal", "data": { "name": "{{event.newItems.0.title}}", "stage": "qualification" } } },
    { "verb": "propose", "args": { "title": "Intro: {{event.newItems.0.title}}", "kind": "email", "text": "Hello — …" } }
  ],
  "approve": false
}

Agents make them with automate (automations, unautomate to list and remove); people on the Grid → Workflows page (a trigger, then steps, with examples, Run now, on/off, and each one's last runs), or kin-browser automations. A webhook automation's key is shown once. With approve, a person is asked before each run. Automations cannot hold the browser, ask a person for typed answers, or make other automations; what they send out goes through the same approvals as an agent's.

Google Workspace and Microsoft 365

A person connects one, once, in the browser:

kin-browser connect google --auth --clientId … [--clientSecret …]
kin-browser connect microsoft --auth --tenant <tenant id> --clientId …

Make the OAuth client first: Google Cloud Console → APIs & Services → Credentials → OAuth client ID, type Desktop app, with the Sheets, Drive, Gmail and Calendar APIs on; or Microsoft Entra → App registrations, a Mobile and desktop redirect http://127.0.0.1, with Files.ReadWrite, Mail.Send and Calendars.ReadWrite. The refresh token is kept encrypted; agents never see it.

Then agents use workspace:

actiondata
sheetsAppendGoogle: spreadsheetId (or url), range, rows · Microsoft: itemId (an Excel file), table, rows
driveUploadpath of a report, CSV or proof Kin Browser saved, name, folderId / folder
sendEmailproposal (an approved draft's id), to, subject — the email is the approved text, sent once
calendarEventtitle, start, end, attendees, description

Writes go through "Ask before risky actions" when it is on. Only files Kin Browser itself saved can be uploaded, and only words a person approved can be emailed.