Microsoft Outlook

Send, search, and read emails in Microsoft Outlook.

CommunicationOAuth12 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (12)
  4. send-email
  5. addLabelToEmail
  6. createDraftEmail
  7. custom_api_call
  8. downloadAttachment
  9. findEmail
  10. forwardEmail
  11. moveEmailToFolder
  12. removeLabelFromEmail
  13. reply-email
  14. request_approval_in_mail
  15. sendDraftEmail
  16. Details

Connect

Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.

Scopes requested: Mail.SendMail.ReadUser.Read

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("microsoft_outlook", action, input) resolves with the provider's answer and rejects when Microsoft Outlook isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "microsoft_outlook"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Microsoft Outlook when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellMicrosoftOutlook = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Microsoft Outlook isn't connected.
  const output = await step.run("Microsoft Outlook", () =>
    step.ctx.integrations.invoke("microsoft_outlook", "send-email", {
      "recipients": [],
      "subject": "<subject>",
      "bodyFormat": "html",
      "body": "<body>"
    }),
  );
  step.ctx.log("Microsoft Outlook answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "microsoft_outlook",
    "piece_action": "send-email",
    "input": {
      "recipients": [],
      "subject": "<subject>",
      "bodyFormat": "html",
      "body": "<body>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/microsoft_outlook/send-email" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"recipients":[],"subject":"<subject>","bodyFormat":"html","body":"<body>"}}'

Actions

send-email

Send Email. Sends an email using Microsoft Outlook.

Also accepted as send_email.

InputTypeDescription
recipientsrequiredarrayTo Email(s)
ccRecipientsoptionalarrayCC Email(s)
bccRecipientsoptionalarrayBCC Email(s)
subjectrequiredtextSubject
bodyFormatrequiredone of "html" | "text"Body Format
bodyrequiredlong textBody
attachmentsoptionalarrayAttachments

addLabelToEmail

Add Label to Email. Adds a category (label) to an email message.

InputTypeDescription
messageIdrequiredid (picked from your account)Select the email message to add the label to.
categoriesrequiredarrayCategories to add to the email.

createDraftEmail

Create Draft Email. Creates a draft email message.

InputTypeDescription
recipientsrequiredarrayTo Email(s)
ccRecipientsoptionalarrayCC Email(s)
bccRecipientsoptionalarrayBCC Email(s)
subjectrequiredtextSubject
bodyFormatrequiredone of "html" | "text"Body Format
bodyrequiredlong textBody
attachmentsoptionalarrayAttachments

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

downloadAttachment

Download Attachment. Download attachments from a specific email message.

InputTypeDescription
messageIdrequiredtextThe ID of the email message containing the attachment.

findEmail

Find Email. Searches for emails using full-text search.

InputTypeDescription
searchQueryrequiredtextSearch terms to find emails (e.g., "from:john@example.com", "subject:urgent", "hasAttachments:true")
folderIdoptionalid (picked from your account)Search in a specific folder. Leave empty to search all folders.
topoptionalnumberMaximum number of results to return (1-1000).

forwardEmail

Forward Email. Forwards an email message.

InputTypeDescription
messageIdrequiredid (picked from your account)Select the email message to forward.
recipientsrequiredarrayTo Email(s)
commentoptionallong textOptional comment to include with the forwarded message.

moveEmailToFolder

Move Email to Folder. Moves an email message to a specific folder.

InputTypeDescription
messageIdrequiredid (picked from your account)Select the email message to move.
destinationFolderIdrequiredid (picked from your account)The folder to move the email to.

removeLabelFromEmail

Remove Label from Email. Removes a category (label) from an email message.

InputTypeDescription
messageIdrequiredid (picked from your account)Select the email message to remove the label from.
categoriesrequiredarrayCategories to remove from the email.

reply-email

Reply to Email. Reply to an outlook email.

InputTypeDescription
messageIdrequiredid (picked from your account)Select the email message to reply to.
bodyFormatrequiredone of "html" | "text"Body Format
replyBodyrequiredlong textReply Body
ccRecipientsoptionalarrayCC Recipients
bccRecipientsoptionalarrayBCC Recipients
attachmentsoptionalarrayAttachments
draftrequiredbooleanIf enabled, creates draft without sending.

request_approval_in_mail

Request Approval in Email. Send approval request email and then wait until the email is approved or disapproved

InputTypeDescription
recipientsrequiredtextThe email address of the recipient who will receive the approval request.
subjectrequiredtextThe subject of the approval request email.
bodyrequiredlong textThe main content of the email. You can include details about the approval request here in the html format or plain text.

sendDraftEmail

Send Draft Email. Sends a draft email message.

InputTypeDescription
messageIdrequiredid (picked from your account)Select the draft email message to send.

Details

Id
microsoft_outlook
Category
Communication
Tags
email, microsoft, inbox, mail, enterprise
Package
@activepieces/piece-microsoft-outlook@0.2.13
Runs
Through the integration runner