Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Uipath core/Xaml-integrations
Reference · Uipath core

Xaml-integrations

Part of Uipath core. Install the skill and your agent reads this page when it needs the depth.

App Integrations

Excel Classic Workbook (ReadRange, WriteRange, WriteCell), Email/Integration Service (GetIMAPMailMessages, SendMail, SaveMailAttachments), PDF (ReadPDFText, ReadPDFWithOCR, native+OCR fallback), Database (DatabaseConnect, ExecuteQuery, ExecuteNonQuery), Screenshot (TakeScreenshot, SaveImage).

Contents

These are the classic workbook activities (ui: namespace) — they work without Excel installed, operating directly on .xlsx files. For Modern Excel activities (UseExcelFile), see separate section below.

Read Range (Workbook)

→ Use gen_read_range() — generates correct XAML deterministically.

Properties:

Write Range (Workbook)

→ Use gen_write_range() — generates correct XAML deterministically.

Properties:

Common Excel Pattern — Read, Process, Write

Bulk write (preferred for performance): Read → process into DataTable → WriteRange once. → Use gen_read_range() + processing logic + gen_write_range() — generates correct XAML deterministically.

Per-cell write (simpler but slower): WriteCell inside a loop. Opens/closes file each call — avoid for large datasets. Use AddDataRow + WriteRange instead.

Write Cell (Workbook)

→ Use gen_write_cell() — generates correct XAML deterministically.

Properties:

Email Activities (Integration Service)

Requires UiPath.Mail.Activities package. Uses Orchestrator Integration Service connections — no Outlook Desktop dependency. The generators handle all required xmlns declarations (umae:, umame:, usau:, snm:) automatically.

⚠️ Do NOT use Outlook-specific activities: OutlookApplicationCard, ForEachEmailX, GetOutlookMailMessages, MoveOutlookMessage, SendOutlookMailMessage. These require Outlook Desktop installed and are not portable. Use ui:SendMail (SMTP via Integration Service) instead of SendOutlookMailMessage.

Get IMAP Mail Messages (GetIMAPMailMessages)

Retrieves emails via Integration Service IMAP connection. Works with any email provider (Gmail, Outlook 365, Exchange) configured in Orchestrator Integration Service. Supports folder access, server-side filtering, and unread/read state.

→ Use gen_get_imap_mail() — generates correct XAML deterministically.

Properties:

For Each Email (loop pattern)

Use ui:ForEach with TypeArguments="snm:MailMessage" to iterate the retrieved mail list. Requires xmlns:snm="clr-namespace:System.Net.Mail;assembly=System.Net.Mail".

→ Use gen_foreach() with item_type="snm:MailMessage" — generates correct XAML deterministically.

Notes:

Send Mail (SendMail)

Sends email via Integration Service SMTP connection.

→ Use gen_send_mail() — generates correct XAML deterministically.

Properties:

Additional namespace for SendMail attachments:

xmlns:umame="clr-namespace:UiPath.MicrosoftOffice365.Activities.Mail.Enums;assembly=UiPath.Mail.Activities"

MailMessage Properties (in expressions)

CurrentMail.Subject                    ' Email subject line
CurrentMail.Body                       ' Email body (HTML if HTML email)
CurrentMail.From.Address               ' Sender email address
CurrentMail.From.DisplayName           ' Sender display name
CurrentMail.To(0).Address              ' First recipient
CurrentMail.CC                         ' CC recipients collection
CurrentMail.Attachments(0).Name        ' First attachment filename
CurrentMail.Headers("Date")            ' Email date header
CurrentMail.IsBodyHtml                 ' Boolean

Save Mail Attachments (SaveMailAttachments)

Saves email attachments to disk in a single activity. Use this instead of manual InvokeCode with FileStream. → Use gen_save_mail_attachments() — generates correct XAML deterministically.

Variable for Attachments output: type scg:IEnumerable(x:String), name list_Attachments. Declare in the JSON spec variables array with type "scg:IEnumerable(x:String)". Properties:

⚠️ Do NOT use InvokeCode to manually save attachments. SaveMailAttachments handles file streams, naming conflicts, and filtering in a single activity.

PDF Activities

Requires UiPath.PDF.Activities package. Add namespace xmlns:ui="http://schemas.uipath.com/workflow/activities" (same as core activities — PDF activities are in the ui: prefix). Also needs these assembly references:

<AssemblyReference>UiPath.PDF.Activities</AssemblyReference>

And these namespace imports:

<x:String>UiPath.PDF.Activities</x:String>

Read PDF Text (native/digital PDFs)

Extracts text from native (digitally-created) PDF files. Fast and accurate but returns empty string for scanned/image PDFs.

→ Use gen_read_pdf_text() — generates correct XAML deterministically.

Properties:

Read PDF With OCR (scanned/image PDFs)

Extracts text from scanned PDFs using an OCR engine. Slower than ReadPDFText but works on image-based PDFs. Uses an ActivityFunc delegate pattern for the OCR engine — this is a real export structure, not simplified.

Requires both UiPath.PDF.Activities AND UiPath.UIAutomation.Activities (the Tesseract OCR engine ui:GoogleOCR lives in UIAutomation).

→ Use gen_read_pdf_with_ocr() — generates correct XAML deterministically.

Properties:

Common PDF Pattern — Native + OCR Fallback

Standard pattern: try ReadPDFText first, if result is empty (scanned PDF), fall back to ReadPDFWithOCR: → Use gen_read_pdf_text() + gen_if() + gen_read_pdf_with_ocr() — compose the fallback chain.

Notes:

Database Activities

Requires NuGet: UiPath.Database.Activities. Namespace: xmlns:ui="http://schemas.uipath.com/workflow/activities" (same as core activities).

⚠️ Do NOT use InvokeCode with SqlConnection/SqlClient for database operations. Use the dedicated database activities below — they handle connection pooling, parameterized queries, and proper disposal.

DatabaseConnect

{
  "gen": "database_connect",
  "args": {
    "connection_variable": "secstrConnectionString",
    "output_variable": "dbConnection"
  }
}

Properties:

ExecuteQuery (SELECT → DataTable)

{
  "gen": "execute_query",
  "args": {
    "sql": "SELECT * FROM ProcessLog WHERE Status = @status",
    "output_variable": "dt_Output",
    "connection_string_variable": "secstrConnectionString",
    "parameters": [{"name": "status", "type": "x:String", "value": "[strStatus]"}]
  }
}

Properties:

ExecuteNonQuery (INSERT/UPDATE/DELETE)

{
  "gen": "execute_non_query",
  "args": {
    "sql": "INSERT INTO ProcessLog (Amount, ProcessedAt) VALUES (@amt, GETDATE())",
    "connection_variable": "dbConnection",
    "parameters": [{"name": "amt", "type": "x:Decimal", "value": "[dblAmount]"}]
  }
}

Properties:

Screenshot Activities

Requires NuGet: UiPath.UIAutomation.Activities. These activities use the ui: namespace (xmlns:ui="http://schemas.uipath.com/workflow/activities").

TakeScreenshot + SaveImage

For error screenshots, use the built-in TakeScreenshot + SaveImage activities. In REFramework projects, call Framework/TakeScreenshot.xaml via InvokeWorkflowFile.

⚠️ Do NOT use InvokeCode with System.Drawing.Graphics.CopyFromScreen. The activities handle DPI scaling, multi-monitor setups, and memory disposal correctly.

{
  "gen": "take_screenshot_and_save",
  "args": {
    "screenshot_variable": "imgScreenshot",
    "save_path_variable": "strScreenshotPath"
  }
}

Properties:

Modern UI Automation (uix: namespace)

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.