Outlook
Use the Outlook node to send and search email. Connect it to other nodes to generate recipients, content, and attachments dynamically.
Connect Outlook
Most workflows use StackAI's built-in connector. Sign in with your Microsoft account. Your connection inherits your existing permissions and access.
Advanced connection setup
Use a separate setup path for these cases:
Set up a custom Outlook OAuth connector — required for single-tenant and on-premises deployments. Use it when you need to restrict OAuth scopes.
Set up an Outlook app registration — use app-only access for shared mailboxes and unattended workflows.
Available Actions
1. Send Email
Description
Send an email, reply to an existing message, or forward a message using your Outlook account. Supports drafts, attachments, and recipient filtering.
Inputs
recipient (Optional)
Type: String (comma-separated email addresses)
Description: Recipient email address(es). If replying (
message_idprovided), leave blank to reply to original sender. If forwarding, specify new recipient(s).Examples:
"recipient": "team@example.com""recipient": "user1@example.com, user2@example.com"
subject (Optional)
Type: String
Description: Subject line. If replying (
message_idprovided), leave blank to use original subject.Example:
"subject": "Weekly Report"
body (Required)
Type: String
Description: Email content. Supports plain text or HTML.
Example:
"body": "Please find the attached weekly report."
attachment_urls (Optional)
Type: String (comma-separated URLs)
Description: File URLs to attach. Files are downloaded and attached.
Example:
"attachment_urls": "https://example.com/file1.pdf, https://example.com/file2.xlsx"
message_id (Optional)
Type: String
Description: Microsoft Graph message ID to reply to or forward. When provided:
Without
recipient: Creates a reply to original senderWith
recipient: Forwards the message to new recipients
Example:
"message_id": "AQMkAGY1MTc5Y2Y5LTNlMWMtNGU4NS05NzljLTRmM2IwOGNlYjI3MgBGAAAD..."
draft (Optional)
Type: Boolean
Description: If
true, saves the email as a draft instead of sending immediately.Default:
falseExample:
"draft": true
allowed_emails (Optional)
Type: String (comma-separated email addresses)
Description: Whitelist of allowed recipient addresses. If specified, emails only send to addresses in this list. Leave blank to allow all recipients.
Example:
"allowed_emails": "approved1@example.com, approved2@example.com"
Outputs
result_msg (Always returned)
Type: String
Description: Summary of the email operation, including recipients, subject, body, and any errors or warnings.
Example:
Notes
New Emails:
recipientandsubjectrequired when not replying/forwardingReplies: When
message_idprovided withoutrecipient, action replies to original senderForwards: When
message_idprovided withrecipient, action forwards to new recipientsAttachments: Files are downloaded from provided URLs and attached
Drafts: When
draft=true, message is saved but not sentAllowed Emails: Restricts recipients to whitelist; blocked recipients reported in result message
2. Search Emails
Description
Search your Outlook mailbox for emails matching specific criteria.
Inputs
query (Required): The search query string (e.g., keywords, sender, date).
Example:
"query": "from:boss@example.com subject:invoice"
folder (Optional): Specify the folder to search in (e.g., Inbox, Sent).
Example:
"folder": "Inbox"
max_results (Optional): Limit the number of results.
Example:
"max_results": 10
Configurations:
connection_id (Required if you have multiple Outlook accounts): Specify which Outlook connection to use.
Outputs
emails (Always returned): List of matching emails with details such as subject, sender, date, and body.
Example:
Best Practices
Always ensure required fields are filled to avoid errors.
For attachments, connect a Files node or other relevant node to provide file paths.
Automate your Outlook email workflows in StackAI to save time, reduce manual effort, and ensure consistent communication.
Last updated
Was this helpful?

