Microsoft Exchange · Arazzo Workflow

Microsoft Exchange Audit Message Attachments

Version 1.0.0

Find a message that has attachments, read it, and list its attachments.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CalendarCollaborationContactsEmailEnterpriseArazzoWorkflows

Provider

microsoft-exchange

Workflows

audit-message-attachments
Locate a message with attachments and enumerate them.
Filters the mailbox to the newest message with attachments, fetches it, and lists the attachment objects attached to it.
3 steps inputs: selectAttachmentFields outputs: attachments, messageId, subject
1
findWithAttachments
List the newest message that has attachments, ordered by received date descending.
2
getMessage
Retrieve the matched message to confirm its subject and sender before listing attachments.
3
listAttachments
List the attachment objects attached to the message, selecting the requested attachment properties.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Exchange Audit Message Attachments
  summary: Find a message that has attachments, read it, and list its attachments.
  description: >-
    An attachment-auditing pattern on Microsoft Graph mail. The workflow finds
    the newest message in the mailbox that has attachments, reads it to confirm
    the subject and sender, and then lists the attachment objects on that
    message. Each step inlines its request so the flow can be executed without
    consulting the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: attachmentsApi
  url: ../openapi/microsoft-exchange-attachments-api-openapi.yml
  type: openapi
- name: messagesApi
  url: ../openapi/microsoft-exchange-messages-api-openapi.yml
  type: openapi
workflows:
- workflowId: audit-message-attachments
  summary: Locate a message with attachments and enumerate them.
  description: >-
    Filters the mailbox to the newest message with attachments, fetches it, and
    lists the attachment objects attached to it.
  inputs:
    type: object
    properties:
      selectAttachmentFields:
        type: string
        description: Comma-separated attachment properties to return.
        default: id,name,contentType,size,isInline
  steps:
  - stepId: findWithAttachments
    description: >-
      List the newest message that has attachments, ordered by received date
      descending.
    operationId: listMessages
    parameters:
    - name: $filter
      in: query
      value: hasAttachments eq true
    - name: $orderby
      in: query
      value: receivedDateTime desc
    - name: $top
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      messageId: $response.body#/value/0/id
    onSuccess:
    - name: found
      type: goto
      stepId: getMessage
      criteria:
      - context: $response.body
        condition: $.value.length > 0
        type: jsonpath
    - name: none
      type: end
      criteria:
      - context: $response.body
        condition: $.value.length == 0
        type: jsonpath
  - stepId: getMessage
    description: >-
      Retrieve the matched message to confirm its subject and sender before
      listing attachments.
    operationId: getMessage
    parameters:
    - name: message-id
      in: path
      value: $steps.findWithAttachments.outputs.messageId
    - name: $select
      in: query
      value: subject,from,hasAttachments
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subject: $response.body#/subject
      hasAttachments: $response.body#/hasAttachments
  - stepId: listAttachments
    description: >-
      List the attachment objects attached to the message, selecting the
      requested attachment properties.
    operationId: listMessageAttachments
    parameters:
    - name: message-id
      in: path
      value: $steps.findWithAttachments.outputs.messageId
    - name: $select
      in: query
      value: $inputs.selectAttachmentFields
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      attachments: $response.body#/value
      firstAttachmentName: $response.body#/value/0/name
  outputs:
    messageId: $steps.findWithAttachments.outputs.messageId
    subject: $steps.getMessage.outputs.subject
    attachments: $steps.listAttachments.outputs.attachments

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-exchange-audit-message-attachments-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.