UniOne ACTION
Send Email
Send an email using UniOne. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's UniOne account once, then configure and run Send Email 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: "unione-send-email",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
unione: { authProvisionId: "apn_xxxxxxx" },
recipients: ["Recipients"],
templateId: "Template ID",
},
})
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": "unione-send-email",
"configured_props": {
"unione": { "authProvisionId": "apn_xxxxxxx" },
"recipients": ["Recipients"],
"templateId": "Template ID"
}
}'// 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": "unione",
},
},
},
)
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: "unione-send-email",
arguments: {
recipients: ["Recipients"],
templateId: "Template ID",
},
})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 |
|---|---|---|
recipients Recipients | string[] | Array of recipient objects with email, substitutions (merge tags), and metadata. Each recipient can have: email (required), substitutions (object, optional), metadata (object, optional). If provided, this takes precedence over 'To' prop. Example: [{ "email": "recipient@example.com", "substitutions": { "from_name": "John Doe", "subject": "Hello, {name}!" }, "metadata": { "company": "Example Inc." } }]. See the documentation Optional |
templateId Template ID | string | Unique identifier of the template that had been created by template/set method. If Template ID is passed then fields from the template are used instead of missed email/send parameters. Optional Dynamic |
tags Tags | string[] | An array of strings (max 4 unique strings, max 50 characters each). You can use tags to categorize emails by your own criteria. Optional Dynamic |
skipUnsubscribe Skip Unsubscribe | boolean | Whether to skip or not appending default unsubscribe footer. You should ask support to approve. Optional |
globalLanguage Global Language | string | The language of the unsubscribe footer and unsubscribe page. Optional |
templateEngine Template Engine | string | The template engine for handling the substitutions(merge tags). Optional |
globalSubstitutions Global Substitutions | object | Object for passing the substitutions(merge tags) common for all recipients - e.g., company name. If the substitution names are duplicated in recipient 'substitutions', the values of the variables will be taken from the recipient 'substitutions'. Example: { "body": { "html": "Hello, {name}!", "plaintext": "Hello, {name}!", "amp": "Hello, {name}!"}, "subject": "Hello, {name}!", "from_name": "John Doe", "options": { "unsubscribe_url": "https://example.com/unsubscribe" } }. Optional |
globalMetadata Global Metadata | object | Object for passing the metadata common for all the recipients, such as 'key': 'value'. Max key quantity: 10. Max key length: 64 symbols. Max value length: 1024 symbols. Optional |
body Body | object | Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required. Example: { "html": "Hello, {name}!", "plaintext": "Hello, {name}!", "amp": "Hello, {name}!" }. Required |
subject Subject | string | Email subject Required |
fromEmail From Email | string | Sender's email. Required only if Template ID prop is empty. Optional |
fromName From Name | string | Sender's name Optional |
replyTo Reply To | string | Reply-to email (in case it's different to sender's email) Optional |
replyToName Reply To Name | string | Reply-To name (if Reply To email is specified and you want to display not only this email but also the name) Optional |
trackLinks Track Links | boolean | If true, click tracking is on (default). If false, click tracking is off. To use track_links = false, you need to ask UniOne support to enable this feature. Optional |
trackRead Track Read | boolean | If true, read tracking is on (default). If false, read tracking is off. To use track_read = false, you need to ask support to enable this feature. Optional |
bypassGlobal Bypass Global | boolean | If true, the global unavailability list will be ignored. Even if the address was found to be unreachable while sending other UniOne users' emails, or its owner has issued complaints, the message will still be sent. The setting may be ignored for certain addresses. Optional |
bypassUnavailable Bypass Unavailable | boolean | If true, the current list of unsubscribed addresses for this account or project will be ignored. Works only if Bypass Global is set to true. The setting is available only for users that have been granted the right to omit the unsubscribe link (to request, please contact support). Optional |
bypassUnsubscribed Bypass Unsubscribed | boolean | If true, the current list of unsubscribed addresses for this account or project will be ignored. Works only if Bypass Global is set to true. The setting is available only for users that have been granted the right to omit the unsubscribe link. Optional |
bypassComplained Bypass Complained | boolean | If true, the user's or project's complaint list will be ignored. Works only if Bypass Global is set to true. The setting is available only for users that have been granted the right to omit the unsubscribe link. Optional |
idempotenceKey Idempotence Key | string | A string of up to 64 characters containing a unique message key. This can be used to prevent occasional message duplicates. If you send another API request with the same message key within the next minute, it will be declined. We can generate a message key for each letter automatically; to enable this option, please contact our tech support. Optional |
headers Headers | object | Contains email headers, maximum 50. Only headers with “X-” name prefix are accepted, all other are ignored, for example X-UNIONE-Global-Language, X-UNIONE-Template-Engine. Standard headers “To,” “CC,” and “BCC” are passed without the “X-.” Yet, they are processed in a particular way and, as a result, have a number of restrictions. You can find more details about it here. If our support have approved omitting standard unsubscription block for you, you can also pass List-Unsubscribe, List-Subscribe, List-Help, List-Owner, List-Archive, In-Reply-To and References headers. Example: { "X-UNIONE-Global-Language": "en", "X-UNIONE-Template-Engine": "velocity" }. Optional |
sendAt Send At | string | Date and time in 'YYYY-MM-DD hh:mm:ss' format in the UTC timezone. Allows schedule sending up to 24 hours in advance. Optional |
unsubscribeUrl Unsubscribe URL | string | Custom unsubscribe link. Read more here. Optional |
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
- unione-send-email
- Version
- 0.0.1
- App
- UniOne
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗