b578ea5951
# Fireflies Automatically (with cli util : webhook not working and no cron added) captures meeting notes with AI-generated summaries and insights from Fireflies.ai into your Twenty CRM. ## Current Status - Doesn't work with Fireflies webhook yet due to missing headers forwarding in twenty serverless func - Meeting ingestion utility script are available for individual meeting insertion and historical meetings with filters with yarn meeting:all - You have to push the secrets as application.config.ts values (despite env variables in .env in docker compose or container I couldn't push the secrets with the cli) ## Current Platform Limitation (Headers) - Twenty serverless route triggers currently do **not forward HTTP headers** to functions. Fireflies signatures sent in headers are stripped, so header-based verification does not work in production. - Workaround: the provided test script also includes the signature inside the payload; the handler falls back to that payload signature. Use this only for testing until header forwarding is supported. ## Utilities for meeting insertion (workarounds) - Ingest a specific Fireflies meeting into Twenty: `yarn meeting:ingest <meetingId>` or `MEETING_ID=... yarn meeting:ingest` - Fetch all/historical Fireflies meetings into Twenty: `yarn meeting:all [--from 2024-01-01] [--to 2024-02-01] [--organizer a@x.com] [--participant b@x.com] [--channel <channelId>] [--mine] [--dry-run]` - Filters (combine as needed): - `--from` / `--to`: ISO or date string range filter - `--organizer` / `--participant`: comma-separated emails - `--channel`: Fireflies channel id - `--mine`: only meetings for the current Fireflies user - Controls: - `--dry-run`: list and transform without writing to Twenty - `--page-size`: pagination size (default 50) - `--max-records`: stop after N transcripts (default 500) I am closing previous #16378 as this one includes it all
41 lines
988 B
TypeScript
41 lines
988 B
TypeScript
import { WebhookHandler } from '../webhook-handler';
|
|
|
|
describe('WebhookHandler log capture', () => {
|
|
const originalEnv = process.env;
|
|
|
|
beforeEach(() => {
|
|
process.env = {
|
|
...originalEnv,
|
|
FIREFLIES_WEBHOOK_SECRET: 'testsecret',
|
|
FIREFLIES_API_KEY: '',
|
|
TWENTY_API_KEY: '',
|
|
CAPTURE_LOGS: 'false',
|
|
LOG_LEVEL: 'silent',
|
|
};
|
|
});
|
|
|
|
afterEach(() => {
|
|
process.env = originalEnv;
|
|
});
|
|
|
|
it('includes debug logs in response when CAPTURE_LOGS is true', async () => {
|
|
process.env.CAPTURE_LOGS = 'true';
|
|
|
|
const handler = new WebhookHandler();
|
|
const result = await handler.handle(null);
|
|
|
|
expect(result.success).toBe(false);
|
|
expect(Array.isArray(result.debug)).toBe(true);
|
|
});
|
|
|
|
it('omits debug logs when CAPTURE_LOGS is false', async () => {
|
|
process.env.CAPTURE_LOGS = 'false';
|
|
|
|
const handler = new WebhookHandler();
|
|
const result = await handler.handle(null);
|
|
|
|
expect(result.debug).toBeUndefined();
|
|
});
|
|
});
|
|
|