Find your Pattern

39 production-tested PAD patterns · 8 free. Copy, paste, and adapt for your automation workflows.

39 patterns

SETVariableTO'value'
IFConditionTHEN
// Foundation
END
FreeBeginner

Variable Bootstrap

Initializes all standard run variables at the top of a PAD flow. Sets up typed placeholders for run tracking, status flags, counters, and common configuration values so every flow starts from a consistent, predictable state.

FoundationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Foundation
END
FreeBeginner

Run Header Initializer

Builds a structured run header with machine name, user context, flow name, and run ID. Outputs a formatted header block suitable for logging to file, database, or console. Pairs with Run Finalizer for complete run lifecycle tracking.

FoundationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Foundation
END
FreeBeginner

Log Detail Writer

Appends a timestamped, leveled log entry to the in-memory log list and optionally writes to a log file. Supports INFO, WARN, and ERROR levels with consistent formatting. Use throughout your flow for structured operational logging.

FoundationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Foundation
END
FreeBeginner

Run Finalizer

Closes out a flow run by calculating duration, setting final status, and building a formatted summary footer. Pairs with Variable Bootstrap and Run Header Initializer to provide complete run lifecycle tracking with duration and record counts.

FoundationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Foundation
END
FreeIntermediate

Error Handler Wrapper

A structured BLOCK/ON ERROR pattern that catches exceptions, logs the error details, increments the error counter, and optionally rethrows. Drop this around any risky action group - file I/O, web calls, Excel operations - for consistent error handling across your flow.

FoundationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Foundation
END
FreeIntermediate

Retry With Backoff

Wraps any flaky action in a retry loop with configurable max attempts and exponential backoff (2s, 4s, 8s). Ideal for web scraping waits, API calls, file locks, or any action that can fail transiently. Logs each attempt and breaks on success.

FoundationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// File Operations
END
Beginner

Read & Parse CSV File

Read a CSV file into a DataTable with configurable delimiter, header detection, and encoding handling.

File OperationsbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Web Automation
END
Beginner

Wait for Element (Smart)

Wait for a UI element with configurable polling interval and timeout. Falls back gracefully instead of crashing.

Web AutomationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Data Operations
END
Intermediate

DataTable → JSON Array

Convert a Power Automate Desktop DataTable to a JSON array string for API payloads or SharePoint column writes.

Data OperationsbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Error Handling
END
Intermediate

Retry with Exponential Backoff

Wrap any action in a retry loop with configurable attempts and exponential backoff.

Error HandlingbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Excel
END
Beginner

Read Named Excel Table

Read data from a named Excel table (ListObject) into a PAD DataTable. Faster and more reliable than range reading.

ExcelbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Error Handling
END
Beginner

Teams Error Notification

Send structured error notifications to a Microsoft Teams channel with step context, error details, and a link to the run.

Error HandlingbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// File Operations
END
Intermediate

Archive & Rotate Files

Move processed files to a dated archive folder. Automatically prune archives older than N days.

File OperationsbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Excel
END
Intermediate

Write & Format Excel Range

Write a DataTable to Excel, then apply formatting: column widths, font, borders, conditional formatting for status columns.

ExcelbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Email & Graph API
END
Advanced

Write to SharePoint via Graph

Create or update SharePoint list items using the Microsoft Graph API from PAD. Handles auth token refresh automatically.

Email & Graph APIbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Error Handling
END
Intermediate

Global Error Handler Block

ON BLOCK EXIT pattern that catches all unhandled errors, logs to SharePoint list, and notifies stakeholders.

Error HandlingbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Data Operations
END
Advanced

API Pagination Loop

Generic pagination pattern for REST APIs using nextPageToken or offset+limit. Works with any HTTP action.

Data OperationsbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Data Operations
END
Beginner

List Deduplication

Remove duplicate items from a PAD DataTable or list variable using a hash-set approach. O(n) time.

Data OperationsbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Web Automation
END
Intermediate

Web Table Extraction

Extract all rows from an HTML table into a PAD DataTable. Handles dynamic tables and pagination.

Web AutomationbyFlowLibs
SETVariableTO'value'
IFConditionTHEN
// Email & Graph API
END
Beginner

Send Email with HTML Template

Send a formatted HTML email via Outlook with dynamic field substitution, attachments, and reply-to override.

Email & Graph APIbyFlowLibs
120 of 39 patterns