> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckbrain.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Apps via Pipedream

> Gmail, GitHub, Drive and more through Pipedream — managed OAuth + the broker

**Status:** Available

Pipedream is how DuckBrain ingests apps that have no local crawler. Credentials live in **Pipedream**, never on your machine or in the chat — one proxy-first `AppConnector` injects auth server-side on every request. It's an adapter behind the source, not something you see at the source level.

## Connect, then sync

```bash theme={null}
duckbrain connect gmail            # opens a Pipedream Connect link — sign in + consent (once)
duckbrain sync gmail               # incremental pull
duckbrain sync gmail --since 90d   # backfill a date range (auto-paginated)
```

Each source is a declarative `SourceSpec` — no per-source code. Available today:

| Source                              | `--source`                                  | Auth                    |
| ----------------------------------- | ------------------------------------------- | ----------------------- |
| Gmail                               | `gmail`                                     | managed OAuth           |
| Google Calendar                     | `google_calendar`                           | managed OAuth           |
| Google Drive                        | `google_drive`                              | managed OAuth           |
| GitHub (issues / READMEs / commits) | `github`, `github_readme`, `github_commits` | managed OAuth           |
| Notion (API)                        | `notion_api`                                | managed OAuth           |
| Fireflies                           | `fireflies`                                 | managed OAuth (GraphQL) |
| RevenueCat                          | `revenuecat`                                | broker (API key)        |

## Two connector kinds

* **Managed OAuth** — for apps in Pipedream's registry. Pipedream runs the OAuth dance and proxies the API; you just `connect` and `sync`.
* **The broker** — for apps Pipedream *doesn't* have. You deploy one small hosted key-entry form (once), paste the app's API key into **Pipedream** via a Connect-Link-style page, and duckbrain proxies through it with the key injected server-side. The key never touches your machine. RevenueCat rides this. Deep dive: the [broker guide](https://github.com/autonoco/duckbrain/blob/main/docs/pipedream-broker.md).

## Add a new app

```bash theme={null}
duckbrain gen-spec <app>           # drafts + live-validates a SourceSpec for a Pipedream app
```

`gen-spec` reads the app's Pipedream component, drafts the spec, probes the live API, and **refuses if the connector's shape isn't supported yet** — so a spec never ships broken. Write the draft, re-run with `--draft <file>` to validate and register it, then smoke-test with `sync`.

## Setup

apps need Pipedream project credentials, stored locally (0600) and loaded by the daemon too:

```bash theme={null}
duckbrain secrets add PIPEDREAM_CLIENT_ID
duckbrain secrets add PIPEDREAM_CLIENT_SECRET
duckbrain secrets add PIPEDREAM_PROJECT_ID
```

These identify *your Pipedream project* — the per-app credentials themselves stay inside Pipedream.
