Microsoft Office 365 · Arazzo Workflow

Microsoft Office 365 Cleanup Draft Message

Version 1.0.0

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

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

Provider

microsoft-office-365

Workflows

cleanup-draft-message
Create a throwaway draft and delete it after confirming it exists.
Creates a draft via POST /me/messages (201), reads it via GET /me/messages/{message-id} (200), then deletes it via DELETE /me/messages/{message-id} (204).
3 steps inputs: bodyContent, subject outputs: deletedMessageId
1
createDraft
Create a draft message with the supplied subject and body.
2
confirmDraft
Read the draft back by id to confirm it was created.
3
deleteDraft
Delete the draft message from the mailbox. Returns 204 no content.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Office 365 Cleanup Draft Message
  summary: Create a draft, read it back, then delete it from the mailbox.
  description: >-
    A draft lifecycle flow that creates, inspects, and discards a message. The
    workflow creates a draft message, reads it back to confirm it exists, and
    then deletes it from the mailbox. The delete returns 204 with no content.
    This is useful for testing draft creation or for cleaning up abandoned
    drafts. 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: cleanup-draft-message
  summary: Create a throwaway draft and delete it after confirming it exists.
  description: >-
    Creates a draft via POST /me/messages (201), reads it via GET
    /me/messages/{message-id} (200), then deletes it via DELETE
    /me/messages/{message-id} (204).
  inputs:
    type: object
    required:
    - subject
    properties:
      subject:
        type: string
        description: The subject of the throwaway draft message.
      bodyContent:
        type: string
        description: Optional body content for the draft.
  steps:
  - stepId: createDraft
    description: Create a draft message with the supplied subject and body.
    operationId: createMessage
    requestBody:
      contentType: application/json
      payload:
        subject: $inputs.subject
        body:
          contentType: text
          content: $inputs.bodyContent
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      messageId: $response.body#/id
  - stepId: confirmDraft
    description: Read the draft back by id to confirm it was created.
    operationId: getMessage
    parameters:
    - name: message-id
      in: path
      value: $steps.createDraft.outputs.messageId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      isDraft: $response.body#/isDraft
  - stepId: deleteDraft
    description: Delete the draft message from the mailbox. Returns 204 no content.
    operationId: deleteMessage
    parameters:
    - name: message-id
      in: path
      value: $steps.createDraft.outputs.messageId
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      deletedMessageId: $steps.createDraft.outputs.messageId
  outputs:
    deletedMessageId: $steps.deleteDraft.outputs.deletedMessageId

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-cleanup-draft-message-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.