Files
PaperClipAI/doc/connections/FIREFLIES.md
DottaandPaperclip 24429024e7 feat: add Fireflies connector and summary-ready routines (#13890)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Apps gives agents governed access to external tools through stored
credentials.
> - Routines start work when an external service sends an event.
> - Fireflies provides meeting transcripts and summaries through an
official hosted MCP server.
> - This PR adds that connection and accepts signed meeting events
through the shared app webhook flow.
> - Agents can review completed meetings with the same permissions and
audit records as other work.

## Linked Issues or Issue Description

**Problem or motivation**

Operators need agents to read Fireflies meetings and start follow-up
work when a summary is ready. The Apps catalog lacks Fireflies. The
shared app webhook flow needs to accept its signed deliveries.

**Proposed solution**

Use the official Fireflies MCP endpoint with OAuth or a vaulted bearer
API key. Extend the existing Another app or script flow with signed
webhook support. Verify the raw-body signature and pass the JSON payload
as external data. Select Meeting Summarized in Fireflies. Deduplicate
identical signed deliveries, including setup deliveries.

**Alternatives considered**

A separate REST connector would duplicate the governed MCP path.
Polling, legacy V1 payloads, and automatic provider-side webhook
registration are outside this change.

**Roadmap alignment**

This extends the existing MCP Tool Gateway & Apps and Scheduled Routines
surfaces. It adds a provider to those systems. It does not introduce a
second integration framework.

**Additional context**

A GitHub search found no existing Fireflies issues or PRs. Provider
references and verification limits are in
`doc/connections/FIREFLIES.md`.

## What Changed

- Add the official Fireflies catalog definition, generated registry,
provider evidence, and branded artwork.
- Reuse Access → Connect, dynamic discovery, Permissions, vault storage,
policy, and audit behavior.
- Classify Fireflies sharing, movement, and access revocation as writes.
- Preserve Off and Ask first restrictions during OAuth reauthorization
and API-key replacement. New actions retain normal defaults.
- Add `app_webhook` authentication to the shared Another app or script
flow. Accept bearer tokens or raw-body HMAC-SHA256. Preserve earlier
`fireflies_hmac` triggers and revision snapshots for compatibility.
Existing text columns need no migration.
- Verify `X-Hub-Signature` or `X-Hub-Signature-256` against the exact
request body. Preserve generic event payloads and deduplicate identical
signed requests.
- Keep the routine wizard generic. Show one webhook URL and secret in
Another app or script. Keep all new app webhook event names
provider-neutral. Keep provider setup instructions in the connector
documentation.
- Pass generic webhook JSON to the task in an explicit external-data
block, capped at 16,384 characters. Keep strict meeting validation for
existing legacy Fireflies triggers.

## Verification

- Feature implementation commit `0882dc8a1`: all 54 CI checks passed;
two conditional Storybook checks skipped. This includes full tests,
typecheck, build, browser E2E, canary dry run, and security checks.
Greptile rated this commit 5/5; all review threads are resolved.
- Full local `pnpm -r typecheck`, `pnpm build`, and token gates passed
on the final code. Targeted connector, gateway, webhook, revision, and
UI suites passed during implementation. After the provider-neutral
follow-up, all 84 app-webhook and routine-service tests passed; the
final payload-to-task assertion also passed in the 72-test routine suite
and a clean-config rerun.
- The long local `pnpm test:run` invocation started before the final
edits and was stopped after the final-commit CI suites passed. It
reported one generic webhook test failure while those files were
changing; that test and the entire routine suite passed on the final
source, including a clean-config reproduction. The interrupted local run
is not counted as a full-suite pass.
- In the embedded browser, completed official OAuth consent and
discovered 20 live actions. Real meeting listing, transcript retrieval,
and summary/action-item retrieval succeeded as the selected agent.
Turning a live read Off blocked its test; catalog refresh preserved the
restriction.
- Embedded-browser Another app or script setup, back/save/resume, narrow
layout, and a signed synthetic Fireflies delivery succeeded. The UI
reported authentication passed without creating a task. Fixtures cover
signature tampering, malformed requests, ordinary app event names,
duplicate/setup deliveries, rotation, revisions, pause/archive, and
company isolation.
- Existing MCP browser suite: 8 passed and 2 provider-dependent cases
skipped. Branding checks passed; connector artwork and webhook setup
were checked at desktop/mobile widths and in light/dark modes.
- An unauthenticated POST to a correctly formatted public webhook URL
reached the staging tenant verifier through the existing Cloud gateway.
- A real Fireflies webhook delivery remains unverified. A staging
callback is available for the operator walkthrough. Live API-key
authorization, credential expiry, and a new meeting's summary completion
were not tested against the provider. Fixtures cover these protocol and
lifecycle paths where applicable.

- Storybook follow-up `c54174faa`: 27 production-component stories cover
every UI change, with a source-to-story map in the connector
documentation. Static Storybook build, UI typecheck, token gates, and
Playwright checks for all stories and the mobile footer pass. All PR
checks passed for this Storybook follow-up; Greptile reviewed
`c54174faa` at 5/5.

## Risks

- Fireflies may change its hosted MCP tools or OAuth behavior. Tool
discovery stays dynamic. Experimental search/fetch tools are not
required.
- Public webhook setup requires HTTPS and a separate signing secret.
Fireflies normally emits events for meetings owned by the configuring
account.
- Reauthorization touches shared MCP permission code. Regression tests
cover existing restrictions, new actions, connection removal, and other
gateway callers.
- Webhook receipt grants no tool access. The routine agent still needs
an authorized Fireflies connection.

- New generic triggers rely on provider event subscriptions. Without a
sender-supplied idempotency key, changed request bytes count as a new
event. Existing legacy Fireflies triggers retain summary-only filtering
and per-meeting deduplication.

## Model Used

OpenAI Codex, model `gpt-6-astra`. Used reasoning, repository editing,
code execution, and embedded-browser testing. The runtime did not expose
a context-window size.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-23 17:11:16 -05:00

192 lines
11 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Fireflies
Verified against official documentation and public protocol metadata on 2026-09-23.
## Connect meeting data
In **Apps → Fireflies**, choose who can use the connection, then sign in with
Fireflies. Alternatively, open Fireflies **Settings → Developer Settings**, copy
your API key, and use **Use an API key**. Credentials are stored in Paperclip's
vault and tools use the ordinary connection grants, policy, and audit path.
Setup is **Access → Connect**. Successful authentication and catalog discovery
complete setup; manage action permissions and test tools on the connection's
Permissions screen. Available data follows the connected Fireflies account's
permissions. Writes follow Paperclip's normal defaults and any restrictions you
configure. Reconnect and catalog refresh preserve **Off** and **Ask first**
selections; newly discovered actions keep the normal connection defaults.
Stable meeting tools include `fireflies_get_transcripts`,
`fireflies_get_transcript`, and `fireflies_get_summary`. The last returns summary
and action-item data; transcript retrieval is separate. Experimental
`fireflies_search` and `fireflies_fetch` are not required. Sharing, moving,
renaming meetings, revoking access, and creating soundbites are mutations.
## Start a routine when a summary is ready
1. Create or choose a routine and set its assigned agent and instructions.
Give that agent access to your Fireflies connection in Apps.
2. In the routine's **Triggers** tab, add a webhook and choose
**Another app or script**. No provider-specific routine option is needed.
3. Ensure the displayed callback URL is publicly reachable over HTTPS.
A localhost URL or private-network HTTPS address cannot receive Fireflies
deliveries. This prerequisite applies only to webhooks, not MCP access.
4. Open [Fireflies Webhooks V2 settings](https://app.fireflies.ai/integrations/api/webhook).
Add the displayed URL and paste Paperclip’s **Secret key** into Fireflies’
**Signing Secret** field. This is the routine’s generated secret, not your
Fireflies API key.
5. Subscribe only to `meeting.summarized`, then save in Fireflies.
6. Optionally finish a meeting you own and wait for its summary to test delivery.
Setup deliveries verify the connection without creating tasks. Finish setup
in Paperclip to activate future deliveries; test events are never replayed.
Suggested routine instructions:
> Read the Fireflies summary and transcript for the meeting ID attached to this
> task. Summarize decisions and action items in the task, with owners and due
> dates when available. Highlight unresolved questions.
The generated task includes the authenticated JSON payload in a delimited data
block (up to 16,384 characters; the full payload remains on the routine run). Treat all
payload fields as external data. The agent uses its normal authorized connection
to retrieve meeting content. A webhook never grants connection access.
Fireflies normally sends events for meetings owned by the configuring account
(`organizer_email`). Summary readiness happens after transcription and the end
of the call. Webhooks V1, polling/backfill, and automatic registration are not
implemented. Pausing/archiving the routine or trigger stops dispatch. Removing
the Apps connection blocks data access; disable the trigger separately to stop
incoming events from creating tasks.
## Delivery and authentication
The existing `POST /api/routine-triggers/public/:publicId/fire` endpoint supports
`signingMode: "app_webhook"` for **Another app or script**. It accepts either a
bearer token or an HMAC-SHA256 signature in `X-Hub-Signature` or
`X-Hub-Signature-256`. Signed bodies are authenticated before interpretation;
an invalid signature cannot fall back to bearer authentication. Ordinary signed
app events retain their JSON payload and use the supplied idempotency key, or a
trigger-scoped body digest when no delivery key is supplied. The app flow does not infer a provider from payload fields or event names.
Existing `fireflies_hmac`
triggers and revision snapshots remain compatible but are no longer offered as
a setup choice.
Fireflies signs the exact request body with HMAC-SHA256 in `X-Hub-Signature`,
formatted `sha256=<hex digest>`. Missing or invalid signatures return 401;
malformed signed payloads return 400. No bearer header is needed.
Choose only **Meeting Summarized** in Fireflies. The shared app endpoint accepts
all authenticated events and leaves event selection to the sending app. Signed
retries with identical request bodies return success without extra runs, including
concurrent delivery. Setup receipts survive activation. For senders with custom
headers, a stable `Idempotency-Key` also deduplicates retries whose bodies change.
Without that header, changed request bytes count as a new event. Events received
while paused are not backfilled by Paperclip.
Earlier `fireflies_hmac` triggers retain their provider-specific validation,
summary-only dispatch, and per-meeting deduplication. New setup uses only the
shared app flow.
Secret rotation invalidates the previous key immediately. Copy the new key into
Fireflies. Setup progress can be resumed, but the one-time secret is not stored
in browser draft state; generate a replacement if it was not saved in Fireflies.
Delivery checks and activity show acceptance/rejection; no observed event yet is
not proof of a broken connection.
On Cloud deployments, the front door must forward the public routine webhook
path without requiring a browser session. The application still verifies the
trigger secret. A `tenant_session_required` response means the request was
blocked by the Cloud gateway before webhook authentication. Updating the tenant
application alone does not change that gateway policy.
## Provider evidence and artwork
- [MCP configuration](https://docs.fireflies.ai/getting-started/mcp-configuration):
endpoint `https://api.fireflies.ai/mcp`, OAuth and bearer API keys.
- Live unauthenticated GET: 401 with resource metadata at
`https://api.fireflies.ai/.well-known/oauth-protected-resource/mcp`.
- Authorization metadata at
`https://api.fireflies.ai/.well-known/oauth-authorization-server` advertises
issuer `https://api.fireflies.ai/`, `/authorize`, `/token`, `/register`, and
`/revoke`; PKCE `S256`; authorization-code and refresh-token grants; token
authentication `client_secret_post` and `none`; scopes `email` and `profile`.
Public metadata inspection does not register an OAuth client.
- [MCP tools](https://docs.fireflies.ai/mcp-tools/overview) documents stable
meeting reads and mutations; experimental search/fetch availability varies.
- [Webhooks V2](https://docs.fireflies.ai/graphql-api/webhooks-v2) documents
signatures, payloads, ownership limits, and the requirement to respond within
10 seconds. Paperclip uses normal routine dispatch and does not wait for agent
execution or fetch meeting content during webhook handling.
- Official SVG: `https://fireflies.ai/api/logos/file/fireflies.svg`, linked from
Fireflies' product site. Bundled unchanged as `ui/public/brands/apps/fireflies.svg`;
native gradients preserved and validated with the shared SVG safety checker.
The same colored mark is used on both theme frames.
## Validation boundary
Automated tests cover catalog contracts, OAuth/API-key fixtures, signature and
payload validation, event filtering, deduplication, setup activation, rotation,
company isolation, and setup UI. Account authorization and a real Fireflies
delivery require a Fireflies account and publicly reachable callback. Mocked
fixtures are not evidence of a successful live account connection.
Validation on 2026-09-23:
- Eight focused suites: 537 tests passed, including actual gateway reads through
OAuth/API-key fixtures and permission preservation on reconnect.
- Shared refresh regression coverage: another 104 tests passed across gateway,
connection removal, Railway, and email integration callers.
- Repository-wide Vitest coverage completed through the stable runner's server,
workspace, and both serialized groups (148 route suites). The initial full
invocation stopped on two reconnect fixture failures; those were fixed and
the complete connection suites and shared refresh callers rerun successfully.
- `pnpm -r typecheck`, `pnpm build`, token gates, and branding validation passed.
- Existing MCP browser suite: eight passed, two provider-dependent cases skipped.
- Isolated app HTTP proof: signed setup receipt, activation/redelivery, ignored
transcription event, and two concurrent summary deliveries producing one run.
- Real Apps screens expose the normal Access step followed by browser sign-in
and API-key choices; no browser errors were observed.
- Production webhook wizard checked in Storybook at desktop and mobile widths,
including back/resume, verification steps, and light/dark official artwork.
- Embedded-browser live account proof: completed catalog → Access → OAuth
consent → Permissions with the official provider. Discovered 20 actions
(14 reads, 6 writes), and ran `fireflies_get_transcripts`,
`fireflies_get_transcript`, and `fireflies_get_summary` successfully as the
selected preview agent. The summary included overview and action items.
Turning the summary action Off blocked its test; refreshing actions preserved
that restriction. Restored the previously authorized read after testing.
- Published webhook contract proof: `server/src/__tests__/fixtures/fireflies-webhooks-v2.json`
preserves the official V2 examples for all three events, including short and
long meeting IDs, numeric millisecond timestamps, and an optional string
client reference. Fixed HMAC test vectors were generated independently with
Python over the documented UTF-8 bodies. Tests accept those exact bytes and
reject whitespace-only alterations. This is provider-derived contract evidence,
not a captured live delivery.
- Real provider webhook delivery is still pending a publicly reachable callback.
Fireflies’ live V2 settings offer a **Meeting Summarized** subscription and a
**Test Webhook** step. No production meeting completion has been tested.
## UI review in Storybook
Open **PR reviews → Fireflies and app webhooks** (`fireflies-pr.stories.tsx`).
The 27 stories use production components and simulated data; they do not authorize
accounts or send provider requests.
| Changed surface | Story coverage |
| --- | --- |
| Catalog definition and branded artwork | Fireflies catalog; artwork in dark/light themes; Access, OAuth, API-key, and retry screens |
| Preserved action restrictions | Permissions with Allowed, Ask first, and Off examples |
| `TriggerWizard.tsx` | Shared app choice, HTTPS warning, signing secret/bearer copy, four verification states, save/resume, hidden-secret rotation, legacy drafts, mobile and light theme |
| `RoutineTriggers.tsx` | Saved app-webhook settings, rotated secret/agent instructions, rejected delivery |
| `RoutineTriggerCard.tsx` | Advanced card with `app_webhook` and no timestamp replay window |
| `editable-sections.production.tsx` | Advanced creation with shared signing-mode description |
```sh
pnpm storybook
pnpm build-storybook
pnpm exec playwright test --config tests/storybook-visual/fireflies-pr.config.ts
```
The browser check loads every review story, runs its interaction assertions, and
checks the mobile setup footer and horizontal overflow. The existing webhook
stories also retain coverage of the shared flow outside this PR review group.