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: messagesApi
url: ../openapi/microsoft-exchange-messages-api-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
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.