AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Automating Meeting Data Pipelines: Syncing Fireflies.ai with Webhooks V2 and GraphQL

Boris Graf · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Software engineering and revenue operations (RevOps) teams frequently face a common architectural hurdle when capturing conversation intelligence: how to archive meeting transcripts, AI summaries, action items, and speaker-diarized timestamps into internal databases or RAG (Retrieval-Augmented Generation) knowledge bases without drowning in operational latency or hitting strict API quotas.

A frequent initial mistake is implementing a periodic cron worker that polls the API for newly completed meetings. At 365Finds, our research indicates that polling is an anti-pattern for conversation data infrastructure. Polling rapidly depletes rate limits, incurs unnecessary compute costs, and introduces variable sync lags.

The resilient, enterprise-grade architecture is an asynchronous, event-driven pipeline pairing Fireflies.ai Webhooks V2 with targeted GraphQL API queries. This guide provides an end-to-end technical blueprint for constructing this pipeline, verifying cryptographic webhook signatures, executing surgical GraphQL extracts, and designing idempotent database synchronization workflows.


1. Architectural Strategy: Why Event-Driven Sync Trumps Polling

Engineering teams attempting to build cron-based polling architectures against Fireflies.ai quickly encounter fundamental scaling limits. Understanding these constraints highlights why Webhooks V2 is essential for production deployments.

Rate Limiting and Quota Pressures

Fireflies.ai enforces rate limits tailored to subscription tiers:

When a background job polls the transcripts query every 3 to 5 minutes to detect newly transcribed calls across dozens or hundreds of employees, hundreds of empty queries run during quiet hours, burning daily allowances on Free and Pro tiers. Conversely, during peak business hours—specifically at the top and bottom of the hour when internal standups and client calls conclude simultaneously—polling jobs easily trigger HTTP 429 Too Many Requests responses.

The Recommended Architecture: Event-Driven Push-and-Pull

365Finds firmly recommends replacing polling entirely with a dual-stage, push-and-pull ingestion pattern:

  1. Push Notification (Webhooks V2): Fireflies.ai delivers an instantaneous HTTP POST webhook containing minimal metadata (meeting_id, event, timestamp) as soon as audio processing or AI summarization finishes.
  2. Fast Acknowledgment & Queue Offloading: The receiving webhook server validates the HMAC payload signature, enqueues the meeting ID into an internal worker queue (such as Redis/BullMQ, SQS, or Celery), and immediately responds with HTTP 200 OK.
  3. Pull Extraction (GraphQL API): An asynchronous worker consumes the job and executes an authenticated GraphQL query (transcript(id: $meetingId)) that fetches only the necessary relational fields and timestamped transcript segments before persisting them to Postgres, Snowflake, or a vector store.
+---------------+        1. Webhook POST         +--------------------+
|               |  (event: meeting.summarized)   |                    |
| Fireflies.ai  | -----------------------------> | Webhook Receiver   |
| Webhooks V2   |                                | (Validates HMAC)   |
+---------------+                                +--------------------+
                                                           |
                                               2. Fast 200 OK & Enqueue
                                                           v
+---------------+        4. GraphQL Query        +--------------------+
| Fireflies.ai  | <----------------------------- | Background Worker  |
| GraphQL API   | -----------------------------> | (Extracts Fields)  |
+---------------+    5. Granular JSON Response   +--------------------+
                                                           |
                                               6. Idempotent Upsert
                                                           v
                                                 +--------------------+
                                                 | Internal Database  |
                                                 | & Vector Store     |
                                                 +--------------------+

2. Fireflies.ai Webhooks V2 Lifecycle and Event Selection

Webhooks V2 replaces the legacy Webhooks V1 implementation, introducing granular event subscriptions, configurable signing secrets, and reprocessing triggers.

Event Definitions

Webhooks V2 supports three primary lifecycle triggers:

Event NameLifecycle TriggerPrimary Use Case
meeting.bot_joinedFired when the Fireflies assistant bot ("Fred") enters a live call.Updating real-time meeting status in internal dashboards or internal bot monitoring tools.
meeting.transcribedFired when speech-to-text processing finishes and the raw diarized transcript is ready.Low-latency chunking and embedding pipelines where raw text is needed immediately for RAG indexing.
meeting.summarizedFired when AI models finish generating action items, overviews, outlines, and key topics.RevOps CRM syncing, task generation (Jira/Asana), and holistic conversation archiving.

365Finds Selection Guideline: Which Event Should You Bind?

If your objective is syncing CRM notes, logging action items, or archiving completed meeting records, subscribe exclusively to meeting.summarized.

When meeting.summarized fires, speech-to-text processing is already complete. Querying the GraphQL API at this stage yields both the full diarized sentences and the completed AI summary in a single network round-trip. Subscribing to meeting.transcribed for general archiving requires handling race conditions where summary objects may still be in a pending state.

Managing Edits via reprocessed_at

In real-world business settings, users frequently adjust speaker names, correct transcript terms, or regenerate AI summaries using custom prompt guidelines.

On the Webhooks V2 configuration page, enable Resend when a meeting's notes change. When this option is active, Fireflies re-emits meeting.transcribed or meeting.summarized whenever meeting notes are modified. Resent payloads carry a critical metadata field: reprocessed_at (a Unix timestamp in milliseconds). First deliveries omit this field.


3. Cryptographic Signature Verification and Ingestion Security

Exposing a public webhook endpoint requires verifying that incoming payloads originate from Fireflies.ai and were not modified in transit.

When a Signing Secret is configured in the Fireflies dashboard (app.fireflies.ai/integrations/api/webhook), Fireflies attaches an X-Hub-Signature header to every HTTP POST delivery:

X-Hub-Signature: sha256=5d41402abc4b2a76b9719d911017c592...

Verification Rules

  1. Raw Body Integrity: You must compute the HMAC digest against the raw incoming byte stream before JSON parsing parses or reformats whitespace.
  2. Timing-Safe Comparison: Compare the calculated signature against the header value using a constant-time comparison utility (such as crypto.timingSafeEqual in Node.js or hmac.compare_digest in Python) to prevent timing side-channel attacks.
  3. Execution Deadlines: Fireflies.ai enforces a strict 30-second response window (with TCP connection establishment required within 10 seconds). Always return a 2xx HTTP status code before executing complex GraphQL queries or database transactions.

Node.js (Express) Signature Verification & Ingestion Handler

import express from 'express';
import crypto from 'crypto';

const app = express();
const SIGNING_SECRET = process.env.FIREFLIES_WEBHOOK_SECRET;

// Preserve raw body for signature calculation
app.use(express.json({
  verify: (req, res, buf) => {
    req.rawBody = buf;
  }
}));

function verifyFirefliesSignature(rawBody, signatureHeader, secret) {
  if (!signatureHeader || !signatureHeader.startsWith('sha256=')) {
    return false;
  }

  const expectedSignature = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(rawBody)
    .digest('hex');

  const sigBuffer = Buffer.from(signatureHeader, 'utf8');
  const expectedBuffer = Buffer.from(expectedSignature, 'utf8');

  if (sigBuffer.length !== expectedBuffer.length) {
    return false;
  }

  return crypto.timingSafeEqual(sigBuffer, expectedBuffer);
}

app.post('/api/webhooks/fireflies', async (req, res) => {
  const signature = req.headers['x-hub-signature'];

  // 1. Verify cryptographic HMAC signature
  if (!verifyFirefliesSignature(req.rawBody, signature, SIGNING_SECRET)) {
    return res.status(401).json({ error: 'Invalid webhook signature' });
  }

  const { event, meeting_id, timestamp, reprocessed_at } = req.body;

  // 2. Acknowledge receipt immediately to satisfy 30-second timeout
  res.status(200).json({ received: true });

  // 3. Dispatch to background queue for GraphQL retrieval
  if (event === 'meeting.summarized') {
    await taskQueue.add('sync-meeting', {
      meetingId: meeting_id,
      timestamp,
      reprocessedAt: reprocessed_at || null
    });
  }
});

4. Querying the Fireflies.ai GraphQL API

The webhook payload is deliberately lightweight: it informs your system that processing is complete and supplies the meeting_id (identical to transcript.id). Your worker must query the GraphQL endpoint (https://api.fireflies.ai/graphql) to extract rich conversation entities.

Header Configuration

Surgical GraphQL Query Specification

Avoid pulling the entire transcript schema if your application only requires operational summaries or action items. For database archiving and vector retrieval, request the following structured fields:

query GetMeetingDetails($meetingId: String!) {
  transcript(id: $meetingId) {
    id
    title
    date
    duration
    transcript_url
    audio_url
    host_email
    organizer_email
    meeting_link
    participants
    meeting_attendees {
      displayName
      email
      name
    }
    summary {
      overview
      action_items
      keywords
      outline
      shorthand_bullet
      topics_discussed
    }
    sentences {
      index
      speaker_name
      speaker_id
      text
      raw_text
      start_time
      end_time
      ai_filters {
        task
        pricing
        metric
        question
      }
    }
  }
}

Python Worker Implementation

The following worker executes the query and handles response errors:

import os
import requests

FIREFLIES_GRAPHQL_ENDPOINT = "https://api.fireflies.ai/graphql"
FIREFLIES_API_KEY = os.environ.get("FIREFLIES_API_KEY")

GRAPHQL_QUERY = """
query GetMeetingDetails($meetingId: String!) {
  transcript(id: $meetingId) {
    id
    title
    date
    duration
    host_email
    organizer_email
    summary {
      overview
      action_items
      keywords
      topics_discussed
    }
    sentences {
      index
      speaker_name
      speaker_id
      text
      start_time
      end_time
    }
    meeting_attendees {
      displayName
      email
    }
  }
}
"""

def fetch_meeting_details(meeting_id: str) -> dict:
    headers = {
        "Content-Type": "application/json",
        "Authorization": f"Bearer {FIREFLIES_API_KEY}"
    }
    payload = {
        "query": GRAPHQL_QUERY,
        "variables": {"meetingId": meeting_id}
    }

    response = requests.post(FIREFLIES_GRAPHQL_ENDPOINT, json=payload, headers=headers, timeout=15)
    
    if response.status_code == 429:
        retry_after = response.headers.get("Retry-After", "60")
        raise RuntimeError(f"Rate limited. Back off for {retry_after} seconds.")

    response.raise_for_status()
    result = response.json()

    if "errors" in result:
        raise ValueError(f"GraphQL errors: {result['errors']}")

    return result["data"]["transcript"]

5. Database Schema & Idempotent Synchronization Pipeline

When syncing external webhooks into production databases, your synchronization pipeline must enforce two core principles: idempotency and version awareness.

Handling Retries and Duplication

Fireflies retries failed deliveries up to 5 times over an exponential backoff window (30s, 2m, 10m, 30m, 2h). Furthermore, network anomalies can cause duplicate delivery.

Your database table should track last_reprocessed_at alongside the unique meeting_id. When handling a resend:

PostgreSQL Relational Schema Design

-- 1. Core Meetings Table
CREATE TABLE meetings (
    id VARCHAR(64) PRIMARY KEY, -- Maps to Fireflies meeting_id / transcript.id
    title TEXT NOT NULL,
    meeting_date TIMESTAMPTZ,
    duration_seconds NUMERIC,
    organizer_email VARCHAR(255),
    overview TEXT,
    keywords TEXT[],
    topics_discussed TEXT[],
    last_reprocessed_at BIGINT, -- Milliseconds timestamp
    updated_at TIMESTAMPTZ DEFAULT NOW()
);

-- 2. Action Items Table for RevOps and Task Automation
CREATE TABLE meeting_action_items (
    id SERIAL PRIMARY KEY,
    meeting_id VARCHAR(64) REFERENCES meetings(id) ON DELETE CASCADE,
    item_text TEXT NOT NULL,
    synced_to_crm BOOLEAN DEFAULT FALSE,
    created_at TIMESTAMPTZ DEFAULT NOW()
);

-- 3. Diarized Sentences Table for Search & RAG Vector Indexing
CREATE TABLE meeting_sentences (
    id SERIAL PRIMARY KEY,
    meeting_id VARCHAR(64) REFERENCES meetings(id) ON DELETE CASCADE,
    sentence_index INT NOT NULL,
    speaker_name VARCHAR(128),
    speaker_id VARCHAR(64),
    text TEXT NOT NULL,
    start_time NUMERIC,
    end_time NUMERIC,
    embedding vector(1536), -- Optional pgvector column for semantic search
    UNIQUE (meeting_id, sentence_index)
);

Idempotent Upsert Logic (Node.js + PostgreSQL)

import { Pool } from 'pg';

const db = new Pool({ connectionString: process.env.DATABASE_URL });

export async function syncMeetingToDatabase(transcript, reprocessedAt = null) {
  const client = await db.connect();
  try {
    await client.query('BEGIN');

    // Check version timestamp to prevent out-of-order writes
    const checkQuery = `
      SELECT last_reprocessed_at 
      FROM meetings 
      WHERE id = $1 FOR UPDATE
    `;
    const res = await client.query(checkQuery, [transcript.id]);
    
    if (res.rows.length > 0) {
      const storedTime = res.rows[0].last_reprocessed_at;
      if (reprocessedAt && storedTime && Number(reprocessedAt) <= Number(storedTime)) {
        await client.query('ROLLBACK');
        return { status: 'skipped', reason: 'stale_version' };
      }
    }

    // Upsert Meeting Record
    const upsertMeeting = `
      INSERT INTO meetings (
        id, title, meeting_date, duration_seconds, organizer_email,
        overview, keywords, topics_discussed, last_reprocessed_at, updated_at
      ) VALUES ($1, $2, to_timestamp($3 / 1000.0), $4, $5, $6, $7, $8, $9, NOW())
      ON CONFLICT (id) DO UPDATE SET
        title = EXCLUDED.title,
        overview = EXCLUDED.overview,
        keywords = EXCLUDED.keywords,
        topics_discussed = EXCLUDED.topics_discussed,
        last_reprocessed_at = EXCLUDED.last_reprocessed_at,
        updated_at = NOW();
    `;
    await client.query(upsertMeeting, [
      transcript.id,
      transcript.title,
      transcript.date,
      transcript.duration,
      transcript.organizer_email,
      transcript.summary?.overview || '',
      transcript.summary?.keywords || [],
      transcript.summary?.topics_discussed || [],
      reprocessedAt ? Number(reprocessedAt) : null
    ]);

    // Replace Action Items
    await client.query('DELETE FROM meeting_action_items WHERE meeting_id = $1', [transcript.id]);
    if (transcript.summary?.action_items?.length) {
      for (const item of transcript.summary.action_items) {
        await client.query(
          'INSERT INTO meeting_action_items (meeting_id, item_text) VALUES ($1, $2)',
          [transcript.id, item]
        );
      }
    }

    // Refresh Transcript Sentences
    await client.query('DELETE FROM meeting_sentences WHERE meeting_id = $1', [transcript.id]);
    if (transcript.sentences?.length) {
      for (const s of transcript.sentences) {
        await client.query(`
          INSERT INTO meeting_sentences (
            meeting_id, sentence_index, speaker_name, speaker_id, text, start_time, end_time
          ) VALUES ($1, $2, $3, $4, $5, $6, $7)
        `, [
          transcript.id,
          s.index,
          s.speaker_name,
          s.speaker_id,
          s.text,
          s.start_time,
          s.end_time
        ]);
      }
    }

    await client.query('COMMIT');
    return { status: 'synced', id: transcript.id };
  } catch (err) {
    await client.query('ROLLBACK');
    throw err;
  } finally {
    client.release();
  }
}

6. Enterprise Considerations & Production Reliability

When moving this ingestion framework from staging into production, keep several organizational constraints in mind:

1. Workspace-Wide vs. Individual Account Scoping

By default, Fireflies webhooks trigger only for meetings owned by the authenticated user (organizer_email). In corporate environments where RevOps needs to capture customer calls across 50 account executives, configuring 50 individual webhooks is unmaintainable.

2. Inspecting Rate Limit Headers

When your background worker executes GraphQL queries, monitor the response headers to track quota consumption:

3. Audio Uploads with Dynamic Webhooks

If your software uploads prerecorded MP3/WAV files using the GraphQL uploadAudio mutation, you can pass a dynamic webhook parameter in the mutation input. Note that this mutation triggers a legacy V1 payload format for that specific upload, whereas meetings recorded live via the Fireflies notetaker bot conform strictly to the Webhooks V2 format configured in your dashboard.


Conclusion

Polling APIs for conversation intelligence is a fragile pattern that fails under enterprise load. By deploying an event-driven architecture using Fireflies.ai Webhooks V2, validating cryptographic payload signatures, and retrieving structured meeting data through targeted GraphQL queries, software engineers can build real-time, resilient synchronization pipelines that preserve API quotas and reliably feed corporate knowledge bases.

References