When teams build custom CRMs, internal customer-intelligence lakes, or automated engineering ticket dispatchers, standard SaaS integrations (such as native HubSpot or Salesforce sync) fall short. They hide raw speaker turns, truncate timestamped sentences, or lock conversational data inside third-party silos. To maintain complete data sovereignty and feed proprietary models or custom databases, engineering teams need an event-driven ingestion pipeline.
At 365Finds, our engineering recommendation is decisive: never poll the Fireflies.ai GraphQL API on cron schedules. Periodic polling wastes per-minute and daily API quotas, creates sync lag, and risks missing meetings that undergo retroactive edits. Instead, implement an asynchronous, event-driven pipeline that listens to Fireflies.ai Webhooks V2, verifies incoming HMAC-SHA256 payloads immediately, responds with an HTTP 200 OK within milliseconds, and delegates a background worker to query the GraphQL API for granular timestamps, speaker diarization, and structured action items.
Architecture Overview
An enterprise-grade Fireflies.ai sync pipeline consists of four distinct stages:
[Fireflies.ai Cloud]
|
| 1. HTTP POST (meeting.summarized + X-Hub-Signature)
v
[Ingress Webhook Receiver] <--- Verifies HMAC-SHA256 with Signing Secret
|
| 2. Pushes { meeting_id, reprocessed_at } to Queue (Redis / SQS / RabbitMQ)
| 3. Returns HTTP 200 OK (< 50ms)
v
[Async Background Worker]
|
| 4. GraphQL Query: transcript(id: $meeting_id)
v
[Fireflies GraphQL API (api.fireflies.ai)]
|
| 5. Returns Sentences (Timestamps + Speakers) & Summary (Action Items)
v
[Custom Database (PostgreSQL / Data Lake)] <--- Idempotent Upsert (Handles reprocessed_at)
Event Selection: Why meeting.summarized Trumps meeting.transcribed
Fireflies.ai Webhooks V2 emits three primary lifecycle events:
meeting.bot_joined: Fired when the Fred bot joins the call. Useful solely for real-time dashboard indicators.meeting.transcribed: Fired when speech-to-text processing finishes and raw sentences are available.meeting.summarized: Fired when both transcription and downstream AI summarization (overview, keywords, action items) are complete.
Our Verdict: For relational databases and CRM syncing, subscribe to meeting.summarized. If you listen to meeting.transcribed to capture action items, summary.action_items will frequently return empty or null because the language model is still processing the transcript. Subscribing to meeting.summarized guarantees that both sentence-level transcriptions and structured AI tasks can be harvested in a single GraphQL call.
Step 1: Configure Fireflies.ai Webhooks V2
Configure your webhook in the Fireflies.ai developer console:
- Log in to Fireflies.ai and navigate to the Webhooks V2 Configuration Page.
- Enter your public HTTPS URL (e.g.,
https://api.yourcompany.com/webhooks/fireflies). Fireflies does not follow HTTP redirects and requires a valid TLS certificate. - Generate or supply a robust Signing Secret. Do not skip this: unsigned webhooks expose your database ingestion layer to spoofing and denial-of-service vulnerabilities.
- Under Event Subscriptions, select
meeting.summarized. - Check Resend when a meeting's notes change. This is critical: if a user alters the transcript, regenerates AI notes, or refines custom vocabulary in the Fireflies UI, Fireflies triggers a resend with a
reprocessed_attimestamp. - Click Save and use Send Test Event to verify that your ingress endpoint is reachable.
Enterprise Super Admin Consideration: By default, webhooks only trigger for meetings owned by the user account who generated the webhook. In enterprise environments where meetings must be captured across hundreds of sales reps or engineers, the webhook must be created under a Super Admin role on an Enterprise plan. Fireflies automatically escalates team-wide meeting events to Super Admin webhooks without requiring individual teammate configurations.
Step 2: Implement Secure Webhook Verification and Dispatch
Fireflies enforces a strict 30-second timeout on webhook deliveries. If your server fails to respond within 30 seconds or drops the TCP handshake after 10 seconds, Fireflies marks the request failed and does not retry if the connection was already established.
Failed transient connections are retried up to 5 times with exponential backoff (30 seconds, 2 minutes, 10 minutes, 30 minutes, and 2 hours).
Rule of Thumb: Never execute the Fireflies GraphQL query or perform heavy database operations inside the webhook HTTP request lifecycle. Validate the signature, enqueue the task, and return HTTP 200 OK immediately.
Signature Verification Specification
- Header:
X-Hub-Signature - Format:
sha256=<hex_digest> - Algorithm: HMAC-SHA256 computed over the raw binary request body using your Signing Secret.
Production Receiver (Node.js & Express Example)
import express from 'express';
import crypto from 'crypto';
import { Queue } from 'bullmq'; // Or any message queue (SQS, RabbitMQ)
const app = express();
const meetingQueue = new Queue('fireflies-ingest');
const SIGNING_SECRET = process.env.FIREFLIES_SIGNING_SECRET;
// Preserve raw body buffer for cryptographically accurate HMAC verification
app.post(
'/webhooks/fireflies',
express.raw({ type: 'application/json' }),
async (req, res) => {
const signature = req.headers['x-hub-signature'];
if (!signature || typeof signature !== 'string') {
return res.status(401).send('Missing X-Hub-Signature header');
}
// Compute expected HMAC digest
const hmac = crypto.createHmac('sha256', SIGNING_SECRET);
hmac.update(req.body);
const expectedSignature = `sha256=${hmac.digest('hex')}`;
const sigBuffer = Buffer.from(signature);
const expectedBuffer = Buffer.from(expectedSignature);
// Constant-time comparison prevents timing attacks
if (
sigBuffer.length !== expectedBuffer.length ||
!crypto.timingSafeEqual(sigBuffer, expectedBuffer)
) {
return res.status(401).send('Invalid webhook signature');
}
try {
const payload = JSON.parse(req.body.toString('utf8'));
const { event, meeting_id, reprocessed_at, timestamp } = payload;
// Filter for target events
if (event === 'meeting.summarized') {
// Enqueue background processing job
await meetingQueue.add('process_meeting', {
meetingId: meeting_id,
reprocessedAt: reprocessed_at || null,
deliveredAt: timestamp
}, {
attempts: 3,
backoff: { type: 'exponential', delay: 5000 }
});
}
// Return fast 200 OK
return res.status(200).json({ status: 'queued', meeting_id });
} catch (err) {
console.error('Webhook parsing error:', err);
return res.status(400).send('Invalid JSON payload');
}
}
);
app.listen(3000, () => console.log('Webhook ingress running on port 3000'));
Step 3: Fetch Transcripts and Action Items via GraphQL API
When the background worker picks up the job, it calls the single Fireflies GraphQL endpoint:
- Endpoint:
https://api.fireflies.ai/graphql - Authentication:
Authorization: Bearer <FIREFLIES_API_KEY>(obtained from Fireflies Integrations API).
GraphQL Query Definition
Query the transcript field using the meeting_id extracted from the webhook. This query requests speaker identities, milliseconds-precise timestamps, AI-filtered sentence tags, and structured action items:
query FetchMeetingForDatabase($meetingId: String!) {
transcript(id: $meetingId) {
id
title
date
duration
transcript_url
audio_url
host_email
organizer_email
participants
meeting_attendees {
displayName
email
name
}
summary {
overview
action_items
keywords
gist
topics_discussed
}
sentences {
index
speaker_name
speaker_id
text
raw_text
start_time
end_time
ai_filters {
task
pricing
metric
question
}
}
}
}
Background Worker Implementation (Python Example)
import os
import requests
import psycopg2
from psycopg2.extras import Json
FIREFLIES_API_KEY = os.environ["FIREFLIES_API_KEY"]
GRAPHQL_URL = "https://api.fireflies.ai/graphql"
GRAPHQL_QUERY = """
query FetchMeetingForDatabase($meetingId: String!) {
transcript(id: $meetingId) {
id
title
date
duration
host_email
participants
summary {
overview
action_items
keywords
gist
}
sentences {
index
speaker_name
text
start_time
end_time
}
}
}
"""
def fetch_meeting_details(meeting_id: str) -> dict:
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {FIREFLIES_API_KEY}"
}
response = requests.post(
GRAPHQL_URL,
json={"query": GRAPHQL_QUERY, "variables": {"meetingId": meeting_id}},
headers=headers,
timeout=20
)
response.raise_for_status()
data = response.json()
if "errors" in data:
raise RuntimeError(f"GraphQL returned errors: {data['errors']}")
return data["data"]["transcript"]
Step 4: Storing Data into a Relational Database (PostgreSQL)
To handle initial deliveries as well as reprocessing resends without data corruption, design your PostgreSQL tables with clear foreign keys and upsert constraints.
Relational Schema
CREATE TABLE IF NOT EXISTS meetings (
id VARCHAR(64) PRIMARY KEY,
title TEXT,
meeting_date BIGINT,
duration NUMERIC,
host_email VARCHAR(255),
participants TEXT[],
overview TEXT,
gist TEXT,
keywords TEXT[],
reprocessed_at BIGINT DEFAULT 0,
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS meeting_sentences (
id BIGSERIAL PRIMARY KEY,
meeting_id VARCHAR(64) REFERENCES meetings(id) ON DELETE CASCADE,
sentence_index INT NOT NULL,
speaker_name VARCHAR(255),
start_time NUMERIC,
end_time NUMERIC,
text TEXT NOT NULL,
UNIQUE(meeting_id, sentence_index)
);
CREATE TABLE IF NOT EXISTS meeting_action_items (
id BIGSERIAL PRIMARY KEY,
meeting_id VARCHAR(64) REFERENCES meetings(id) ON DELETE CASCADE,
task_description TEXT NOT NULL,
completed BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
Idempotent Upsert Logic with Reprocessing Safeguards
When meeting.summarized is triggered with reprocessed_at, you must overwrite existing records while preventing outdated deliveries from overwriting fresher data.
def sync_meeting_to_postgres(db_conn, meeting_data: dict, reprocessed_at: int):
meeting_id = meeting_data["id"]
current_reprocessed = reprocessed_at or 0
with db_conn.cursor() as cur:
# Check if stored version is already newer
cur.execute("SELECT reprocessed_at FROM meetings WHERE id = %s", (meeting_id,))
row = cur.fetchone()
if row and row[0] is not None and row[0] >= current_reprocessed and current_reprocessed > 0:
# Stored version is newer or equal; skip stale delivery
return
summary = meeting_data.get("summary") or {}
# 1. Upsert meeting parent row
cur.execute("""
INSERT INTO meetings (
id, title, meeting_date, duration, host_email,
participants, overview, gist, keywords, reprocessed_at, updated_at
) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, NOW())
ON CONFLICT (id) DO UPDATE SET
title = EXCLUDED.title,
meeting_date = EXCLUDED.meeting_date,
duration = EXCLUDED.duration,
host_email = EXCLUDED.host_email,
participants = EXCLUDED.participants,
overview = EXCLUDED.overview,
gist = EXCLUDED.gist,
keywords = EXCLUDED.keywords,
reprocessed_at = EXCLUDED.reprocessed_at,
updated_at = NOW();
""", (
meeting_id,
meeting_data.get("title"),
meeting_data.get("date"),
meeting_data.get("duration"),
meeting_data.get("host_email"),
meeting_data.get("participants", []),
summary.get("overview"),
summary.get("gist"),
summary.get("keywords", []),
current_reprocessed
))
# 2. Refresh sentences (delete old turns for idempotency)
cur.execute("DELETE FROM meeting_sentences WHERE meeting_id = %s", (meeting_id,))
sentences = meeting_data.get("sentences") or []
for s in sentences:
cur.execute("""
INSERT INTO meeting_sentences (
meeting_id, sentence_index, speaker_name, start_time, end_time, text
) VALUES (%s, %s, %s, %s, %s, %s)
""", (
meeting_id,
s["index"],
s.get("speaker_name", "Unknown"),
s.get("start_time"),
s.get("end_time"),
s["text"]
))
# 3. Refresh action items
cur.execute("DELETE FROM meeting_action_items WHERE meeting_id = %s", (meeting_id,))
action_items = summary.get("action_items") or []
for item in action_items:
cur.execute("""
INSERT INTO meeting_action_items (meeting_id, task_description)
VALUES (%s, %s)
""", (meeting_id, item))
db_conn.commit()
Technical Constraints and Operational Realities
When rolling this out in production, account for these specific platform behaviors:
| Operational Dimension | Policy / Specification | Practical Impact |
|---|---|---|
| Webhook Response Window | HTTP 200 within 30 seconds; 10s TCP handshake | Synchronous processing will trigger Fireflies timeouts. Background queues are mandatory. |
| Delivery Retries | 5 attempts across ~3 hours (30s, 2m, 10m, 30m, 2h) | Ingestion must be strictly idempotent to prevent duplicate sentences or duplicate action items. |
| GraphQL Rate Limits | Free: 30/min (500/day); Pro: 60/min (5,000/day); Business/Enterprise: Pooled 60/min per paid seat | Rate limits reset on UTC midnight. High-volume batch resends require queue throttling (rateLimit in BullMQ/Celery). |
| Account Isolation | Regular users only receive webhooks for meetings they own | Company-wide data streaming requires a Super Admin role on an Enterprise tier. |
| Reprocessing Semantics | Triggered on note re-summarization or language edits | Must track reprocessed_at timestamp. Discard payloads where incoming reprocessed_at <= stored_value. |
By combining Webhooks V2 as a low-latency trigger with the GraphQL API as an on-demand data fetcher, engineering teams eliminate polling overhead, protect their API quotas, and maintain an audit-ready, real-time repository of meeting intelligence directly within internal data stores.