-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(sendblue): add Sendblue iMessage/SMS integration with tools and triggers #4917
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e945547
feat(sendblue): add Sendblue iMessage/SMS integration with tools and …
waleedlatif1 a645f3e
fix(sendblue): address review — status-aware webhook dedup, shared ro…
waleedlatif1 cb8de5b
fix(docs-gen): skip nested array `items` descriptor in tool input tables
waleedlatif1 842fdfe
chore(sendblue): use SendblueSendStyle type, trim URL identifiers
waleedlatif1 c59f868
Merge remote-tracking branch 'origin/staging' into feat/sendblue-inte…
waleedlatif1 a7e661a
fix(sendblue): keep is_outbound routing map local to the webhook handler
waleedlatif1 0b155ad
fix(sendblue): remove invalid `tags` from block config (belongs on Bl…
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,6 +157,7 @@ | |
| "sap_concur", | ||
| "sap_s4hana", | ||
| "secrets_manager", | ||
| "sendblue", | ||
| "sendgrid", | ||
| "sentry", | ||
| "serper", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,197 @@ | ||
| --- | ||
| title: Sendblue | ||
| description: Send and receive iMessage and SMS | ||
| --- | ||
|
|
||
| import { BlockInfoCard } from "@/components/ui/block-info-card" | ||
|
|
||
| <BlockInfoCard | ||
| type="sendblue" | ||
| color="#008BFF" | ||
| /> | ||
|
|
||
| {/* MANUAL-CONTENT-START:intro */} | ||
| ## Manual Description | ||
|
|
||
| Sendblue connects your agents to iMessage and SMS through your own dedicated phone number. Use it to text one person or a group, attach images and other media, check whether a number can receive iMessage before you send, show a typing indicator, and look up the delivery status of any message. | ||
|
|
||
| Authentication uses a Sendblue **API Key ID** and **API Secret Key**, sent as the `sb-api-key-id` and `sb-api-secret-key` headers. You can find both in your [Sendblue dashboard](https://dashboard.sendblue.com). Every message is sent from one of your registered Sendblue lines, supplied as the **From Number** in E.164 format (for example `+15551234567`). | ||
|
|
||
| **Operations** | ||
|
|
||
| - **Send Message** — send an iMessage or SMS to a single recipient. Provide message text, a media URL, or both, and optionally apply an iMessage expressive style (celebration, fireworks, lasers, confetti, and more). | ||
| - **Send Group Message** — send to multiple recipients at once. Pass one recipient per line; reuse the returned `group_id` to keep replying in the same thread. | ||
| - **Evaluate Service** — check whether a number is reachable on iMessage or only SMS, so you can branch before sending. | ||
| - **Send Typing Indicator** — show a recipient that a reply is being composed (one-to-one chats only). | ||
| - **Get Message** — retrieve a single message and its current status by message handle. | ||
|
|
||
| **Triggers** | ||
|
|
||
| - **Message Received** — fires on every inbound message. Configure it as the **Receive** webhook in your Sendblue dashboard. | ||
| - **Message Status Updated** — fires when an outbound message changes state (`SENT`, `DELIVERED`, `ERROR`). Configure it as the **Outbound** webhook, or pass its URL per message as `status_callback`. | ||
|
|
||
| Each trigger generates its own webhook URL — paste the matching URL into the corresponding field in your Sendblue dashboard. | ||
| {/* MANUAL-CONTENT-END */} | ||
|
|
||
|
|
||
| ## Usage Instructions | ||
|
|
||
| Send iMessages and SMS to individuals or groups, check whether a number supports iMessage, show typing indicators, and look up message status with Sendblue. Trigger workflows on inbound messages and delivery status updates. | ||
|
|
||
|
|
||
|
|
||
| ## Tools | ||
|
|
||
| ### `sendblue_send_message` | ||
|
|
||
| Send an iMessage or SMS to a single recipient via Sendblue. | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
| | `number` | string | Yes | Recipient phone number in E.164 format \(e.g., +19998887777\) | | ||
| | `from_number` | string | Yes | One of your registered Sendblue phone numbers to send from, in E.164 format \(e.g., +18887776666\) | | ||
| | `content` | string | No | Message text content. Either content or media_url must be provided. | | ||
| | `media_url` | string | No | URL of a media file to send. Either content or media_url must be provided. | | ||
| | `send_style` | string | No | iMessage expressive style \(e.g., celebration, fireworks, lasers, confetti, balloons, invisible, slam\). | | ||
| | `status_callback` | string | No | Webhook URL that Sendblue will POST message status updates to. | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `status` | string | Message status: QUEUED, SENT, DELIVERED, or ERROR | | ||
| | `message_handle` | string | Unique identifier for tracking the message | | ||
| | `account_email` | string | Email of the account that sent the message | | ||
| | `content` | string | Message content | | ||
| | `is_outbound` | boolean | Whether this is an outbound message | | ||
| | `from_number` | string | Sending phone number | | ||
| | `number` | string | Recipient phone number | | ||
| | `media_url` | string | URL of attached media | | ||
| | `send_style` | string | iMessage expressive style applied | | ||
| | `seat_id` | string | UUID of the seat that sent the message | | ||
| | `sender_email` | string | Email of the seat \(user\) that sent the message | | ||
| | `error_code` | number | Numeric error code if the message failed | | ||
| | `error_message` | string | Error message if the message failed | | ||
| | `date_created` | string | When the message was created | | ||
| | `date_updated` | string | When the message was last updated | | ||
|
|
||
| ### `sendblue_send_group_message` | ||
|
|
||
| Send an iMessage or SMS to a group of recipients via Sendblue. | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
| | `numbers` | array | Yes | Recipient phone numbers in E.164 format \(e.g., \["+19998887777", "+13334445555"\]\) | | ||
| | `from_number` | string | Yes | One of your registered Sendblue phone numbers to send from, in E.164 format \(e.g., +18887776666\) | | ||
| | `content` | string | No | Message text content. Either content or media_url must be provided. | | ||
| | `media_url` | string | No | URL of a media file to send. Either content or media_url must be provided. | | ||
| | `send_style` | string | No | iMessage expressive style \(e.g., celebration, fireworks, lasers, confetti, balloons, invisible, slam\). | | ||
| | `group_id` | string | No | Unique identifier of an existing group to send to. Omit to start a new group. | | ||
| | `status_callback` | string | No | Webhook URL that Sendblue will POST message status updates to. | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `status` | string | Message status: QUEUED, SENT, DELIVERED, or ERROR | | ||
| | `message_handle` | string | Unique identifier for tracking the message | | ||
| | `group_id` | string | Identifier of the group the message was sent to | | ||
| | `participants` | array | Phone numbers participating in the group | | ||
| | `account_email` | string | Email of the account that sent the message | | ||
| | `content` | string | Message content | | ||
| | `is_outbound` | boolean | Whether this is an outbound message | | ||
| | `from_number` | string | Sending phone number | | ||
| | `number` | string | Recipient phone number | | ||
| | `media_url` | string | URL of attached media | | ||
| | `send_style` | string | iMessage expressive style applied | | ||
| | `seat_id` | string | UUID of the seat that sent the message | | ||
| | `sender_email` | string | Email of the seat \(user\) that sent the message | | ||
| | `error_code` | number | Numeric error code if the message failed | | ||
| | `error_message` | string | Error message if the message failed | | ||
| | `date_created` | string | When the message was created | | ||
| | `date_updated` | string | When the message was last updated | | ||
|
|
||
| ### `sendblue_evaluate_service` | ||
|
|
||
| Check whether a phone number can receive iMessage or only SMS. | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
| | `number` | string | Yes | Phone number to evaluate, in E.164 format \(e.g., +19998887777\) | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `number` | string | The evaluated phone number in E.164 format | | ||
| | `service` | string | The service the number supports: iMessage or SMS | | ||
|
|
||
| ### `sendblue_send_typing_indicator` | ||
|
|
||
| Display a typing indicator to a recipient (not supported in group chats). | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
| | `number` | string | Yes | Recipient's phone number in E.164 format \(e.g., +19998887777\) | | ||
| | `from_number` | string | No | Your Sendblue line number to send from, in E.164 format. | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `status` | string | Delivery status of the typing indicator \(e.g., QUEUED\) | | ||
| | `status_code` | number | Numeric status code returned by Sendblue | | ||
| | `number` | string | The recipient phone number | | ||
| | `error_message` | string | Error details, null on success | | ||
|
|
||
| ### `sendblue_get_message` | ||
|
|
||
| Retrieve a single message and its current status by message handle/ID. | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
| | `message_id` | string | Yes | The message handle/ID returned when the message was sent. | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `status` | string | Current message status | | ||
| | `message_handle` | string | Unique message identifier | | ||
| | `account_email` | string | Email of the account | | ||
| | `content` | string | Message content | | ||
| | `is_outbound` | boolean | Whether the message is outbound | | ||
| | `from_number` | string | Sending phone number | | ||
| | `number` | string | Recipient phone number | | ||
| | `to_number` | string | Destination phone number | | ||
| | `media_url` | string | URL of attached media | | ||
| | `message_type` | string | Message category: message or group | | ||
| | `service` | string | Messaging service: iMessage, SMS, or RCS | | ||
| | `group_id` | string | Group identifier \(empty for non-group\) | | ||
| | `group_display_name` | string | Group chat name | | ||
| | `participants` | array | Participant phone numbers | | ||
| | `send_style` | string | Expressive style applied | | ||
| | `was_downgraded` | boolean | True if the recipient lacks iMessage support | | ||
| | `opted_out` | boolean | True if the recipient has opted out | | ||
| | `plan` | string | Account plan type | | ||
| | `sendblue_number` | string | Sendblue phone number used | | ||
| | `seat_id` | string | Seat UUID | | ||
| | `sender_email` | string | Email of the sending seat | | ||
| | `error_code` | number | Numeric error code if failed | | ||
| | `error_message` | string | Error message if failed | | ||
| | `error_reason` | string | Additional error context | | ||
| | `error_detail` | string | Detailed error information | | ||
| | `date_sent` | string | ISO 8601 creation timestamp | | ||
| | `date_updated` | string | ISO 8601 last-update timestamp | | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,7 @@ | |
| "outlook", | ||
| "resend", | ||
| "salesforce", | ||
| "sendblue", | ||
| "servicenow", | ||
| "slack", | ||
| "stripe", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| --- | ||
| title: Sendblue | ||
| description: Available Sendblue triggers for automating workflows | ||
| --- | ||
|
|
||
| import { BlockInfoCard } from "@/components/ui/block-info-card" | ||
|
|
||
| <BlockInfoCard | ||
| type="sendblue" | ||
| color="#008BFF" | ||
| /> | ||
|
|
||
| Sendblue provides 2 triggers for automating workflows based on events. | ||
|
|
||
| ## Triggers | ||
|
|
||
| ### Sendblue Message Received | ||
|
|
||
| Trigger when an inbound iMessage or SMS is received in Sendblue | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `account_email` | string | Email of the Sendblue account | | ||
| | `content` | string | Message text content | | ||
| | `media_url` | string | CDN link to attached media, if any | | ||
| | `is_outbound` | boolean | True for outbound messages, false for inbound | | ||
| | `status` | string | Message status \(e.g., RECEIVED, QUEUED, SENT, DELIVERED, ERROR\) | | ||
| | `error_code` | number | Error identifier, null if none | | ||
| | `error_message` | string | Descriptive error text, null if none | | ||
| | `error_reason` | string | Additional error context, null if none | | ||
| | `error_detail` | string | Detailed error information, null if none | | ||
| | `message_handle` | string | Sendblue message identifier \(use to deduplicate\) | | ||
| | `date_sent` | string | ISO 8601 creation timestamp | | ||
| | `date_updated` | string | ISO 8601 last-update timestamp | | ||
| | `from_number` | string | E.164 sender phone number | | ||
| | `number` | string | E.164 recipient/counterparty phone number | | ||
| | `to_number` | string | E.164 destination phone number | | ||
| | `was_downgraded` | boolean | True if the recipient lacks iMessage support | | ||
| | `plan` | string | Account plan type | | ||
| | `message_type` | string | Message category \(e.g., message, group\) | | ||
| | `group_id` | string | Group identifier, empty for non-group messages | | ||
| | `participants` | array | Participant phone numbers for group messages | | ||
| | `send_style` | string | Expressive style if applied | | ||
| | `opted_out` | boolean | True if the recipient has opted out | | ||
| | `sendblue_number` | string | Sendblue phone number used | | ||
| | `service` | string | Messaging service \(iMessage or SMS\) | | ||
| | `group_display_name` | string | Group chat name, null for non-group messages | | ||
| | `sender_email` | string | Email of the user who sent the message | | ||
| | `seat_id` | string | Seat UUID, null if absent | | ||
| | `raw` | string | Complete raw webhook payload from Sendblue as a JSON string | | ||
|
|
||
|
|
||
| --- | ||
|
|
||
| ### Sendblue Message Status Updated | ||
|
|
||
| Trigger when an outbound message status changes (SENT, DELIVERED, ERROR) in Sendblue | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `account_email` | string | Email of the Sendblue account | | ||
| | `content` | string | Message text content | | ||
| | `media_url` | string | CDN link to attached media, if any | | ||
| | `is_outbound` | boolean | True for outbound messages, false for inbound | | ||
| | `status` | string | Message status \(e.g., RECEIVED, QUEUED, SENT, DELIVERED, ERROR\) | | ||
| | `error_code` | number | Error identifier, null if none | | ||
| | `error_message` | string | Descriptive error text, null if none | | ||
| | `error_reason` | string | Additional error context, null if none | | ||
| | `error_detail` | string | Detailed error information, null if none | | ||
| | `message_handle` | string | Sendblue message identifier \(use to deduplicate\) | | ||
| | `date_sent` | string | ISO 8601 creation timestamp | | ||
| | `date_updated` | string | ISO 8601 last-update timestamp | | ||
| | `from_number` | string | E.164 sender phone number | | ||
| | `number` | string | E.164 recipient/counterparty phone number | | ||
| | `to_number` | string | E.164 destination phone number | | ||
| | `was_downgraded` | boolean | True if the recipient lacks iMessage support | | ||
| | `plan` | string | Account plan type | | ||
| | `message_type` | string | Message category \(e.g., message, group\) | | ||
| | `group_id` | string | Group identifier, empty for non-group messages | | ||
| | `participants` | array | Participant phone numbers for group messages | | ||
| | `send_style` | string | Expressive style if applied | | ||
| | `opted_out` | boolean | True if the recipient has opted out | | ||
| | `sendblue_number` | string | Sendblue phone number used | | ||
| | `service` | string | Messaging service \(iMessage or SMS\) | | ||
| | `group_display_name` | string | Group chat name, null for non-group messages | | ||
| | `sender_email` | string | Email of the user who sent the message | | ||
| | `seat_id` | string | Seat UUID, null if absent | | ||
| | `raw` | string | Complete raw webhook payload from Sendblue as a JSON string | | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.