Skip to content

Add Attio as a connected source (call recording transcripts) - #824

Open
henry-dowling wants to merge 1 commit into
mainfrom
henry/attio-integration
Open

Add Attio as a connected source (call recording transcripts)#824
henry-dowling wants to merge 1 commit into
mainfrom
henry/attio-integration

Conversation

@henry-dowling

Copy link
Copy Markdown
Collaborator

What

Adds Attio as a connected source, alongside Gong. Each Attio call recording's transcript is indexed into a new attio_documents table as a speaker-labelled, FTS-searchable document — so Attio calls become searchable/askable from within Stash.

Why

We want to pull Attio call transcripts (e.g. sales/customer calls) into Stash to search and summarize them, the same way Gong calls already work.

How it works

  • Provider (backend/integrations/attio/provider.py) — standard OAuth 2.0 authorization-code app. Attio access tokens don't expire and aren't refreshable (same shape as GitHub user tokens), so supports_refresh = False. Scopes: meeting:read, call_recording:read. GET /v2/self supplies the workspace name for the account label.
  • Indexer (backend/integrations/attio/indexer.py) — pages meetings over a rolling 90-day window → each meeting's call recordings → each recording's transcript, renders # title / Date / [Speaker N]: …, and upserts into attio_documents. Recordings that age out of the window are soft-deleted.
  • Migration 0152 — creates the copied-content attio_documents table (FTS + embeddings), on the current owner_user_id / user_sources convention.
  • Wiring — registered the attio provider + attio_calls source type across tasks/sources.py, services/source_service.py, and routers/sources.py (one-connection-per-user resolver). Added ATTIO_OAUTH_CLIENT_ID/SECRET/REDIRECT_URI to config.py.
  • Frontend — Attio connector card, brand icon, and provider/source-type maps.

Deploy steps (required before it works)

  1. Create an Attio OAuth app (Attio → Settings → Developers → OAuth tab): enable OAuth 2.0, add the redirect URI, enable meeting:read + call_recording:read.
  2. Set ATTIO_OAUTH_CLIENT_ID, ATTIO_OAUTH_CLIENT_SECRET, ATTIO_OAUTH_REDIRECT_URI (e.g. https://api.joinstash.ai/api/v1/integrations/attio/callback) — locally in backend/.env, in prod on Render (stash_backend).

Testing

  • ruff check / ruff format: clean
  • Backend: 40 passed (3 new Attio tests + 37 source/PostHog regression); migration 0152 applies cleanly and the table shape is correct
  • Frontend: connector test passes; tsc / lint show no Attio-related errors

Caveat

API request/response shapes are modeled on Attio's published docs (couldn't hit the live API without an app/token). The first real sync after connecting is the true validation; will adjust quickly if any field names differ.

Product screenshot of the integrations page (Attio card) to follow in a thread comment.

🤖 Generated with Claude Code

Attio joins the connected-source lineup alongside Gong: each Attio call
recording's transcript is indexed into attio_documents as a speaker-labelled,
FTS-searchable document.

- OAuth provider (standard authorization-code app). Attio access tokens don't
  expire and aren't refreshable, same shape as GitHub user tokens.
- Indexer walks meetings (90-day window) -> call recordings -> transcripts.
- Migration 0152 creates the copied-content attio_documents table.
- Frontend connector card + brand icon.

Requires an Attio OAuth app and ATTIO_OAUTH_CLIENT_ID/SECRET/REDIRECT_URI env
vars (meeting:read + call_recording:read scopes).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@assert-app

assert-app Bot commented Jul 16, 2026

Copy link
Copy Markdown

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stash-web Ready Ready Preview, Comment Jul 16, 2026 4:12am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant