> ## Documentation Index
> Fetch the complete documentation index at: https://docs.triplesession.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Existing Meetings from Fathom

> Bring your Fathom meeting history into AI Coach with a copy-paste script, and send every new Fathom meeting automatically with Zapier.

Move your Fathom history into Triple Session so AI Coach reviews past calls and your reps' scorecards start with real data.

Both options send Fathom meetings to a **Webhook Received** automation with a **Review Meeting** action, the same setup used to [import from any platform](https://docs.triplesession.com/integrations/review-from-other-platforms):

| Option | Use it for | Code |
| - | - | - |
| [Import script](#import-past-meetings-with-a-script) | Every meeting already in Fathom. Run it once. Sends transcripts. | Copy and run a Python or Node.js script. |
| [Zapier](#send-new-meetings-with-zapier) | Every new Fathom meeting from now on. Sends recordings. | None. |

Most teams use both: turn on the Zap first, then run the script with `CREATED_BEFORE` set to the moment the Zap went live.

## Requirements

* A Triple Session company admin role and access to [Automations](https://docs.triplesession.com/automations/getting-started.md).
* Each Fathom recorder's email belongs to a Triple Session member of your company with a recording seat, plus VoIP credits for transcripts (script) or standard credits for recordings (Zapier).
* For the script: Python 3.8+ or Node.js 18+, and a Fathom API key.
* For Zapier: a Zapier plan that includes **Webhooks by Zapier**.

## Set up the automation in Triple Session

**1. Create the automation**

Go to **Settings > Automations** and click **New Automation**. Set the **Trigger** to **Webhook Received** and add a **Review Meeting** action. Pick a scorecard, or use smart scorecard selection.

**2. Copy the webhook details**

Open the trigger and keep **Signed or API key** selected. Copy three values:

* The **Webhook URL** from **Endpoint**.
* The `x-ts-automation-id` value from **Headers to send**.
* The **Webhook secret**.

![Webhook trigger settings with the Endpoint, the webhook secret and the headers to send](https://mintcdn.com/triplesession/MTMWYCXdclNVsNyD/images/automations/review-meetings-trigger-endpoint-auth.jpg?fit=max\&auto=format\&n=MTMWYCXdclNVsNyD\&q=85\&s=a0a5b9313b2dc9083bd930d77a4ae57b)

**3. Turn the automation live**

Save the automation and click **Live**.

The same automation receives meetings from the script and from Zapier.

## Import past meetings with a script

The script reads your meetings from the Fathom API, page by page, and sends each transcript to your automation. It runs on your computer, and your keys never leave it.

**1. Generate a Fathom API key**

In Fathom, go to **Settings**. Under **API Access**, click **Add**.

![Fathom Settings with the Add button on the API Access card](https://mintcdn.com/triplesession/nYdxlRslOj2vxD-d/images/automations/import-fathom-api-key.jpg?fit=max\&auto=format\&n=nYdxlRslOj2vxD-d\&q=85\&s=893e3977c40bf3c273a8bba07914bbab)

Choose **Generate Api Key**, give the key a name such as `Triple Session import`, and click **Create API Client**. Copy the **API Key**. Fathom only shows it once. The script doesn't use the **Webhook Secret**.

![Fathom confirmation page with the new API key, the copy button and the warning that the key is only visible once](https://mintcdn.com/triplesession/nYdxlRslOj2vxD-d/images/automations/import-fathom-api-key-created.jpg?fit=max\&auto=format\&n=nYdxlRslOj2vxD-d\&q=85\&s=59576fdca4482973aa21b687b90095c2)

> [!NOTE]
>
> A Fathom key reads the meetings you recorded and the meetings shared with you or your team. To import your whole team's history, generate the key as a Fathom admin with view access to all shared calls. Private calls are only visible to the person who recorded them.

**2. Save the script**

Copy one version into a file. Both do the same thing and only use the standard library.

> [tab] Python
>
> Save as `import_fathom.py`. Requires Python 3.8 or later.
>
> ```python import_fathom.py theme={null}
> # Imports past Fathom meetings into Triple Session. Python 3.8+, no dependencies.
> import json, os, time, urllib.error, urllib.parse, urllib.request
> from datetime import datetime
>
> FATHOM_API = "https://api.fathom.ai/external/v1"
> FATHOM_API_KEY = os.environ["FATHOM_API_KEY"]
> TS_WEBHOOK_URL = os.environ["TS_WEBHOOK_URL"]
> TS_AUTOMATION_ID = os.environ["TS_AUTOMATION_ID"]
> TS_WEBHOOK_SECRET = os.environ["TS_WEBHOOK_SECRET"]
> CREATED_AFTER = os.environ.get("CREATED_AFTER")    # optional, e.g. 2026-01-01T00:00:00Z
> CREATED_BEFORE = os.environ.get("CREATED_BEFORE")  # optional, e.g. the day your Zap went live
> DRY_RUN = os.environ.get("DRY_RUN") == "1"
>
>
> def request(url, headers, body=None, attempts=6):
>     """GET (or POST when body is set). Waits and retries on 429, 5xx and network errors."""
>     for attempt in range(1, attempts + 1):
>         req = urllib.request.Request(url, data=body, headers=headers)
>         try:
>             with urllib.request.urlopen(req, timeout=60) as res:
>                 return json.load(res)
>         except urllib.error.HTTPError as error:
>             if (error.code != 429 and error.code < 500) or attempt == attempts:
>                 raise RuntimeError(f"{error.code} {error.read().decode()}")
>             wait = int(error.headers.get("Retry-After") or 2 ** attempt)
>         except urllib.error.URLError:
>             if attempt == attempts:
>                 raise
>             wait = 2 ** attempt
>         print(f"  waiting {wait}s before retrying...")
>         time.sleep(wait)
>
>
> def fathom_meetings():
>     params = {
>         "include_transcript": "true",
>         "calendar_invitees_domains_type": "one_or_more_external",  # skip internal-only meetings
>     }
>     if CREATED_AFTER:
>         params["created_after"] = CREATED_AFTER
>     if CREATED_BEFORE:
>         params["created_before"] = CREATED_BEFORE
>     while True:
>         url = f"{FATHOM_API}/meetings?{urllib.parse.urlencode(params)}"
>         page = request(url, {"X-Api-Key": FATHOM_API_KEY})
>         yield from page["items"]
>         if not page.get("next_cursor"):
>             return
>         params["cursor"] = page["next_cursor"]
>
>
> def parse_time(value):
>     return datetime.fromisoformat(value.replace("Z", "+00:00"))
>
>
> def to_payload(meeting):
>     lines = [
>         f"[{item['timestamp']}] {item['speaker']['display_name']}: {item['text']}"
>         for item in meeting["transcript"]
>     ]
>     start = parse_time(meeting["recording_start_time"])
>     end = parse_time(meeting["recording_end_time"])
>     return {
>         "sales_rep_email": meeting["recorded_by"]["email"],
>         "meeting_id": f"fathom-{meeting['recording_id']}",
>         "meeting_name": meeting["title"],
>         "meeting_date": meeting["recording_start_time"],
>         "meeting_duration_in_minutes": max(1, round((end - start).total_seconds() / 60)),
>         "transcript_body": "\n".join(lines),
>         "custom_metadata": {"source_platform": "fathom", "fathom_url": meeting["share_url"]},
>     }
>
>
> sent = failed = 0
> for meeting in fathom_meetings():
>     label = f"{meeting['created_at']}  {meeting['title']}"
>     if not meeting.get("transcript"):
>         print(f"skip   {label} (no transcript)")
>         continue
>     payload = to_payload(meeting)
>     if DRY_RUN:
>         print(f"ready  {label} -> {payload['sales_rep_email']}")
>         continue
>     try:
>         request(TS_WEBHOOK_URL, {
>             "content-type": "application/json",
>             "x-ts-automation-id": TS_AUTOMATION_ID,
>             "x-ts-automation-api-key": TS_WEBHOOK_SECRET,
>         }, json.dumps(payload).encode())
>         sent += 1
>         print(f"sent   {label}")
>     except RuntimeError as error:
>         failed += 1
>         print(f"FAILED {label}: {error}")
>
> print(f"Done. Sent {sent}, failed {failed}.")
> ```

> [tab] Node.js
>
> Save as `import-fathom.mjs`. Requires Node.js 18 or later.
>
> ```js import-fathom.mjs theme={null}
> // Imports past Fathom meetings into Triple Session. Node.js 18+, no dependencies.
> const FATHOM_API = "https://api.fathom.ai/external/v1";
> const {
>   FATHOM_API_KEY,
>   TS_WEBHOOK_URL,
>   TS_AUTOMATION_ID,
>   TS_WEBHOOK_SECRET,
>   CREATED_AFTER, // optional, e.g. 2026-01-01T00:00:00Z
>   CREATED_BEFORE, // optional, e.g. the day your Zap went live
>   DRY_RUN,
> } = process.env;
>
> const sleep = (seconds) => new Promise((resolve) => setTimeout(resolve, seconds * 1000));
>
> // Waits and retries on 429, 5xx and network errors.
> async function request(url, options = {}, attempts = 6) {
>   for (let attempt = 1; attempt <= attempts; attempt += 1) {
>     let response;
>     try {
>       response = await fetch(url, options);
>     } catch (error) {
>       if (attempt === attempts) throw error;
>     }
>     if (response?.ok) return response.json();
>     if (response && response.status !== 429 && response.status < 500) {
>       throw new Error(`${response.status} ${await response.text()}`);
>     }
>     if (attempt === attempts) throw new Error(`${response.status} after ${attempts} attempts`);
>     const wait = Number(response?.headers.get("retry-after")) || 2 ** attempt;
>     console.log(`  waiting ${wait}s before retrying...`);
>     await sleep(wait);
>   }
> }
>
> async function* fathomMeetings() {
>   const params = new URLSearchParams({
>     include_transcript: "true",
>     calendar_invitees_domains_type: "one_or_more_external", // skip internal-only meetings
>   });
>   if (CREATED_AFTER) params.set("created_after", CREATED_AFTER);
>   if (CREATED_BEFORE) params.set("created_before", CREATED_BEFORE);
>   while (true) {
>     const page = await request(`${FATHOM_API}/meetings?${params}`, {
>       headers: { "X-Api-Key": FATHOM_API_KEY },
>     });
>     yield* page.items;
>     if (!page.next_cursor) return;
>     params.set("cursor", page.next_cursor);
>   }
> }
>
> function toPayload(meeting) {
>   const lines = meeting.transcript.map(
>     (item) => `[${item.timestamp}] ${item.speaker.display_name}: ${item.text}`,
>   );
>   const minutes = (Date.parse(meeting.recording_end_time) - Date.parse(meeting.recording_start_time)) / 60000;
>   return {
>     sales_rep_email: meeting.recorded_by.email,
>     meeting_id: `fathom-${meeting.recording_id}`,
>     meeting_name: meeting.title,
>     meeting_date: meeting.recording_start_time,
>     meeting_duration_in_minutes: Math.max(1, Math.round(minutes)),
>     transcript_body: lines.join("\n"),
>     custom_metadata: { source_platform: "fathom", fathom_url: meeting.share_url },
>   };
> }
>
> let sent = 0;
> let failed = 0;
> for await (const meeting of fathomMeetings()) {
>   const label = `${meeting.created_at}  ${meeting.title}`;
>   if (!meeting.transcript?.length) {
>     console.log(`skip   ${label} (no transcript)`);
>     continue;
>   }
>   const payload = toPayload(meeting);
>   if (DRY_RUN === "1") {
>     console.log(`ready  ${label} -> ${payload.sales_rep_email}`);
>     continue;
>   }
>   try {
>     await request(TS_WEBHOOK_URL, {
>       method: "POST",
>       headers: {
>         "content-type": "application/json",
>         "x-ts-automation-id": TS_AUTOMATION_ID,
>         "x-ts-automation-api-key": TS_WEBHOOK_SECRET,
>       },
>       body: JSON.stringify(payload),
>     });
>     sent += 1;
>     console.log(`sent   ${label}`);
>   } catch (error) {
>     failed += 1;
>     console.log(`FAILED ${label}: ${error.message}`);
>   }
> }
>
> console.log(`Done. Sent ${sent}, failed ${failed}.`);
> ```

**3. Set your keys**

In a terminal, set the four required values. Add `CREATED_AFTER` or `CREATED_BEFORE` to limit the date range.

```bash theme={null}
export FATHOM_API_KEY="your-fathom-api-key"
export TS_WEBHOOK_URL="https://app.triplesession.com/api/webhooks/automations/..."
export TS_AUTOMATION_ID="your-x-ts-automation-id"
export TS_WEBHOOK_SECRET="your-webhook-secret"

# Optional: only meetings in this range
export CREATED_AFTER="2026-01-01T00:00:00Z"
export CREATED_BEFORE="2026-11-26T00:00:00Z"
```

**4. Preview the import**

Run the script with `DRY_RUN=1`. It lists every meeting it would send, with the rep email, and sends nothing.

```bash Python theme={null}
DRY_RUN=1 python3 import_fathom.py
```

```bash Node.js theme={null}
DRY_RUN=1 node import-fathom.mjs
```

Check that each rep email matches a Triple Session member. Meetings for other emails are accepted but never reviewed.

**5. Run the import**

Run the same command without `DRY_RUN`. Each meeting prints one line:

```text theme={null}
sent   2026-11-20T17:01:30Z  Acme - Discovery call
skip   2026-11-19T15:12:04Z  Quick sync (no transcript)
sent   2026-11-18T14:00:51Z  Globex - Demo
```

Reviews appear in **AI Coach** under each rep's calls, and each run appears in the automation's **Logs**.

### How the script maps Fathom data

| Triple Session field | Fathom value |
| - | - |
| `sales_rep_email` | Email of the person who recorded the meeting (`recorded_by.email`). |
| `meeting_id` | `fathom-` plus the Fathom `recording_id`. |
| `meeting_name` | Fathom meeting title. |
| `meeting_date` | Recording start time. |
| `meeting_duration_in_minutes` | Recording end time minus start time. |
| `transcript_body` | One line per transcript item: `[00:05:32] Alice Johnson: Let's revisit the budget.` |
| `custom_metadata` | `source_platform: "fathom"` and the Fathom share link. |

The script skips meetings with only internal attendees. To import internal meetings too, delete the `calendar_invitees_domains_type` line.

### Large histories

* Your automation accepts 150 requests per hour by default. When the script reaches the limit, it waits for the time in `Retry-After` and continues, so 600 meetings take about four hours. Leave the terminal open, or [contact support](mailto:support@triplesession.com) to raise the limit before a large import.
* Fathom returns the newest meetings first. If the script stops, set `CREATED_BEFORE` to the date on the last `sent` line and run it again.
* Each `meeting_id` is accepted once per 24 hours. After that, sending the same meeting again creates a second review, so limit reruns with `CREATED_AFTER` and `CREATED_BEFORE`.

## Send new meetings with Zapier

Zapier's Fathom triggers run for meetings recorded after the Zap is turned on. Use this Zap to keep Triple Session in sync from now on, and the [script](#import-past-meetings-with-a-script) for everything before it.

**1. Connect Fathom to Zapier**

In Fathom, go to **Settings**, find **Zapier** and click **Connect**.

**2. Add the Fathom trigger**

Create a Zap. On the **Setup** tab, choose **Fathom** as the app, **New Download Video** as the trigger event, and your Fathom account.

![Zap with the Fathom New Download Video trigger followed by a Webhooks by Zapier POST action](https://mintcdn.com/triplesession/nYdxlRslOj2vxD-d/images/automations/import-fathom-zapier-trigger.jpg?fit=max\&auto=format\&n=nYdxlRslOj2vxD-d\&q=85\&s=ca61f36600d71b53b234afddc7b993b2)

On the **Configure** tab, set **Trigger on**:

* **Team Meetings** to send your team's meetings from one Zap.
* **My Meetings** to send only the meetings you record.

Then test the trigger to load a sample meeting. Each run gets a temporary download link for the meeting's video, which Triple Session downloads right away.

**3. Add a Webhooks by Zapier POST action**

Add **Webhooks by Zapier** as the action and choose **POST**. Fill in:

* **URL**: the **Webhook URL** from your automation.
* **Payload Type**: `json`.
* **Data**: map each Triple Session field to a field from the Fathom trigger.
* **Headers**: `x-ts-automation-id` and `x-ts-automation-api-key` with the values from your automation.

| Data key | Fathom field to map |
| - | - |
| `sales_rep_email` | The recorder's email. |
| `recording_url` | The video download link. |
| `meeting_id` | Type `fathom-`, then map the recording ID. |
| `meeting_name` | The meeting title. |
| `meeting_date` | The recording start time. |

![Webhooks by Zapier POST action with the Triple Session webhook URL, mapped Fathom fields and authentication headers](https://mintcdn.com/triplesession/nYdxlRslOj2vxD-d/images/automations/import-fathom-zapier-action.jpg?fit=max\&auto=format\&n=nYdxlRslOj2vxD-d\&q=85\&s=d90201e910f7c8952f4febf0df92b358)

> [!TIP]
>
> Use the same `fathom-` prefix as the script. Both then send the same `meeting_id` for a meeting, so a meeting sent by both within 24 hours is only reviewed once.

**4. Test and publish**

Click **Test step**. Triple Session answers `200` with `Automation started`, and the run appears in the automation's **Logs**. Publish the Zap.

## Troubleshooting

| What you see | What to do |
| - | - |
| `401` from Triple Session | Check `TS_AUTOMATION_ID` and `TS_WEBHOOK_SECRET`, and that the automation is **Live**. |
| `401` from Fathom | Check `FATHOM_API_KEY`, and that the Fathom user is still active. |
| `200` but no run in **Logs** | The recorder's email doesn't match a Triple Session member of your company. |
| A teammate's meetings are missing | Their meetings are private in Fathom, or not shared with the key's owner. Ask them to run the script with their own key. |
| `skip ... (no transcript)` | Fathom has no transcript for that meeting, for example a call with no speech. |

For every field, response code and limit, see [Send Recordings for Review with a Webhook](https://docs.triplesession.com/automations/review-meeting-webhook.md). For other tools, see [Import from other platforms](https://docs.triplesession.com/integrations/review-from-other-platforms).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.