View as Markdown
Microsoft Outlook Email icon

Microsoft Outlook Email ACTION

Create Draft Email

Create a draft email, 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 Create Draft 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-create-draft-email",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    microsoft_outlook: { authProvisionId: "apn_xxxxxxx" },
    userId: "User ID",
    recipients: ["Recipients"],
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Draft Email inputs
Property Type Description
userId User ID string
The User ID of a shared mailbox. If not provided, defaults to the authenticated user's mailbox.
Optional Dynamic
recipients Recipients string[]
Array of email addresses
Optional
ccRecipients CC Recipients string[]
Array of email addresses
Optional
bccRecipients BCC Recipients string[]
Array of email addresses
Optional
subject Subject string
Subject of the email
Optional
contentType Content Type string
Content type (default text)
Optional
content Content string
Content of the email in text or html format
Optional
files File Paths or URLs string[]
Provide either an array of file URLs or an array of paths to a files in the /tmp directory (for example, /tmp/myFile.pdf).
Optional
expand Expand object
Additional email details, See object definition
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-create-draft-email
Version
0.0.35
App
Microsoft Outlook Email
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes