-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[Components] sendblue #19215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Components] sendblue #19215
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a full Sendblue integration: three actions (send message, send group message, get contact list), two sources (webhook-based instant and polling), a fleshed-out app client with HTTP helpers and propDefinitions, and a package.json version/dependency update. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action as Send Message Action
participant App as sendblue.app
participant API as Sendblue API
User->>Action: invoke with props (toNumber, fromNumber, content, ...)
Action->>Action: validate & map props → payload
Action->>App: sendMessage({ data })
App->>App: getHeaders() & getUrl(path)
App->>API: POST /messages (with payload)
API-->>App: response
App-->>Action: return response
Action->>User: return response and $summary
sequenceDiagram
participant Sendblue as Sendblue (Webhook)
participant Instant as Instant Source
participant App as sendblue.app
rect rgb(200,220,255)
Note over Instant,App: Webhook lifecycle
Instant->>App: activate() → addWebhook(endpoint)
App->>Sendblue: POST /webhooks
Sendblue-->>App: 201 Created
end
rect rgb(220,240,220)
Note over Sendblue,Instant: Real-time inbound message
Sendblue->>Instant: POST /webhook (message)
Instant->>Instant: run(event) → generateMeta(message)
Instant->>Instant: emit(event)
end
rect rgb(255,240,200)
Note over Instant,App: Cleanup
Instant->>App: deactivate() → deleteWebhook()
App->>Sendblue: DELETE /webhooks/:id
Sendblue-->>App: 204 No Content
end
sequenceDiagram
participant Orchestrator
participant Poll as Polling Source
participant App as sendblue.app
participant API as Sendblue API
rect rgb(200,220,255)
Note over Orchestrator,Poll: Deploy/init
Orchestrator->>Poll: deploy()
Poll->>Poll: processEvent(max) (initial fetch)
Poll->>App: listMessages(params...)
App->>API: GET /messages
API-->>App: messages
App-->>Poll: messages
Poll->>Poll: set isFirstRun = false
end
rect rgb(220,240,220)
Note over Orchestrator,Poll: Periodic polling
Orchestrator->>Poll: run() [timer]
alt first run
Poll->>Poll: skip (first run handled at deploy)
else subsequent
Poll->>App: listMessages(params with filters)
App->>API: GET /messages
API-->>App: messages
App-->>Poll: messages
Poll->>Poll: filter by lastTimestamp, emit new items
Poll->>Poll: update lastTimestamp
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
🧰 Additional context used🧠 Learnings (7)📚 Learning: 2024-12-12T19:23:09.039ZApplied to files:
📚 Learning: 2025-10-20T01:01:02.970ZApplied to files:
📚 Learning: 2025-09-15T22:01:11.472ZApplied to files:
📚 Learning: 2025-06-04T17:52:05.780ZApplied to files:
📚 Learning: 2024-10-10T19:18:27.998ZApplied to files:
📚 Learning: 2024-10-30T15:24:39.294ZApplied to files:
📚 Learning: 2024-07-04T18:11:59.822ZApplied to files:
🧬 Code graph analysis (5)components/sendblue/sendblue.app.mjs (1)
components/sendblue/sources/new-message-received-instant/new-message-received-instant.mjs (1)
components/sendblue/sources/new-message-received/new-message-received.mjs (1)
components/sendblue/actions/get-contact-list/get-contact-list.mjs (3)
components/sendblue/actions/send-group-message/send-group-message.mjs (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
components/sendblue/actions/get-contact-list/get-contact-list.mjs(1 hunks)components/sendblue/actions/send-group-message/send-group-message.mjs(1 hunks)components/sendblue/actions/send-message/send-message.mjs(1 hunks)components/sendblue/package.json(2 hunks)components/sendblue/sendblue.app.mjs(1 hunks)components/sendblue/sources/new-message-received-instant/new-message-received-instant.mjs(1 hunks)components/sendblue/sources/new-message-received/new-message-received.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.
Applied to files:
components/sendblue/actions/send-group-message/send-group-message.mjscomponents/sendblue/sources/new-message-received/new-message-received.mjscomponents/sendblue/sources/new-message-received-instant/new-message-received-instant.mjscomponents/sendblue/actions/send-message/send-message.mjscomponents/sendblue/sendblue.app.mjs
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Applied to files:
components/sendblue/actions/send-group-message/send-group-message.mjscomponents/sendblue/actions/send-message/send-message.mjs
📚 Learning: 2024-10-10T19:18:27.998Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Applied to files:
components/sendblue/sources/new-message-received/new-message-received.mjs
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/sendblue/package.json
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Applied to files:
components/sendblue/sendblue.app.mjs
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.
Applied to files:
components/sendblue/sendblue.app.mjs
🧬 Code graph analysis (6)
components/sendblue/actions/send-group-message/send-group-message.mjs (3)
components/sendblue/actions/get-contact-list/get-contact-list.mjs (1)
response(18-20)components/sendblue/actions/send-message/send-message.mjs (1)
response(64-74)components/sendblue/sources/new-message-received/new-message-received.mjs (1)
response(145-147)
components/sendblue/sources/new-message-received/new-message-received.mjs (5)
components/zep/actions/get-threads/get-threads.mjs (1)
max(39-39)components/sendblue/actions/get-contact-list/get-contact-list.mjs (1)
response(18-20)components/sendblue/actions/send-group-message/send-group-message.mjs (1)
response(68-77)components/sendblue/actions/send-message/send-message.mjs (1)
response(64-74)components/sendblue/sources/new-message-received-instant/new-message-received-instant.mjs (2)
message(61-61)meta(64-64)
components/sendblue/sources/new-message-received-instant/new-message-received-instant.mjs (1)
components/sendblue/sources/new-message-received/new-message-received.mjs (1)
meta(173-173)
components/sendblue/actions/send-message/send-message.mjs (3)
components/sendblue/actions/get-contact-list/get-contact-list.mjs (1)
response(18-20)components/sendblue/actions/send-group-message/send-group-message.mjs (1)
response(68-77)components/sendblue/sources/new-message-received/new-message-received.mjs (1)
response(145-147)
components/sendblue/actions/get-contact-list/get-contact-list.mjs (3)
components/sendblue/actions/send-group-message/send-group-message.mjs (1)
response(68-77)components/sendblue/actions/send-message/send-message.mjs (1)
response(64-74)components/sendblue/sources/new-message-received/new-message-received.mjs (1)
response(145-147)
components/sendblue/sendblue.app.mjs (1)
components/gmail/gmail.app.mjs (1)
axios(415-423)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/sendblue/package.json (1)
3-17: Package metadata update looks consistent with new Sendblue featuresVersion bump and the addition of a dependency block are appropriate for the new actions/sources and shared app helpers introduced in this PR. No issues from this diff alone.
components/sendblue/sendblue.app.mjs (1)
203-256: Confirmation: response handling is correct, but API response structure cannot be verified without live testingI verified the code against Pipedream patterns. The
axiosfrom@pipedream/platformfollows standard axios behavior:_makeRequestreturns the full response object (with.data,.headers, etc.), and the polling source correctly accessesresponse.data.This pattern is standard throughout the codebase—confirmed in
cisco_webex.app.mjsandesignatures_io.app.mjs, which both follow the same approach.However, the review's underlying validation concern—confirming that the Sendblue
/api/v2/messagesendpoint actually returns{ data: [...] }format—is valid but cannot be definitively confirmed without calling the live API. The polling source code assumesresponse.datais an array of message objects with properties likedate_updated,date_sent, andfrom_number, which aligns with typical API response structures.The implementation is consistent with established Pipedream conventions and should work correctly if the API returns messages in the expected format.
components/sendblue/sources/new-message-received-instant/new-message-received-instant.mjs
Show resolved
Hide resolved
components/sendblue/sources/new-message-received/new-message-received.mjs
Show resolved
Hide resolved
components/sendblue/sources/new-message-received/new-message-received.mjs
Show resolved
Hide resolved
eea3464 to
6bb470d
Compare
luancazarine
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jcortes, LGTM! Ready for QA!
For Integration QA: |
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
WHY
Resolves #14949
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.