Skip to content

fix(external-triggers): not passing payload through + incorrect server-side resolver logic - #1801

Merged
icecrasher321 merged 7 commits into
stagingfrom
fix/integration-trigger-parsing
Nov 4, 2025
Merged

fix(external-triggers): not passing payload through + incorrect server-side resolver logic#1801
icecrasher321 merged 7 commits into
stagingfrom
fix/integration-trigger-parsing

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

Need to pass raw payload through for integration triggers + generic webhook

Type of Change

  • Bug fix

Testing

Tested with @aadamgough

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

vercelBot commented Nov 4, 2025

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 4, 2025 3:52am

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR fixes a bug where integration triggers and generic webhooks were not properly passing through the raw payload data.

Key Changes:

  • Added new StartBlockPath.EXTERNAL_TRIGGER enum value for webhook/schedule triggers
  • Created buildIntegrationTriggerOutput() function that preserves raw workflowInput payload by spreading it first as the base, then merging finalInput on top
  • Enhanced classifyStartBlockType() to accept optional category and triggerModeEnabled parameters, routing webhooks, schedules, and blocks with category='triggers' or triggerMode=true to the new EXTERNAL_TRIGGER path
  • Updated buildResolutionFromBlock() to extract and pass category/triggerMode metadata to the classifier

Impact:
The fix ensures that webhook payloads retain all their original data (like provider-specific fields) while still processing the structured input, which is critical for integration triggers to work correctly.

Confidence Score: 4/5

  • This PR is safe to merge with one minor logic issue that should be reviewed
  • The changes correctly implement the payload pass-through for integration triggers. However, there's a logic issue in buildIntegrationTriggerOutput at line 375-377 where non-object finalInput values could be discarded if workflowInput already contains an input property. The conditional check should be removed to ensure finalInput always overwrites the input field.
  • apps/sim/executor/utils/start-block.ts (line 375-377) - review the conditional logic

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/executor/utils/start-block.ts5/5Added buildIntegrationTriggerOutput to preserve raw webhook payload data for integration triggers and generic webhooks. Updated classifyStartBlockType call to pass category and triggerMode context.
apps/sim/lib/workflows/triggers.ts5/5Added EXTERNAL_TRIGGER path and enhanced classifyStartBlockType to support webhook/schedule triggers and blocks with category='triggers' or triggerMode=true.

Sequence Diagram

sequenceDiagram
participant WH as Webhook Request
participant BS as buildStartBlockOutput
participant CSB as classifyStartBlockType
participant BIT as buildIntegrationTriggerOutput
participant EX as Executor
WH->>BS: workflowInput (raw payload)
BS->>CSB: type, category, triggerMode
alt webhook/schedule OR category='triggers' OR triggerMode=true
CSB-->>BS: EXTERNAL_TRIGGER
BS->>BIT: finalInput, workflowInput
Note over BIT: Spread workflowInput as base
Note over BIT: Merge finalInput on top
Note over BIT: Set base.input to finalInput
BIT-->>BS: NormalizedBlockOutput
else other trigger types
CSB-->>BS: Other paths
Note over BS: Use appropriate builder
end
BS->>EX: Output with raw payload preserved
Loading

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment threadapps/sim/executor/utils/start-block.ts Outdated
@icecrasher321icecrasher321 changed the title fix(external-triggers): was not passing payload through fix(external-triggers): not passing payload through + incorrect resolver logicNov 4, 2025
@icecrasher321icecrasher321 changed the title fix(external-triggers): not passing payload through + incorrect resolver logicfix(external-triggers): not passing payload through + incorrect server-side resolver logicNov 4, 2025
@icecrasher321
icecrasher321 merged commit 0363f8a into stagingNov 4, 2025
9 checks passed
waleedlatif1 pushed a commit that referenced this pull request Nov 4, 2025
…r-side resolver logic (#1801)
* fix integration triggers
* ignore text readonly subblocks
* fix
* fix to ignore readOnly vals
* fix var references
* simplify
* cleanup code
@waleedlatif1
waleedlatif1 deleted the fix/integration-trigger-parsing branch November 6, 2025 01:25
waleedlatif1 pushed a commit that referenced this pull request Nov 12, 2025
…r-side resolver logic (#1801)
* fix integration triggers
* ignore text readonly subblocks
* fix
* fix to ignore readOnly vals
* fix var references
* simplify
* cleanup code
@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
Sign up for freeto 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

@icecrasher321