fix(fireflies): support V2 webhook payload format for meetingId mapping by waleedlatif1 · Pull Request #4221 · simstudioai/sim · GitHub
Skip to content

fix(fireflies): support V2 webhook payload format for meetingId mapping#4221

Merged
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/fix-fireflies-trigger-v2
Apr 18, 2026
Merged

fix(fireflies): support V2 webhook payload format for meetingId mapping#4221
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/fix-fireflies-trigger-v2

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Fireflies V2 webhooks use snake_case fields (meeting_id, event, client_reference_id) instead of V1 camelCase (meetingId, eventType, clientReferenceId)
  • formatInput now auto-detects V1 vs V2 payloads and maps fields correctly
  • Added timestamp output field exposed by V2 webhooks
  • Updated setup instructions to mention both V1 and V2 webhook support

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Fireflies V2 webhooks use snake_case field names (meeting_id, event,
client_reference_id) instead of camelCase (meetingId, eventType,
clientReferenceId). The formatInput handler now auto-detects V1 vs V2
payloads and maps fields correctly, fixing empty meetingId on V2 webhooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 18, 2026

PR Summary

Medium Risk
Changes webhook payload parsing for Fireflies triggers to auto-detect V1 vs V2 field formats, which could affect production workflows if detection/mapping is wrong. Adds a new optional timestamp output that downstream workflows may begin to rely on.

Overview
Adds automatic support for Fireflies V2 webhook payloads by detecting snake_case fields (meeting_id, event, client_reference_id) and mapping them into the existing trigger input shape.

Exposes an optional timestamp (ms since epoch) from webhook payloads in both the Fireflies block outputs and the fireflies_transcription_complete trigger, and updates trigger setup instructions/descriptions to mention V1/V2 support.

Reviewed by Cursor Bugbot for commit 2586e7d. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 18, 2026

Greptile Summary

This bug fix adds V2 webhook payload support to the Fireflies integration, auto-detecting format by checking for both meeting_id and event (snake_case) fields and mapping them to the correct output keys. A timestamp output is also added, with a Number.isFinite guard to prevent NaN from propagating into downstream blocks.

Prior review concerns — the || vs && detection heuristic and the NaN timestamp issue — are both addressed in this revision.

Confidence Score: 5/5

Safe to merge — prior P0/P1 concerns are resolved and the implementation is correct.

Both issues raised in prior review rounds (OR vs AND detection heuristic, NaN timestamp propagation) are fixed. No new P0/P1 findings introduced. Remaining observations are P2-level at most.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/lib/webhooks/providers/fireflies.ts Core V2 detection and field-mapping logic; AND heuristic is correct, NaN guard is present, overall clean
apps/sim/triggers/fireflies/transcription_complete.ts Adds timestamp output and updates setup instructions to mention V2; no issues found
apps/sim/blocks/blocks/fireflies.ts Adds timestamp to block outputs; minimal, correct change

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Incoming Fireflies Webhook POST] --> B{Detect Version}
    B -->|meeting_id AND event are strings| C[V2 Snake_case Mapping]
    B -->|otherwise| D[V1 CamelCase Mapping]
    C --> E[meetingId = meeting_id\neventType = event\nclientReferenceId = client_reference_id]
    D --> F[meetingId = meetingId\neventType = eventType\nclientReferenceId = clientReferenceId]
    E --> G[Extract timestamp]
    F --> G
    G -->|b.timestamp != null| H{Number.isFinite?}
    H -->|yes| I[Include timestamp in output]
    H -->|no / NaN| J[Omit timestamp from output]
    I --> K[Return FormatInputResult]
    J --> K
Loading

Reviews (2): Last reviewed commit: "fix(fireflies): guard against NaN timest..." | Re-trigger Greptile

Comment thread apps/sim/lib/webhooks/providers/fireflies.ts Outdated
Comment thread apps/sim/lib/webhooks/providers/fireflies.ts Outdated
Address PR review feedback:
- Use Number.isFinite guard to prevent NaN timestamp propagation
- Use AND instead of OR for V2 detection since both meeting_id and
  event are required fields in every V2 payload

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2586e7d. Configure here.

@waleedlatif1 waleedlatif1 merged commit 47519e3 into staging Apr 18, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/fix-fireflies-trigger-v2 branch April 18, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant