Microsoft Exchange · Arazzo Workflow

Microsoft Exchange Prepare and Send a Forward

Version 1.0.0

Create a forward draft, edit its body, and send it to new recipients.

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

Provider

microsoft-exchange

Workflows

prepare-and-send-forward
Build a forward draft, revise it, and send it.
Creates a forward draft for a source message addressed to new recipients, patches the draft body with added context, and sends the draft.
3 steps inputs: addedBodyContent, forwardToAddress, sourceMessageId outputs: draftId, sentStatus
1
createForwardDraft
createForwardDraft
Create a forward draft of the source message addressed to the new recipient.
2
reviseDraft
updateMessage
Patch the forward draft body to add context before sending.
3
sendForward
sendDraftMessage
Send the revised forward draft. Graph accepts it for delivery and saves it in Sent Items.

Source API Descriptions

Arazzo Workflow Specification

microsoft-exchange-prepare-and-send-forward-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Exchange Prepare and Send a Forward
  summary: Create a forward draft, edit its body, and send it to new recipients.
  description: >-
    A controlled forwarding pattern on Microsoft Graph mail. Rather than
    forwarding in a single shot, the workflow creates a forward draft from an
    existing message, updates the draft body to add context, and then sends the
    finished forward. Each step inlines its request so the flow can be executed
    without consulting the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: graphMailApi
  url: ../openapi/microsoft-exchange-graph-mail-openapi.yml
  type: openapi
workflows:
- workflowId: prepare-and-send-forward
  summary: Build a forward draft, revise it, and send it.
  description: >-
    Creates a forward draft for a source message addressed to new recipients,
    patches the draft body with added context, and sends the draft.
  inputs:
    type: object
    required:
    - sourceMessageId
    - forwardToAddress
    - addedBodyContent
    properties:
      sourceMessageId:
        type: string
        description: The id of the message to forward.
      forwardToAddress:
        type: string
        description: The email address to forward the message to.
      addedBodyContent:
        type: string
        description: Additional HTML body content to prepend to the forwarded message.
  steps:
  - stepId: createForwardDraft
    description: >-
      Create a forward draft of the source message addressed to the new
      recipient.
    operationId: createForwardDraft
    parameters:
    - name: message-id
      in: path
      value: $inputs.sourceMessageId
    requestBody:
      contentType: application/json
      payload:
        toRecipients:
        - emailAddress:
            address: $inputs.forwardToAddress
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      draftId: $response.body#/id
      isDraft: $response.body#/isDraft
  - stepId: reviseDraft
    description: >-
      Patch the forward draft body to add context before sending.
    operationId: updateMessage
    parameters:
    - name: message-id
      in: path
      value: $steps.createForwardDraft.outputs.draftId
    requestBody:
      contentType: application/json
      payload:
        body:
          contentType: html
          content: $inputs.addedBodyContent
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      draftId: $response.body#/id
  - stepId: sendForward
    description: >-
      Send the revised forward draft. Graph accepts it for delivery and saves
      it in Sent Items.
    operationId: sendDraftMessage
    parameters:
    - name: message-id
      in: path
      value: $steps.createForwardDraft.outputs.draftId
    successCriteria:
    - condition: $statusCode == 202
    outputs:
      sentStatus: $statusCode
  outputs:
    draftId: $steps.createForwardDraft.outputs.draftId
    sentStatus: $steps.sendForward.outputs.sentStatus