UiPath
Prerequisites
- A PolyDoc account and API key — sign up for free, no credit card required. The free plan includes 150 PDF conversions per month.
- UiPath Studio installed — download the Community edition for free.
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.
/img/guides/uipath/uipath-uc1-new-sequence.pngAdd 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.
/img/guides/uipath/uipath-uc1-read-data.pngAdd 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.
/img/guides/uipath/uipath-uc1-http-request.pngSave 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.
/img/guides/uipath/uipath-uc1-save-pdf.pngPublish 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.
/img/guides/uipath/uipath-uc2-attended-sequence.pngAdd 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.
/img/guides/uipath/uipath-uc2-input-dialogs.pngAdd 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.
/img/guides/uipath/uipath-uc2-http-request.pngSave 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.