Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

Trigger outputs formatting cleanup

Type of Change

  • Bug fix
  • Breaking change: For new Lemlist Trigger

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)

@vercel
Copy link

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 14, 2026 1:47am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 14, 2026

Greptile Summary

  • Standardizes trigger output formatting across 30+ providers by replacing nested webhook structures with flattened schemas (e.g., webhook.data.payload → direct field access)
  • Updates Lemlist triggers to use event-specific output builders (buildEmailSentOutputs, buildEmailClickedOutputs) instead of generic functions
  • Fixes triggerConfig comparison issues by moving it to runtime metadata, preventing false positive change detection in workflow deployments

Important Files Changed

Filename Overview
apps/sim/lib/webhooks/utils.server.ts Major refactoring that removes nested webhook structures across all providers; breaking change for existing workflows
apps/sim/triggers/lemlist/utils.ts Complete restructure of Lemlist output builders with modular field composition and flattened access patterns
apps/sim/triggers/constants.ts Adds triggerConfig to runtime metadata to fix false positive diff detection
apps/sim/executor/utils/start-block.ts Simplifies integration trigger output to pass-through raw webhook data without complex merging
apps/sim/lib/workflows/comparison/compare.test.ts Updates tests to exclude triggerConfig from comparison logic and uses safer test fields

Confidence score: 3/5

  • This PR introduces significant breaking changes that will affect existing workflows accessing nested webhook data structures
  • Score lowered due to lack of migration strategy for existing workflows that rely on webhook.data.payload patterns and other nested structures removed across 30+ providers
  • Pay close attention to webhook formatting changes in utils.server.ts and ensure thorough testing of all webhook integrations before deployment

Sequence Diagram

sequenceDiagram
    participant User
    participant GitHub
    participant WebhookAPI as "Webhook API"
    participant Formatter as "formatWebhookInput"
    participant Executor as "Workflow Executor"
    participant Block as "Start Block"

    User->>GitHub: "Opens new issue"
    GitHub->>WebhookAPI: "POST webhook payload"
    Note over WebhookAPI: "Validates signature if configured"
    WebhookAPI->>Formatter: "Process raw webhook body"
    Formatter->>Formatter: "Extract GitHub event data"
    Note over Formatter: "Maps to trigger outputs schema"
    Formatter-->>WebhookAPI: "Formatted trigger data"
    WebhookAPI->>Executor: "Trigger workflow execution"
    Executor->>Block: "Execute with trigger data"
    Note over Block: "Workflow processes GitHub issue data"
Loading

@icecrasher321
Copy link
Collaborator Author

@greptile

@icecrasher321 icecrasher321 changed the title fix(triggers): package lemlist data, cleanup trigger outputs formatting, fix display name issues fix(triggers): cleanup trigger outputs formatting, fix display name issues Jan 14, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

36 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@icecrasher321 icecrasher321 merged commit ebbe67a into staging Jan 14, 2026
6 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/triggers-code branch January 14, 2026 16:56
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.

2 participants