Uh oh!
There was an error while loading. Please reload this page.
feat(emailbison): block, tools, sharepoint v2 block with cleaner code - #4470
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Introduces SharePoint v2 by hiding the existing Includes small docs fixes/alignments: PostHog docs rename Reviewed by Cursor Bugbot for commit 5950a96. Configure here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Greptile SummaryThis PR adds a full EmailBison integration (block, 13 tools, 17 triggers, and a webhook provider) and rewrites the SharePoint tools with cleaner, shared utility code. The EmailBison webhook handler, tools, and trigger files are well-structured and follow the patterns established by other integrations in the repo.
Confidence Score: 4/5Safe to merge with attention to the SharePoint upload partial-failure path and the SharePoint utils logging of page content. The EmailBison integration is well-built: the webhook provider checks response.ok before parsing, IDs are encoded in DELETE URLs, and all tools share consistent param and output definitions. The SharePoint upload rewrite introduces a silent partial-failure case — files over 250 MB are skipped without any indication in the success response — which could confuse callers. The SharePoint utils file also logs full HTML and extracted text from pages at info level, which risks emitting sensitive SharePoint content into production logs. apps/sim/app/api/tools/sharepoint/upload/route.ts (silent partial upload) and apps/sim/tools/sharepoint/utils.ts (page content in logs)
|
| Filename | Overview |
|---|---|
| apps/sim/tools/emailbison/utils.ts | Shared helpers for URL construction, auth headers, and response mapping; emailBisonData silently returns null on HTTP errors (flagged in a prior review) |
| apps/sim/tools/emailbison/update_campaign_status.ts | Pause/resume/archive tool; validates action via Set before URL interpolation; uses full campaignOutputs shape which may not match lightweight action-endpoint responses (flagged in prior review) |
| apps/sim/app/api/tools/sharepoint/upload/route.ts | Rewrites SharePoint upload route; silently skips files >250 MB without surfacing the reason to callers, causing partial success to look identical to full success |
| apps/sim/tools/sharepoint/utils.ts | Adds SharePoint utility helpers; logs full SharePoint page HTML and extracted text content at info level, risking sensitive data exposure in logs |
| apps/sim/lib/webhooks/providers/emailbison.ts | New EmailBison webhook provider; correctly checks response.ok before parsing, properly handles 401/403 with actionable messages, and safely encodes the externalId in DELETE URL |
| apps/sim/blocks/blocks/emailbison.ts | New EmailBison block definition with 13 operations; well-structured with shared param/output constants; name ternary mapping is complex but functional |
| apps/sim/tools/emailbison/attach_leads_to_campaign.ts | Correctly uses actionOutputs/actionOutput pair for the attach-leads endpoint response shape |
Sequence Diagram
sequenceDiagram
participant EB as EmailBison
participant WH as Webhook Handler
participant PR as emailBisonProvider
participant TU as triggers/emailbison/utils
participant WF as Workflow Engine
EB->>WH: POST /api/webhooks/{webhookId}
WH->>PR: matchEvent(body, providerConfig)
PR->>TU: isEmailBisonEventMatch(triggerId, payload)
TU-->>PR: true / false
PR-->>WH: matched
WH->>PR: formatInput(body, webhook)
PR->>PR: unwrapEmailBisonPayload(body)
PR->>PR: build trigger-specific input fields
PR-->>WH: { input }
WH->>WF: execute workflow with input
note over PR,EB: Subscription lifecycle
PR->>EB: POST /api/webhook-url (createSubscription)
EB-->>PR: { data: { id: externalId } }
PR->>EB: DELETE /api/webhook-url/{externalId} (deleteSubscription)
Comments Outside Diff (1)
apps/sim/app/api/tools/sharepoint/upload/route.ts, line 88-95 (link)Silent partial upload returns success with no indication of skipped files
When a file exceeds 250 MB the loop silently
continues. If at least one other file succeeds, the handler returns HTTP 200 withsuccess: trueand afileCountthat is lower than the number of files the caller submitted — no field in the response indicates that a file was dropped. The caller has no way to tell whether all files were uploaded or some were silently discarded due to the size limit. The all-fail path surfaces a generic "No files were uploaded successfully" message that still omits the size-limit reason.
Reviews (2): Last reviewed commit: "address comments" | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
icecrasher321
commented
May 6, 2026
bugbot run |
icecrasher321
commented
May 6, 2026
There was a problem hiding this comment.
✅ 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 5950a96. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…#4470) * feat(emailbison): block, tools * type improvments * typecheck issue * add email bison trigger, cleanup sharepoint block * address comments * fix tests * error on partial upload failures
Summary
Type of Change
Testing
Tested manually
Checklist