How to Automate UKG Pro Data Export (No API Required)

Feb 19

Introduction

UKG Pro (formerly UltiPro) is a cloud HCM platform used for HR, payroll, workforce management, time and attendance, and recruiting. While UKG Pro offers some API and integration options, browser automation can serve as an effective alternative for exporting employee data, payroll runs, time and attendance reports, and workforce analytics when API access is limited or not available for your use case.

Why Use Browser Automation for UKG Pro Data Export?

  • Limited or No API Access: UKG Pro reporting and export features may not be fully exposed via a public or partner API for all modules
  • Dashboard-Only Reports: Custom reports, workforce analytics, and payroll exports are often only available in the web portal
  • Historical Data: Access older payroll, time, and HR data beyond API or manual export limits
  • Custom Exports: Generate reports by date range, department, location, or employee when the portal doesn't offer an API
  • Payroll and Tax: Export pay runs, tax documents, and deduction reports for accounting and compliance
  • Time and Attendance: Pull timesheets, schedules, and labor data when no API is available
  • Multi-Company or Multi-Site: Aggregate data across companies or business units that require portal access

Setting Up UKG Pro Data Export Automation

Here's how to automate data collection from UKG Pro using browser automation:



import { chromium } from 'playwright';

const response = await fetch("https://api.anchorbrowser.io/api/sessions", {
  method: "POST",
  headers: {
    "anchor-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    'headless': false,
    'proxy': {
      'type': 'residential',
      'country': 'US'
    }
  }),
});

const { id } = await response.json();
const connectionString = `wss://connect.anchorbrowser.io?apiKey=YOUR_API_KEY&sessionId=${id}`;

const browser = await chromium.connectOverCDP(connectionString);
const context = browser.contexts()[0];
const ai = context.serviceWorkers()[0];
const page = context.pages()[0];

// Navigate to UKG Pro (your tenant URL)
await page.goto("https://yourcompany.ultipro.com");

// Login with AI agent
await ai.evaluate(JSON.stringify({
  prompt: 'Log in to UKG Pro using the provided credentials. Wait for the dashboard to fully load.'
}));



Exporting Employee and HR Data

Automate the export of employee and HR data from UKG Pro:



const exportUkgProEmployees = async (page, ai, options) => {
  await ai.evaluate(JSON.stringify({
    prompt: 'Navigate to the Employee or Workforce Management section, then to the employee list or report builder'
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: `Apply filters if needed (e.g., department, location, status). Then run or export the report for ${options.reportType || 'employee data'}.`
  }));
  
  const download = await page.waitForEvent('download');
  return await download.path();
};



Exporting Payroll and Pay Runs

Export payroll runs and pay history when no API is available:



const exportUkgProPayroll = async (page, ai, dateRange) => {
  await ai.evaluate(JSON.stringify({
    prompt: 'Navigate to the Payroll section, then to Pay Runs or Payroll History'
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: `Set the date filter to ${dateRange.start} to ${dateRange.end}`
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: 'Click Export or Download, select CSV or Excel if available, and wait for the download to complete.'
  }));
  
  const download = await page.waitForEvent('download');
  return await download.path();
};



Time and Attendance Reports

Pull time and attendance data from UKG Pro:



const exportUkgProTimeData = async (page, ai, dateRange) => {
  await ai.evaluate(JSON.stringify({
    prompt: 'Navigate to the Time and Attendance or Time Management section'
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: `Set the date or pay period to ${dateRange.start} to ${dateRange.end}`
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: 'Export or download the timesheet or attendance report. Wait for the download to complete.'
  }));
  
  const download = await page.waitForEvent('download');
  return await download.path();
};



Tax Documents and Compliance Reports

Download tax documents and compliance reports:



const exportUkgProTaxReports = async (page, ai, reportType, yearOrPeriod) => {
  await ai.evaluate(JSON.stringify({
    prompt: 'Navigate to the Payroll Tax or Reports section'
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: `Select ${reportType} for ${yearOrPeriod} and trigger the export or download`
  }));
  
  const download = await page.waitForEvent('download');
  return await download.path();
};



Workforce and Scheduling Data

Extract workforce and scheduling data when only available in the portal:



const exportUkgProSchedules = async (page, ai, dateRange) => {
  await ai.evaluate(JSON.stringify({
    prompt: 'Navigate to the Scheduling or Workforce Management section'
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: `Filter by date range ${dateRange.start} to ${dateRange.end}`
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: 'Export the schedule or labor report. If there is an Export button, use it; otherwise extract the visible table as structured data.'
  }));
  
  const download = await page.waitForEvent('download');
  return await download.path();
};



Best Practices for UKG Pro Portal Automation

  • Security: Use secure credential storage and support 2FA or SSO if UKG Pro requires it
  • PII and Payroll: Treat employee and payroll data as sensitive; ensure access controls and encryption
  • Rate Limiting: Add delays between requests to avoid lockouts or triggering security controls
  • Error Handling: Implement retries for transient failures and session timeouts
  • Tenant URLs: UKG Pro uses tenant-specific URLs (e.g., yourcompany.ultipro.com); configure for your instance
  • Terms of Use: Comply with UKG's terms of use and any contractual restrictions on automated access

Handling UKG Pro Authentication

UKG Pro often uses SSO or username/password. Example flow:



const handleUkgProAuth = async (page, ai, credentials, tenantUrl) => {
  await page.goto(tenantUrl || 'https://yourcompany.ultipro.com');
  
  await ai.evaluate(JSON.stringify({
    prompt: `Enter username: ${credentials.username} and password: ${credentials.password}, then click Login or Sign in`
  }));
  
  await ai.evaluate(JSON.stringify({
    prompt: 'If 2FA or verification is required, enter the code from the provided method. Choose "Remember this device" if offered.'
  }));
  
  await page.waitForLoadState('networkidle');
};



Resources

Conclusion

Browser automation provides a flexible alternative to UKG Pro API access for HR, payroll, time and attendance, and workforce data export. By using browser automation, you can automate data export when the UKG Pro portal does not expose a full API for your needs. With attention to security and terms of use, you can streamline UKG Pro data workflows.

Start automating your UKG Pro data collection and simplify your HCM reporting.

Other hubs

See all
No hubs found

Stay ahead in browser automation

We respect your inbox. Privacy policy

Welcome aboard! Thanks for signing up
Oops! Something went wrong while submitting the form.