Microsoft Outlook · Arazzo Workflow

Microsoft Outlook Review Folder and Mark Read

Version 1.0.0

Open a mail folder, list its unread messages, and mark the top one as read.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CalendarContactsEmailEnterpriseMicrosoftOffice 365ProductivityArazzoWorkflows

Provider

microsoft-outlook

Workflows

review-folder-and-mark-read
Read a folder, list its unread messages, and mark the top one read.
Reads a mail folder, lists the unread messages in it, and marks the first unread message as read.
3 steps inputs: mailFolderId, pageSize outputs: folderId, markedReadMessageId
1
openFolder
Read the target mail folder to confirm it exists and capture its unread item count.
2
listUnread
List the unread messages in the folder ordered by received date, capturing the id of the most recent unread message.
3
markRead
Patch the most recent unread message to set isRead to true. Graph returns 200 with the updated message.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Outlook Review Folder and Mark Read
  summary: Open a mail folder, list its unread messages, and mark the top one as read.
  description: >-
    An inbox-cleanup pattern. The workflow reads a well-known mail folder such
    as inbox to confirm its unread count, lists the unread messages inside it,
    and marks the most recent unread message as read by patching its isRead
    property. The folder id and message id chain across the steps so the flow
    runs without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: mailFoldersApi
  url: ../openapi/microsoft-outlook-mail-folders-api-openapi.yml
  type: openapi
- name: messagesApi
  url: ../openapi/microsoft-outlook-messages-api-openapi.yml
  type: openapi
workflows:
- workflowId: review-folder-and-mark-read
  summary: Read a folder, list its unread messages, and mark the top one read.
  description: >-
    Reads a mail folder, lists the unread messages in it, and marks the first
    unread message as read.
  inputs:
    type: object
    properties:
      mailFolderId:
        type: string
        description: The folder id or well-known name (e.g. inbox) to review.
        default: inbox
      pageSize:
        type: integer
        description: How many unread messages to list.
        default: 25
  steps:
  - stepId: openFolder
    description: >-
      Read the target mail folder to confirm it exists and capture its unread
      item count.
    operationId: getMailFolder
    parameters:
    - name: mailFolder-id
      in: path
      value: $inputs.mailFolderId
    - name: $select
      in: query
      value: id,displayName,unreadItemCount
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      folderId: $response.body#/id
      unreadItemCount: $response.body#/unreadItemCount
  - stepId: listUnread
    description: >-
      List the unread messages in the folder ordered by received date,
      capturing the id of the most recent unread message.
    operationId: listMessagesInFolder
    parameters:
    - name: mailFolder-id
      in: path
      value: $steps.openFolder.outputs.folderId
    - name: $filter
      in: query
      value: isRead eq false
    - name: $orderby
      in: query
      value: receivedDateTime desc
    - name: $top
      in: query
      value: $inputs.pageSize
    - name: $select
      in: query
      value: id,subject,isRead
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      topUnreadId: $response.body#/value/0/id
    onSuccess:
    - name: hasUnread
      type: goto
      stepId: markRead
      criteria:
      - context: $response.body
        condition: $.value.length > 0
        type: jsonpath
    - name: allRead
      type: end
      criteria:
      - context: $response.body
        condition: $.value.length == 0
        type: jsonpath
  - stepId: markRead
    description: >-
      Patch the most recent unread message to set isRead to true. Graph
      returns 200 with the updated message.
    operationId: updateMessage
    parameters:
    - name: message-id
      in: path
      value: $steps.listUnread.outputs.topUnreadId
    requestBody:
      contentType: application/json
      payload:
        isRead: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      updatedMessageId: $response.body#/id
      isRead: $response.body#/isRead
  outputs:
    folderId: $steps.openFolder.outputs.folderId
    markedReadMessageId: $steps.markRead.outputs.updatedMessageId

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-outlook-review-folder-and-mark-read-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.