Create Attachment

Adds a base64-encoded file attachment to an existing draft email message via its ID.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/naftiko/microsoft-outlook-sandbox --skill create-attachment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Create Attachment
Source: https://github.com/naftiko/microsoft-outlook-sandbox/tree/main/skills/create-attachment
Command: npx skills add https://github.com/naftiko/microsoft-outlook-sandbox --skill create-attachment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill allows you to programmatically add file attachments to email messages, streamlining the process of sending emails with necessary documents.

Core Features & Use Cases

  • Attach Files: Adds specified files as attachments to an existing email message, typically a draft.
  • Base64 Encoding: Handles file content by accepting it as a base64-encoded string.
  • Use Case: Automatically attach a generated report (e.g., a PDF or CSV) to a draft email before sending it to a client.

Quick Start

Use the create attachment skill to add the file 'report.pdf' with content 'SGVsbG8gV29ybGQ=' to the message with ID 'AAMkAGI1AAAGB1rUAAA='.

Frequently Asked Questions about Create Attachment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a file attachment to an existing email draft?

To add a file attachment to an email draft, you provide the message ID, file name, and base64-encoded file content to programmatically append the document to the message.

Can I attach a generated PDF report to an Outlook draft email before sending?

Yes, you can attach a generated PDF report to an Outlook draft email by supplying the draft message ID and the base64-encoded PDF content to attach the file before sending.

What format does file content need to be in for email attachments?

File content for email attachments must be provided as a base64-encoded string, which ensures the binary file data is safely transmitted and parsed into the message structure.

Do I need a message ID to attach a file to an email?

Yes, a valid message ID is required to target the specific existing email message or draft that will receive the base64-encoded file attachment.

When should I use base64 encoding for email attachments?

You should use base64 encoding for email attachments when programmatically adding files like PDFs or CSVs to draft messages, ensuring the binary content integrates correctly into the email payload.