Microsoft Office 365 · Arazzo Workflow

Microsoft Office 365 Draft and Send Mail

Version 1.0.0

Create a draft message, read it back, then send it from the mailbox.

1 workflow 1 source API 1 provider
View Spec View on GitHub CloudCollaborationEnterpriseMicrosoftProductivityArazzoWorkflows

Provider

microsoft-office-365

Workflows

draft-and-send-mail
Draft a message, verify it, then send mail to a recipient.
Creates a draft via POST /me/messages (201), reads it via GET /me/messages/{message-id} (200), then sends mail via POST /me/sendMail (202).
3 steps inputs: bodyContent, subject, toAddress, toName outputs: draftMessageId, sentSubject
1
createDraft
Create a draft message in the signed-in user's Drafts folder with the supplied subject, body, and recipient.
2
reviewDraft
Read the draft back by id to confirm its content before sending.
3
sendMail
Send an equivalent message to the recipient and save a copy to Sent Items. Returns 202 Accepted as delivery is queued asynchronously.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Office 365 Draft and Send Mail
  summary: Create a draft message, read it back, then send it from the mailbox.
  description: >-
    A review-then-send mail flow against the signed-in user's mailbox. The
    workflow creates a draft message in the Drafts folder, reads the draft back
    to confirm its content, and then sends an equivalent message via the sendMail
    action. The sendMail action returns 202 Accepted because delivery is
    asynchronous. Every step spells out its request inline so the flow can be
    read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: mailApi
  url: ../openapi/microsoft-office-365-mail-api-openapi.yml
  type: openapi
workflows:
- workflowId: draft-and-send-mail
  summary: Draft a message, verify it, then send mail to a recipient.
  description: >-
    Creates a draft via POST /me/messages (201), reads it via GET
    /me/messages/{message-id} (200), then sends mail via POST /me/sendMail (202).
  inputs:
    type: object
    required:
    - subject
    - bodyContent
    - toAddress
    properties:
      subject:
        type: string
        description: The subject line of the message.
      bodyContent:
        type: string
        description: The plain-text body content of the message.
      toAddress:
        type: string
        description: The email address of the primary recipient.
      toName:
        type: string
        description: The display name of the primary recipient.
  steps:
  - stepId: createDraft
    description: >-
      Create a draft message in the signed-in user's Drafts folder with the
      supplied subject, body, and recipient.
    operationId: createMessage
    requestBody:
      contentType: application/json
      payload:
        subject: $inputs.subject
        body:
          contentType: text
          content: $inputs.bodyContent
        toRecipients:
        - emailAddress:
            address: $inputs.toAddress
            name: $inputs.toName
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      messageId: $response.body#/id
  - stepId: reviewDraft
    description: Read the draft back by id to confirm its content before sending.
    operationId: getMessage
    parameters:
    - name: message-id
      in: path
      value: $steps.createDraft.outputs.messageId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subject: $response.body#/subject
      isDraft: $response.body#/isDraft
  - stepId: sendMail
    description: >-
      Send an equivalent message to the recipient and save a copy to Sent Items.
      Returns 202 Accepted as delivery is queued asynchronously.
    operationId: sendMail
    requestBody:
      contentType: application/json
      payload:
        message:
          subject: $inputs.subject
          body:
            contentType: text
            content: $inputs.bodyContent
          toRecipients:
          - emailAddress:
              address: $inputs.toAddress
              name: $inputs.toName
        saveToSentItems: true
    successCriteria:
    - condition: $statusCode == 202
    outputs:
      sentSubject: $inputs.subject
  outputs:
    draftMessageId: $steps.createDraft.outputs.messageId
    sentSubject: $steps.sendMail.outputs.sentSubject

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/microsoft-office-365-draft-and-send-mail-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.