Skip to main content

UiPath

Prerequisites

Use Case 1: Robot-Generated PDFs

Build an unattended robot that extracts data from files or systems, generates PDFs via PolyDoc, and saves them locally or to a shared drive.
Data extraction activities → HTTP Request activity (PolyDoc API) → Save File activity

Create a new Sequence in UiPath Studio

Open UiPath Studio and create a new Sequence. Name it descriptively (e.g. "Generate Invoice PDFs"). A Sequence executes activities top-to-bottom, which suits a linear PDF generation flow.

Screenshot placeholder: /img/guides/uipath/uipath-uc1-new-sequence.png

Add data extraction activities

Add data extraction activities to read your source data. Use Read Range for Excel files, Read CSV for CSV files, or database activities for direct queries. Store the result in a DataTable variable.

Screenshot placeholder: /img/guides/uipath/uipath-uc1-read-data.png

Add an HTTP Request activity for PolyDoc

Add an HTTP Request activity (from the UiPath.Web.Activities package) and configure:

  • URL: https://api.polydoc.tech/pdf/convert
  • Method: POST
  • Headers: Authorization = Bearer YOUR_API_KEY (get from the Dashboard), Content-Type = application/json, X-Sandbox = true
  • Body: build the JSON string using variable references from the DataTable rows to populate your PolyDoc template fields.
  • Response type: set to Binary to receive the PDF file content.
Screenshot placeholder: /img/guides/uipath/uipath-uc1-http-request.png

Save the PDF with Write Binary File

Add a Write Binary File activity after the HTTP Request. Set the file path (e.g. output\invoice-INV001.pdf) and pass the binary response content. Use a For Each Row activity around steps 3–4 to process multiple records.

Screenshot placeholder: /img/guides/uipath/uipath-uc1-save-pdf.png

Publish to Orchestrator

Test the sequence locally with Run. Once verified, publish the project to Orchestrator and assign it to an unattended Robot. Configure a trigger (time-based or queue-based) to run it automatically.

Use Case 2: Attended Automation with User Input

Create an attended automation that collects data from the user via dialog boxes, generates a PDF, and opens it immediately.
Input Dialog → Build JSON → HTTP Request (PolyDoc) → Open File

Create an attended automation sequence

In UiPath Studio, create a new Sequence for attended use. Attended automations run on the user's machine and can display UI prompts.

Screenshot placeholder: /img/guides/uipath/uipath-uc2-attended-sequence.png

Add Input Dialog activities

Add Input Dialog activities to collect the required data from the user — for example, customer name, invoice number, and amount. Store each response in a variable.

Screenshot placeholder: /img/guides/uipath/uipath-uc2-input-dialogs.png

Add the HTTP Request activity for PolyDoc

Add an HTTP Request activity. Use the same PolyDoc configuration as Use Case 1 — build the JSON body from the user-input variables to populate your template fields.

Screenshot placeholder: /img/guides/uipath/uipath-uc2-http-request.png

Save and open the generated PDF

Add a Write Binary File activity to save the PDF to a temporary path, then add an Open Application or Start Process activity to open the file in the user's default PDF viewer. Run the sequence to test the full flow.