Belco ACTION
Send Message
Send a message in a Belco shop on the
email, chat or phone channel, starting a new conversation that carries it. This action does not take a conversation ID. To add a message to a conversation that already exists, use Reply to Conversation instead. Address the recipient with either To (a contact ID from List Contacts) or To Email (email channel only); To Email wins when both are set. Returns the resulting conversation; its _id can be passed to Retrieve Conversation or Reply to Conversation. See the documentation- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Belco account once, then configure and run Send Message from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "belco-send-message",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
belco: { authProvisionId: "apn_xxxxxxx" },
shopId: "Shop ID",
channel: "Channel",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "belco-send-message",
"configured_props": {
"belco": { "authProvisionId": "apn_xxxxxxx" },
"shopId": "Shop ID",
"channel": "Channel"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "belco",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "belco-send-message",
arguments: {
shopId: "Shop ID",
channel: "Channel",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
shopId Shop ID | string | The ID of the Belco shop, e.g. QCKysMML2DRfxW37G. Use List Shop ID Options to find it (the value field). Required Dynamic |
channel Channel | string | The channel the conversation runs on. One of email, chat, phone, e.g. email. To Email and Subject only apply to email. Required |
type Type | string | The kind of conversation. One of auto-message, outbound-message, inbound-message, follow-up, note, e.g. outbound-message. A recipient (To or To Email) is required for every type except inbound-message and note. Optional |
fromType From Type | string | Whether the sender is a Belco user (an agent) or a contact (a customer). One of user, contact, e.g. user. Determines which ID From expects. Required |
from From | string | The ID of the sender, e.g. GKa97c5NNLzcWcHhP for a user or YX6HM6Sfbt4GvbvZb for a contact. Must match From Type: use List Users for a user (the _id field) or List Contacts for a contact (the _id field). Required Dynamic |
to To | string | The Belco contact ID of the recipient, e.g. YX6HM6Sfbt4GvbvZb. Use List Contacts (filter by Email) to find it (the _id field), or set To Email instead to skip the lookup. Required unless To Email is set or Type is inbound-message or note. Optional Dynamic |
toType To Type | string | The recipient type. Use customer to address someone who may not be a Belco contact yet, or contact for an existing Belco contact. Defaults to customer when To Email is set, otherwise contact. Optional |
toEmail To Email | string | The recipient's email address (e.g. jane@example.com). Use this instead of To when you don't have the Belco contact ID. Only supported on the email channel. When set, it takes precedence over To. Optional |
subject Subject | string | The subject line, e.g. Your order has shipped. Only used on the email channel. Optional |
body Body | string | The message text, e.g. Hi Jane, your order #1234 is on its way. Required |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- belco-send-message
- Version
- 0.1.0
- App
- Belco
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗