Summary
Data you can sync
Sync Fireflies AI call summaries and selected call data into Planhat as Conversations
Sync direction
One direction: from Fireflies to Planhat
Sync frequency
Near instant, through webhooks
Who is this article for?
Anyone interested in syncing Fireflies data to Planhat
Article contents
Introduction
The Planhat integration with Fireflies enables automatic logging of AI-enriched call data, synced in as Conversations mapped to the relevant Company and End User(s) within Planhat.
This streamlines Customer Success and Sales processes:
It removes the need for manual note-taking and analysis, saving you time
It enables you and your colleagues to get a full 360-degree view of your customers/prospects, as your meeting data can be viewed and analyzed alongside all other data types in Planhat
In this article we show you what the Fireflies integration looks like, describe the advantages it brings you, and explain how to set it up.
What is the Fireflies integration?
The Fireflies integration is a "light" integration. It's actually a Custom Automation that you can build in the App Center of your Planhat tenant - we give instructions below, and you can speak with your Planhat TDS (previously called TAM) if you need additional support.
Once configured, Fireflies data will be synced into Planhat and saved on the Conversation model, and linked to the appropriate Company and End User(s).
More specifically, when a meeting is processed in Fireflies, Planhat automatically saves this as a new Conversation record as follows:
The subject is set - "Fireflies Meeting" as shown in the screenshot below
The Conversation Type is set to a specific value as defined when the integration is set up - "Demo" in the screenshot below
The "Team Members" field is populated with the Planhat Users (you or your colleagues) who were involved in the meeting
The "Involved Contacts" field is populated with the relevant Planhat End Users (prospects or customers)
The Fireflies URL is added to the "Call Recording" field
The "Description" is populated with a rich HTML-formatted meeting summary:
"Gist"
"Bullet Gist"
"Short Summary"
"Action Items"
"Keywords"
... as shown in the screenshot below
Conversation records created via the Fireflies integration will look similar to this:
(You can click the images above to view them enlarged. The gray boxes are where customer information has been hidden for the image.)
π Definitions
CRM data in Planhat is structured into "models", similar to the "objects" you may be familiar with from other tools
"Company" is the model representing businesses/organizations that are your prospects or customers
"End User" is the model representing individual people at those Companies
"Conversation" is the model representing communication ("logged activities"), including emails, tickets, calls and meetings etc.
"Records" correspond to data within those models - e.g. for the Company model, a record could be Apple; for the End User model, a record could be Becky Booth; and for the Conversation model, a record could be a Kick-Off Call with Company X
Why use the Fireflies integration?
The Fireflies integration has many key features and benefits, including:
Fireflies gives you AI-powered meeting analysis - you save time as you don't need to manually write up your own detailed notes after every meeting and extract action points etc.
Meeting data is automatically synced into Planhat (your CRM or CSP) - you do not need to manually copy in notes from Fireflies
You have near-instant visibility into what was discussed on customer/prospect meetings/calls
In Planhat, all your different types of customer/prospect data is centralized together in one place, rather than being split in multiple separate tools, so you have a complete understanding and can act appropriately
In addition to providing the call notes and action points etc. for the Planhat user who was on the call, other team members (e.g. Support) can also view the details to gain context for when they are working with this customer/prospect
How to set up the Fireflies integration
π Important to note
Depending on your package, you may already have this integration (Automation) in your Planhat tenant. If you don't and would like to add it, you can either follow these instructions to set it up yourself, or a Planhat Technical Deployment Specialist (TDS - formerly TAM) may help build it for you.
π Important to note
This article describes version 2 of this Automation. If your tenant has a Fireflies Automation set up in the past, it may be slightly different.
Preliminary steps in Planhat
Before you build the Automation, there are a few things to set up in your Planhat tenant:
Custom Conversation Type
Each Fireflies meeting is saved as a Conversation record in Planhat. Each Conversation record has a corresponding Conversation Type
You can create your own custom Conversation Types in Planhat
In the Fireflies Automation as shown in this article, we use a custom Conversation Type called "Demo" - so you should either create this following the instructions in the article linked to above (assuming you don't already have this particular Conversation Type); or if you want to use a different Conversation Type, you can do so, but note that this name is referenced in the Automation so you will need to take that into account when building your Automation
Custom Field
Most of the fields on the Conversation model that we use in this Automation are system (i.e. standard/default) fields, but we save the Fireflies call link in a custom field called "Call Recording"
Again, assuming you want to copy the setup described in this article, you should create a field (type: URL) on the Conversation model called "Call Recording" (following the general instructions here)
If you use a different field - with a different name - then make a note of it when you're building the Automation, as it's referenced
Connection
"Connections" are a feature in Planhat that you can use to connect to third-party tools such as Fireflies. You need to set up a connection in Planhat for Fireflies to use in the Automation
To do this:
Go to the "App Center" (one of the Global Tools for admins) by clicking on your tenant logo or name in the top left of your tenant
Click on "Connections" in the bottom left of the App Center
Click on "+ Connection" in the top right, and then click on "Custom connection" at the bottom of the dropdown list
Give your connection a name (e.g. "Fireflies"), and leave "Authentication" on "API Token"
This will open up the following form to fill in for your new connection:
In the "Authentication" section:
For "API Token", paste in the API key copied from "Settings" in Fireflies - we show a screenshot later in this article
For "API Base URL*", enter "https://api.fireflies.ai"
In the "Auth Headers" section:
In the "Endpoints" section:
Click "+ Add endpoint" to open up this modal to complete:
In "Action name", enter
Get Transcript Details
You can leave "Action description" blank
In "URL path", enter
/graphql
In "HTTP Method", use the dropdown menu to select
POST
. This will open up another couple of fields for you to fill inFor "Content Type", leave this as
application/json
For "Body", enter:
{
"query": "query Transcript($transcriptId: String!) { transcript(id: $transcriptId) { transcript_url meeting_attendees { displayName email phoneNumber } summary { keywords action_items outline shorthand_bullet overview bullet_gist gist short_summary short_overview meeting_type topics_discussed transcript_chapters } } }",
"variables": {
"transcriptId": "<<Step 1.meetingId>>"
}
}
π Important to note: You will notice "Step 1" mentioned above. This refers to a step in the Automation that has been renamed from the automatic random name that steps originally have (such as "s-rOh"). You should make sure you rename this step to "Step 1" when you build the Automation, to match up with this connection, or else you will need to reference your actual other step name within this "Body".
Click "Add" in the bottom right; this will close the modal
Click on "Save" in the top right to save your connection
Preliminary steps in Fireflies
Click the image to view it enlarged
API key
In the Fireflies "Settings" (then under "Developer Settings"), you will find the "API Key" (see screenshot above).
You will need to copy this into the "API Token" field when you set up a connection in Planhat for Fireflies, as we described above.
Webhook
The Automation in Planhat is triggered when it receives an incoming webhook from Fireflies. You need to set up the webhook in Fireflies:
Go to Settings and scroll down to the "Webhook" part (see screenshot above) in the "Developer Settings" section
Paste in the Planhat webhook URL*
Save
*This is a URL unique to your Automation. To get it, you need to start building the Automation in Planhat (instructions below), and save it. Then, when you open it and select the incoming webhook trigger, you will see a "Copy URL" button, as shown in this screenshot:
You can read more about building Automations with webhooks (more generally) here, and see the instructions specifically for the Fireflies Custom Automation below.
Custom Automation in Planhat
Within Planhat, the Fireflies "integration" is actually a Custom Automation, which you can build in your Planhat tenant, within the App Center. You can read about setting up Custom Automations generally here, and we'll link to more specific Custom Automation articles (e.g. about step types) below. In this article, we will focus specifically on the details of the Fireflies Automation.
Your overall Automation will look similar to this:
π Important to note
Each step of a Custom Automation (so that's after the trigger) is automatically assigned a random name such as "s-SKc" (as you can see in the branch step above). You can rename individual steps (e.g. to "Step 1"), as described here. This renaming can make things clearer in the UI. Note that if you then refer to that step in a replacement code in a subsequent step, you need to use its actual current step name, whether that's a random code name or an edited name.
To summarize the process of the Fireflies Automation, shown in the screenshot above:
Step 1 - this "Execute Function" step checks if the incoming webhook payload has a meetingId to use to find the transcript
Branch step - "gracefully" stops automation execution (without failure/error) if the meetingId is not provided
Wait step - ensures that the transcript is actually available, as the Fireflies webhook may be sent early
Step 2 - this "Connection" step, also called a "Use an integration" step, uses the connection that you set up in a Planhat preliminary step to fetch the transcript data from Fireflies
Step 3 is another "Execute Function" step - this one formats the transcript and creates a Conversation record
This step is where the majority of the integration logic resides. Its main purpose is to extract non-Planhat meeting attendees, match them to End Users in Planhat, and build a Conversation based on the transcript and summary data
The Conversation includes an HTML-formatted summary which includes the gist in bullet points and text, as well as action items and keywords pertaining to the meeting
The full transcript is saved via a custom field containing an external link to the transcript itself
Let's look at each of these steps in further detail.
Trigger - incoming webhook
The trigger for this Automation is an incoming webhook from Fireflies.
It's set to "anything" (as shown), but it's connected to Fireflies by clicking "Copy URL" (which gives a unique URL for this Automation) and pasting that into Fireflies, as we mentioned above.
Step 1 - function
This "Execute Function" step checks if the incoming webhook payload has a meetingId to use to find the transcript.
You can copy and paste the following into your step.
var webhookData = <<update>>;
const meetingId = webhookData.meetingId;
if (!meetingId) return {
hasMeeting: false
};
// Return meetingId to next step
return {
hasMeeting: true,
meetingId
};
Remember to rename your step to "Step 1", as we reference this step name elsewhere in this integration (in both the connection and the Automation).
Branch step
The next step is a branch. It's used to apply a condition that checks that the meetingId has been provided, and only proceeds with the rest of the Automation if it has.
Click the image to view it enlarged
Wait step
This step schedules a brief pause in the Automation run to give slightly more time for the transcript to be available in Fireflies.
Click the image to view it enlarged
Step 2 - use connection
This step type is called "Use an integration" or "Connection", and in it we use the connection that we set up in a Planhat preliminary step. In this step, we use the Fireflies API to fetch the transcript data from Fireflies.
Click the image to view it enlarged
Step 3 - function
This is another "Execute Function" step. This one takes the transcript from Fireflies, processes it and saves it as a Conversation record in Planhat. Remember, we showed an example of the Conversation output at the beginning of this article.
Click the image to view it enlarged
You can copy and paste the following code into your step:
const data = <<Step 2>>;
const transcript = data.data.transcript || {};
const title = transcript.title || "Fireflies Meeting";
const attendees = transcript.meeting_attendees || [];
const users = [];
const endusers = [];
let companyId = null;
for (const attendee of attendees) {
if (!attendee.email) {
continue;
}
const internalUser = await ph.models.users.getAll({ email: attendee.email });
if (internalUser && internalUser.length > 0) {
users.push({ _id: internalUser[0]._id, email: attendee.email });
continue;
}
const externalUser = await ph.models.endUsers.getAll({ email: attendee.email });
if (externalUser && externalUser.length > 0) {
endusers.push({ email: attendee.email });
if (!companyId) {
companyId = externalUser[0].companyId;
}
}
}
if(!endusers?.length || !companyId) return "Enduser and company data not available.";
// Build description HTML
const description = `
<strong>Gist:</strong><br>${transcript.summary?.gist || ""}<br><br>
<strong>Bullet Gist:</strong><br>${transcript.summary?.bullet_gist || ""}<br><br>
<strong>Summary:</strong><br>${transcript.summary?.short_summary || ""}<br><br>
<strong>Action Items:</strong><br>${transcript.summary?.action_items || ""}<br><br>
<strong>Keywords:</strong><br>${transcript.summary?.keywords?.join(", ") || ""}<br>
`;
const conversationPayload = {
subject: title,
externalId: transcript.id,
type: "Demo",
endusers,
users,
companyId,
description,
custom: {
"Call Recording": transcript?.transcript_url
}
};
return await ph.models.conversations.create(conversationPayload);