Microsoft Outlook Email ACTION
Send Email
Send a new email, reply to an existing message, or save a draft — all in one tool. Omit
inReplyToMessageId to send a new email. Provide inReplyToMessageId to reply to an existing message (threads correctly). Set isDraft: true to save to Drafts instead of sending immediately. Attach files by passing URLs or /tmp paths to files. Example (send new): send-email(recipients=["you@example.com"], subject="Hello", content="Hi there") Example (reply): send-email(inReplyToMessageId="AAMk...", content="Thanks for your note") Example (draft): send-email(recipients=["boss@example.com"], subject="Weekly report", content="...", isDraft=true) Use Find Email to locate a message id before replying. See the documentation- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Microsoft Outlook Email 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: "microsoft_outlook-send-email",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
microsoft_outlook: { authProvisionId: "apn_xxxxxxx" },
recipients: ["To"],
ccRecipients: ["CC"],
},
})
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": "microsoft_outlook-send-email",
"configured_props": {
"microsoft_outlook": { "authProvisionId": "apn_xxxxxxx" },
"recipients": ["To"],
"ccRecipients": ["CC"]
}
}'// 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": "microsoft_outlook",
},
},
},
)
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: "microsoft_outlook-send-email",
arguments: {
recipients: ["To"],
ccRecipients: ["CC"],
},
})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 To | string[] | Array of recipient email addresses, e.g. ["alice@example.com", "bob@example.com"]. Optional |
ccRecipients CC | string[] | Array of CC recipient email addresses. Optional |
bccRecipients BCC | string[] | Array of BCC recipient email addresses. Optional |
subject Subject | string | Email subject line. Optional |
content Body | string | Email body content in text or HTML format. Optional |
contentType Body Type | string | Content type of the body: text (default) or html. Optional |
inReplyToMessageId In Reply To Message ID | string | When set, threads the message as a reply to this message ID. Obtain from Find Email ( id field). Omit for a new email. Optional |
isDraft Save as Draft | boolean | When true, saves the message to Drafts instead of sending. Default: false. Optional |
files Attachments | string[] | File URLs or /tmp paths to attach. Example: ["/tmp/report.pdf"]. Optional |
userId User ID | string | The user ID or UPN of a shared mailbox to send from. Omit to use the authenticated user's mailbox. Optional |
syncDir SyncDir | dir | 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
- microsoft_outlook-send-email
- Version
- 0.1.5
- App
- Microsoft Outlook Email
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗