Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Jan 20, 2026

Summary

  • Fixed RSS trigger not exposing title, link, pubDate at top level
  • Fixed IMAP trigger not exposing messageId, subject, from, etc. at top level
  • Both triggers were nesting data under item/email but blocks expected flat structure
  • Updated polling services and webhook handlers to preserve top-level fields
  • Cleaned up unused _finalInput parameter in buildIntegrationTriggerOutput

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)

@vercel
Copy link

vercel bot commented Jan 20, 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 20, 2026 5:59pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 20, 2026

Greptile Summary

Fixed data structure issues in RSS and IMAP trigger outputs by exposing key fields at the top level instead of only nesting them under item and email properties.

Changes Made:

  • RSS trigger: Added title, link, and pubDate as top-level fields in the webhook payload (in addition to nested item object)
  • IMAP trigger: Added messageId, subject, from, to, cc, date, bodyText, bodyHtml, mailbox, hasAttachments, and attachments as top-level fields (in addition to nested email object)
  • Webhook handlers: Updated formatWebhookInput in utils.server.ts to preserve top-level fields when formatting RSS and IMAP webhook inputs
  • Cleanup: Removed unused _finalInput parameter from buildIntegrationTriggerOutput function

Why This Matters:
Workflow blocks expect flat access to trigger data. Previously, blocks had to access fields like item.title or email.subject, but the system expected direct access like title and subject. This change maintains backward compatibility by keeping the nested structure while adding top-level fields for proper block consumption.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward bug fixes that add top-level fields to webhook payloads without removing existing nested structures, ensuring backward compatibility. The implementation is consistent across both RSS and IMAP triggers, follows the established pattern, and includes a clean refactor of an unused parameter. No breaking changes or risky logic modifications are introduced.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/executor/utils/start-block.ts Removed unused _finalInput parameter from buildIntegrationTriggerOutput - clean refactor
apps/sim/lib/webhooks/rss-polling-service.ts Added top-level title, link, pubDate fields to RSS payload for flat access by blocks
apps/sim/lib/webhooks/imap-polling-service.ts Added top-level email fields (messageId, subject, from, etc.) to IMAP payload for flat access
apps/sim/lib/webhooks/utils.server.ts Updated webhook formatters to preserve top-level fields for RSS and IMAP payloads

Sequence Diagram

sequenceDiagram
    participant Poller as RSS/IMAP Polling Service
    participant Webhook as Webhook Trigger Handler
    participant Format as formatWebhookInput
    participant Start as buildStartBlockOutput
    participant Block as Workflow Blocks
    
    Note over Poller: Poll for new items/emails
    Poller->>Poller: Create payload with top-level fields
    Note right of Poller: RSS: title, link, pubDate<br/>IMAP: messageId, subject, from, etc.
    Poller->>Webhook: POST /api/webhooks/trigger/{path}
    Webhook->>Format: Format webhook input
    Note right of Format: Preserves top-level fields<br/>+ nested item/email
    Format->>Start: Pass formatted input
    Start->>Start: buildIntegrationTriggerOutput(workflowInput)
    Note right of Start: Returns flat object<br/>(no processing needed)
    Start->>Block: Flat output with top-level fields
    Note right of Block: Blocks can now access<br/>title, link, pubDate directly
Loading

Copy link

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 merged commit a26a1a9 into staging Jan 20, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/rss-trigger-outputs branch January 20, 2026 18:06
waleedlatif1 added a commit that referenced this pull request Jan 21, 2026
* fix(google): wrap primitive tool responses for Gemini API compatibility (#2900)

* fix(canonical): copilot path + update parent (#2901)

* fix(rss): add top-level title, link, pubDate fields to RSS trigger output (#2902)

* fix(rss): add top-level title, link, pubDate fields to RSS trigger output

* fix(imap): add top-level fields to IMAP trigger output

* improvement(browseruse): add profile id param (#2903)

* improvement(browseruse): add profile id param

* make request a stub since we have directExec

* improvement(executor): upgraded abort controller to handle aborts for loops and parallels (#2880)

* improvement(executor): upgraded abort controller to handle aborts for loops and parallels

* comments

* improvement(files): update execution for passing base64 strings (#2906)

* progress

* improvement(execution): update execution for passing base64 strings

* fix types

* cleanup comments

* path security vuln

* reject promise correctly

* fix redirect case

* remove proxy routes

* fix tests

* use ipaddr

* feat(tools): added textract, added v2 for mistral, updated tag dropdown (#2904)

* feat(tools): added textract

* cleanup

* ack pr comments

* reorder

* removed upload for textract async version

* fix additional fields dropdown in editor, update parser to leave validation to be done on the server

* added mistral v2, files v2, and finalized textract

* updated the rest of the old file patterns, updated mistral outputs for v2

* updated tag dropdown to parse non-operation fields as well

* updated extension finder

* cleanup

* added description for inputs to workflow

* use helper for internal route check

* fix tag dropdown merge conflict change

* remove duplicate code

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(ui): change add inputs button to match output selector (#2907)

* fix(canvas): removed invite to workspace from canvas popover (#2908)

* fix(canvas): removed invite to workspace

* removed unused props

* fix(copilot): legacy tool display names (#2911)

* fix(a2a): canonical merge  (#2912)

* fix canonical merge

* fix empty array case

* fix(change-detection): copilot diffs have extra field (#2913)

* improvement(logs): improved logs ui bugs, added subflow disable UI (#2910)

* improvement(logs): improved logs ui bugs, added subflow disable UI

* added duplicate to action bar for subflows

* feat(broadcast): email v0.5 (#2905)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
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