Skip to content
fireflies-data-handling logo

Fireflies.ai Data Handling

fireflies-data-handling

Handle Fireflies.ai transcript data: export formats, PII redaction,

SKILL.md

Full skill instructions

Fireflies.ai Data Handling

Overview

Manage meeting transcript data: export in multiple formats (JSON, text, SRT), redact PII from transcripts and summaries, implement retention policies with automated cleanup, and handle GDPR/​CCPA data subject requests.

Prerequisites

  • FIREFLIES_API_KEY configured
  • Understanding of transcript data structure (sentences, summary, analytics)
  • Storage for processed transcripts

Instructions

Step 1: Fetch Transcript Data

const FIREFLIES_API = "https://api.fireflies.ai/​graphql";

async function getFullTranscript(id: string) {
  const res = await fetch(FIREFLIES_API, {
    method: "POST",
    headers: {
      "Content-Type": "application/​json",
      Authorization: `Bearer ${process.env.FIREFLIES_API_KEY}`,
    },
    body: JSON.stringify({
      query: `
        query($id: String!) {
          transcript(id: $id) {
            id title date duration
            organizer_email
            speakers { id name }
            sentences { speaker_name text start_time end_time }
            summary { overview action_items keywords short_summary }
            meeting_attendees { displayName email }
          }
        }
      `,
      variables: { id },
    }),
  });
  const json = await res.json();
  if (json.errors) throw new Error(json.errors[0].message);
  return json.data.transcript;
}

Step 2: Export in Multiple Formats

type ExportFormat = "json" | "text" | "srt" | "csv";

function exportTranscript(transcript: any, format: ExportFormat): string {
  switch (format) {
    case "json":
      return JSON.stringify(transcript, null, 2);

    case "text":
      const lines = [
        `# ${transcript.title}`,
        `Date: ${transcript.date} | Duration: ${transcript.duration}min`,
        `Speakers: ${transcript.speakers.map((s: any) => s.name).join(", ")}`,
        "",
        "## Summary",
        transcript.summary?.overview || "(none)",
        "",
        "## Action Items",
        ...(transcript.summary?.action_items || []).map((a: string) => `- ${a}`),
        "",
        "## Transcript",
        ...transcript.sentences.map((s: any) =>
          `[${fmtTime(s.start_time)}] ${s.speaker_name}: ${s.text}`
        ),
      ];
      return lines.join("\n");

    case "srt":
      return transcript.sentences.map((s: any, i: number) =>
        [
          i + 1,
          `${fmtSrt(s.start_time)} --> ${fmtSrt(s.end_time)}`,
          `${s.speaker_name}: ${s.text}`,
          "",
        ].join("\n")
      ).join("\n");

    case "csv":
      const header = "start_time,end_time,speaker,text";
      const rows = transcript.sentences.map((s: any) =>
        `${s.start_time},${s.end_time},"${s.speaker_name}","${s.text.replace(/"/​g, '""')}"`
      );
      return [header, ...rows].join("\n");
  }
}

function fmtTime(sec: number): string {
  const m = Math.floor(sec / 60);
  const s = Math.floor(sec % 60);
  return `${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
}

function fmtSrt(sec: number): string {
  const h = Math.floor(sec / 3600);
  const m = Math.floor((sec % 3600) / 60);
  const s = Math.floor(sec % 60);
  const ms = Math.floor((sec % 1) * 1000);
  return `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")},${String(ms).padStart(3, "0")}`;
}

Step 3: PII Redaction

const PII_PATTERNS = [
  { regex: /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/​g, tag: "[EMAIL]" },
  { regex: /\b\d{3}[-.]?\d{3}[-.]?\d{4}\b/​g, tag: "[PHONE]" },
  { regex: /\b\d{3}-\d{2}-\d{4}\b/​g, tag: "[SSN]" },
  { regex: /\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/​g, tag: "[CARD]" },
  { regex: /\b\d{1,5}\s+\w+\s+(Street|St|Avenue|Ave|Road|Rd|Drive|Dr|Lane|Ln)\b/​gi, tag: "[ADDRESS]" },
];

function redactText(text: string): string {
  let result = text;
  for (const { regex, tag } of PII_PATTERNS) {
    result = result.replace(regex, tag);
  }
  return result;
}

function redactTranscript(transcript: any): any {
  return {
    ...transcript,
    // Redact organizer email
    organizer_email: redactText(transcript.organizer_email || ""),
    // Redact sentences
    sentences: transcript.sentences?.map((s: any) => ({
      ...s,
      text: redactText(s.text),
      speaker_name: s.speaker_name, // Keep speaker names for context
    })),
    // Redact summary fields too
    summary: transcript.summary ? {
      ...transcript.summary,
      overview: redactText(transcript.summary.overview || ""),
      action_items: transcript.summary.action_items?.map(redactText),
      short_summary: redactText(transcript.summary.short_summary || ""),
    } : null,
    // Redact attendee info
    meeting_attendees: transcript.meeting_attendees?.map((a: any) => ({
      displayName: a.displayName,
      email: redactText(a.email || ""),
    })),
  };
}

Step 4: Retention Policy with Automated Cleanup

interface RetentionPolicy {
  fullTranscriptDays: number;   // Keep full sentences
  summaryDays: number;          // Keep summary after transcript deleted
  deleteAfterDays: number;      // Delete everything
}

const DEFAULT_POLICY: RetentionPolicy = {
  fullTranscriptDays: 90,
  summaryDays: 365,
  deleteAfterDays: 730,
};

async function applyRetentionPolicy(policy = DEFAULT_POLICY) {
  const data = await getTranscriptList(200);
  const now = Date.now();
  const results = { kept: 0, archived: 0, deleted: 0 };

  for (const t of data.transcripts) {
    const ageDays = (now - new Date(t.date).getTime()) / 86400000;

    if (ageDays > policy.deleteAfterDays) {
      // Delete from Fireflies
      await deleteTranscript(t.id);
      results.deleted++;
    } else if (ageDays > policy.fullTranscriptDays) {
      // Archive: keep summary only in your DB
      await archiveToSummaryOnly(t.id);
      results.archived++;
    } else {
      results.kept++;
    }
  }

  console.log(`Retention applied: ${results.kept} kept, ${results.archived} archived, ${results.deleted} deleted`);
  return results;
}

async function deleteTranscript(id: string) {
  // Rate limit: 10 deletes per minute
  await fetch(FIREFLIES_API, {
    method: "POST",
    headers: {
      "Content-Type": "application/​json",
      Authorization: `Bearer ${process.env.FIREFLIES_API_KEY}`,
    },
    body: JSON.stringify({
      query: `mutation($id: String!) { deleteTranscript(transcript_id: $id) }`,
      variables: { id },
    }),
  });
  // Respect rate limit
  await new Promise(r => setTimeout(r, 6500));
}

Step 5: GDPR Data Subject Request

// Handle "right to be forgotten" requests
async function handleDataSubjectDeletion(email: string) {
  // Find all transcripts where this person participated
  const data = await fetch(FIREFLIES_API, {
    method: "POST",
    headers: {
      "Content-Type": "application/​json",
      Authorization: `Bearer ${process.env.FIREFLIES_API_KEY}`,
    },
    body: JSON.stringify({
      query: `query($participants: [String]) {
        transcripts(participants: $participants, limit: 100) {
          id title date participants
        }
      }`,
      variables: { participants: [email] },
    }),
  }).then(r => r.json());

  const affected = data.data.transcripts;
  console.log(`Found ${affected.length} transcripts with ${email}`);

  // Option 1: Delete transcripts entirely
  // Option 2: Redact the person's contributions
  // Choose based on your legal requirements

  return {
    email,
    affectedTranscripts: affected.length,
    transcriptIds: affected.map((t: any) => t.id),
  };
}

Error Handling

IssueCauseSolution
Missing sentencesTranscript still processingCheck before export
PII in action itemsRedaction only on sentencesRedact summary fields too (Step 3 does this)
Delete rate limit10 deletes/​minAdd 6.5s delay between deletes
Large transcript OOM2+ hour meetingStream or paginate sentences

Output

  • Multi-format transcript export (JSON, text, SRT, CSV)
  • PII redaction covering sentences, summaries, and attendee info
  • Automated retention policy with configurable thresholds
  • GDPR/​CCPA data subject request handler

Resources

Next Steps

For enterprise access control, see fireflies-enterprise-rbac.

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View