Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Fireflies.ai Node.js SDK

A Node.js SDK for interacting with the Fireflies.ai GraphQL API. This SDK provides a simple interface to access Fireflies.ai's meeting transcription and analysis features.

Installation

npm install @firefliesai/fireflies-node-sdk
# or
yarn add @firefliesai/fireflies-node-sdk

Quick Start

const { FirefliesSDK } = require("@firefliesai/fireflies-node-sdk");
// Or using ES modules:
// import { FirefliesSDK } from '@firefliesai/fireflies-node-sdk';

const fireflies = new FirefliesSDK({
  apiKey: process.env.FIREFLIES_API_KEY,
});

async function main() {
  try {
    // Get current user info - see docs.fireflies.ai for all available fields
    const userInfo = await fireflies.getCurrentUser(["email", "name"]);
    console.log("User:", userInfo);

    // Get recent transcripts - see docs.fireflies.ai for all available fields
    const transcripts = await fireflies.getTranscripts(
      { limit: 10, mine: true },
      ["id", "title"]
    );
    console.log("Recent transcripts:", transcripts);
  } catch (error) {
    console.error("Error:", error.message);
  }
}

main();

Environment Variables

Create a .env file in your project root:

FIREFLIES_API_KEY=your_api_key_here

Features

The SDK covers every operation in the public GraphQL API:

  • Users and teams: current user, user by ID, all users, set user role, user groups and their membership
  • Transcripts: list (all documented filters) and fetch, delete, update title, privacy and channel, share and revoke access
  • Uploads: upload from a public URL, or upload a local file directly with a pre-signed URL
  • Live meetings: add Fireflies to a meeting, list active meetings, pause and resume recording, live action items and soundbites
  • AskFred: ask questions about one meeting or across meetings, follow up, list, read and delete threads
  • Bites (soundbites): create, list, fetch
  • Channels and contacts: list channels, fetch a channel, list contacts
  • Analytics, audit log and rules: team and per-user analytics, audit events, rule executions
  • AI Apps: app outputs
  • Rate-limit awareness: automatic, bounded retry of 429 / too_many_requests honouring Retry-After; batch helper paced from the X-RateLimit-* headers; parsed state on sdk.rateLimit
  • Multi-user helpers: fetch and deduplicate meetings across several API keys

Methods that return objects take an optional fields array (the GraphQL fields to select, as strings, nested selections included). When you pass none, the method selects a sensible default set.

API Reference

For a complete list of available fields and schema information, please refer to the official Fireflies.ai documentation.

User Methods

// Get current user - see docs.fireflies.ai for all available fields
await fireflies.getCurrentUser(["email", "name"]);

// Get user by ID - see docs.fireflies.ai for all available fields
await fireflies.getUser("user_id", ["email", "name"]);

// Set user role
await fireflies.setUserRole("user_id", "admin");

Transcript Methods

// Get transcripts - see docs.fireflies.ai for all available fields
await fireflies.getTranscripts({ limit: 50, mine: true }, [
  "id",
  "title",
  "privacy",
]);

// Get single transcript - see docs.fireflies.ai for all available fields
await fireflies.getTranscript("transcript_id", ["id", "title"]);

// Delete transcript
await fireflies.deleteTranscript("transcript_id");

// Get meetings for multiple users with deduplication
const meetings = await FirefliesSDK.getMeetingsForMultipleUsers(
  ["api-key-1", "api-key-2"],
  ["id", "title", "duration", "summary { keywords action_items }"],
  "json" // or 'console' for console output
);

// Find questions from external participants
const { externalParticipants, questions } =
  await fireflies.findExternalParticipantQuestions("@yourcompany.com");
console.log("External Participants:", externalParticipants);
console.log("Questions:", questions);

// Get video URLs from meetings
const meetings = await fireflies.getMeetingVideos();
meetings.forEach((meeting) => {
  if (meeting.video_url) {
    console.log(`Meeting: ${meeting.title}\nVideo URL: ${meeting.video_url}\n`);
  }
});

// Get transcript summary
const summary = await fireflies.getTranscriptSummary("transcript_id");
console.log("Overview:", summary.overview);
console.log("Action Items:", summary.action_items);
console.log("Keywords:", summary.keywords);

Meeting Management

await fireflies.updateMeetingTitle({ id: "transcript_id", title: "Q3 planning" });
await fireflies.updateMeetingPrivacy({ id: "transcript_id", privacy: "teammates" });
await fireflies.updateMeetingChannel({ transcript_ids: ["t1", "t2"], channel_id: "channel_id" });

// Share with up to 50 people, optionally expiring after 7, 14 or 30 days
await fireflies.shareMeeting({ meeting_id: "transcript_id", emails: ["a@example.com"], expiry_days: 14 });
await fireflies.revokeSharedMeetingAccess({ meeting_id: "transcript_id", email: "a@example.com" });

// Search transcripts by keyword in titles and sentences
await fireflies.getTranscripts({ keyword: "pricing", scope: "all", fromDate: "2026-01-01T00:00:00.000Z" }, ["id", "title"]);

Live Meetings

const meetings = await fireflies.getActiveMeetings({ states: ["active"] });

await fireflies.updateMeetingState({ meeting_id: meetings[0].id, action: "pause_recording" });
await fireflies.createLiveActionItem({ meeting_id: meetings[0].id, prompt: "Send the deck to the client" });
await fireflies.createLiveSoundbite({ meeting_id: meetings[0].id, prompt: "The pricing discussion" });
const items = await fireflies.getLiveActionItems(meetings[0].id);

AskFred

const { message } = await fireflies.createAskFredThread({
  query: "What did we decide about the launch date?",
  transcript_id: "transcript_id", // or `filters` to search across meetings
});
console.log(message.answer);

const followUp = await fireflies.continueAskFredThread({ thread_id: message.thread_id, query: "Who owns it?" });

const threads = await fireflies.getAskFredThreads();
const thread = await fireflies.getAskFredThread(message.thread_id);
await fireflies.deleteAskFredThread(message.thread_id);

Channels, Contacts and User Groups