Example workflow: report Excel-driven runs

A complete UiPath workflow that reads an Excel file, processes each row, and reports the run to RPA Watch.

This walkthrough builds a small but realistic process that you can drop into any project. It reads a list of records from an .xlsx workbook, classifies each row as success or failed based on a column the source system already provides, attaches the daily log file, and sends one consolidated report to RPA Watch.

 

ZIPRPA Watch Uipath Example.zip142 KB · ZIPDownload ↓

XLSXEnglish_Dummy_RPA_Data.xlsx10 KB · XLSXDownload ↓

By the end you'll see a single run appear on your dashboard with per-record details and downloadable attachments.

Before you start

 

Make sure you have:

- The RPAWatch.UiPath.Activities package installed https://www.nuget.org/packages/RPAWatch.UiPath.Activities

- A workbook with at least the columns used below — adapt the column names to match yours:

National IDFirst NameLast NameFlow StatusLogError
11111111111AdaLovelaceCompletedOK
22222222222AlanTuringErrorAccount locked
33333333333GraceHopperCompletedOK

- A Flow ID (a GUID) copied from the Flows page in RPA Watch.

- A Robot ID (numeric) copied from the Robots page.

- An API Key generated under Account Settings → API Keys. It looks like rpakey_eda9e46a8fdc22d427426c89c534758b71a1a179.

 

The example uses C# expressions, which is the default for projects created in Studio 2026.

 

1. Declare the workflow variables

 

In the Variables panel, add:

NameTypeScopeDefault
startedAtSystem.DateTimeMain sequence*(empty)*
excelDataTableSystem.Data.DataTableMain sequence*(empty)*
detailsTableSystem.Data.DataTableMain sequence*(empty)*
indexInt32Main sequence*(empty)* — bound to For Each Row.CurrentIndex
respStatusInt32Main sequence*(empty)*
respStringMain sequence*(empty)*
isSuccessBooleanMain sequence*(empty)*

You can also expose the API URL, API key, flow ID, and robot ID as Arguments in_RPAWatchApiUrl, in_RPAWatchApiKey, in_FlowId, in_RobotId) so the same workflow can be promoted from Dev to Prod without changes.

 2. Capture the start time

 

The very first activity should be an Assign that records the moment the workflow started — Send Report uses it to calculate duration_seconds.

 

- TostartedAt

- ValueDateTime.Now

3. Read the input workbook

 

Add an Excel → Read Range Workbook activity:

 

PropertyValue
Workbook Path@"C:\Users\<you>\Downloads\English_Dummy_RPA_Data.xlsx"
Sheet Name"All"
Range"" *(blank — reads the whole sheet)*
Add HeadersTrue
DataTableexcelDataTable

 

If you assign this later (e.g. after the Excel read), the reported duration will be artificially short.

4. Initialize the details table

 

Add a Create Details Table activity (under the RPA Watch category):

 

- Details TabledetailsTable

 

The output is an empty DataTable with the six columns RPA Watch expects: sequence_no, record_id, record_name, status, result, error_message. See [Create Details Table](create-details-table) for the full schema.

 

5. Loop over the rows and log each one

 

Add a For Each Row in Data Table activity:

 

- DataTableexcelDataTable

- CurrentRowcurrentDataRow (default)

- In the Properties panel, set CurrentIndexindex

 

Inside the loop body, drop a single Add Detail Row with these C# expressions:

PropertyExpression
Details TabledetailsTable
Sequence Noindex
Record IDcurrentDataRow["National ID"].ToString()
Record NamecurrentDataRow["First Name"].ToString() + " " + currentDataRow["Last Name"].ToString()
StatuscurrentDataRow["Flow Status"].ToString() == "Completed" ? "success" : "failed"
ResultcurrentDataRow["Log"].ToString()
Error MessagecurrentDataRow["Error"].ToString()

The ternary on Status is the key trick: it maps the source system's domain status to the two values RPA Watch understands success, failed). See [Add Detail Row](add-detail-row.md) for more patterns.

6. Send the consolidated report

 

After the loop, drop a Send Report activity:

PropertyValue
API Base URL
API Keyin_RPAWatchApiKey
Flow IDin_FlowId *(e.g. *"6f0a2c39-3d5e-4ca1-81fb-88368xxxx"*)*
Robot IDin_RobotId *(e.g. *"8xxxx"*)*
Started AtstartedAt
Target"RPA Watch"
Source"Excel"
Result Summary$"{detailsTable.Select(\"status = 'success'\").Length} of {detailsTable.Rows.Count} records processed"
Status*(leave empty — auto-calculated from *detailsTable*)*
DetailsdetailsTable
File Pathsnew string[] { @"C:\Robomotion\Reports\Rapor_27-04-2026_16-02-03.xlsx" }
Response Status CoderespStatus
Response Bodyresp
Is SuccessisSuccess

Because detailsTable contains rows with both success and failed, the run will be reported as partial_success automatically — no override needed. If the file paths in File Paths exist, they're uploaded as attachments using the original filenames.

Log the outcome (optional but recommended)

 

Drop a Log Message after Send Report with Level = Info and Message = $"RPA Watch returned {respStatus}". If a run ever fails to publish, this is the first place you'll look.

 

What you should see in RPA Watch

 

Within a few seconds, navigate to Processes → <your flow> in RPA Watch:

 

- A new run appears with status Partial success

- The duration matches the time between startedAt and the Send Report call

- The Details tab lists all three records, with row 2 highlighted as failed and the Error column populated

- The Attachments section shows Rapor_27-04-2026_16-02-03.xlsx for download

Common pitfalls

SymptomFix
Run is reported as success even though some rows failedThe Status expression isn't producing failed for the bad rows. Quick check: write currentDataRow["Flow Status"].ToString() to Log Message — values must compare equal to your literal "Completed", "Error", …) including casing and trailing whitespace.
Duration is a fraction of a secondThe startedAt Assign is downstream of the Excel read. Move it to the top of the sequence.
401 Unauthorized in Response BodyAPI key is missing, revoked, or scoped to a different account. Regenerate from Account Settings → API Keys.
Attachments don't appear on the dashboardEach path in File Paths must exist on disk when Send Report runs. Missing paths are skipped silently.