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.
- A free UiPath Cloud account - sign up at cloud.uipath.com. Everything in this guide runs in the browser via UiPath Studio Web and UiPath Apps; no Windows install required. Studio Desktop (Community edition) remains an option if you later need attended-only activities.
Use Case 1: Scheduled PDFs from a data source
Build an unattended process in UiPath Studio Web that reads invoice data, calls PolyDoc to render the PDF, and lets PolyDoc upload the result straight to your S3-compatible bucket via a presigned URL you generate upstream. Scheduled from Orchestrator.Read Range → Generate presigned URL → HTTP Request (PolyDoc API, cloudStorage)
Create a new Studio Web project
Sign in to cloud.uipath.com and open Studio Web from the Automation Cloud sidebar. Click Create New, pick RPA Workflow from the project-type list, and name the project Generate Invoice PDFs. Studio Web opens a blank Main.xaml workflow with a Manual Trigger already in place — activities you drop below it execute top-to-bottom, which suits a linear PDF-generation flow.
Read the invoice data
Click the Add activity slot below the Manual Trigger from Step 1. The activity picker opens — search or browse by category and pick the read activity that matches your data source:
- Read Range (Excel / Google Sheets connector) — for a sheet of invoices, one row per invoice plus a separate sheet for line items.
- Download Storage File + Deserialize JSON — for an Orchestrator Storage Bucket holding pre-shaped JSON.
- HTTP Request (GET) — for an upstream system (CRM, billing tool) that exposes the data via API.
Store the rows in a DataTable variable (e.g. dtInvoices) and the matching line items in a second DataTable keyed by invoice number. Each invoice row also needs a presigned PUT URL for where the rendered PDF should land — generate it with your cloud provider's SDK (per the cloud-storage guides), an internal microservice, or UiPath's AWS Activities / HTTP Request against a signer endpoint. Store it as the presignedUrl column alongside the invoice fields. Step 3 sends it to PolyDoc as cloudStorage.presignedUrl.
Call the PolyDoc API with HTTP Request
Add an HTTP Request activity (search the picker for "HTTP Request" and pick the one from the Web API package) inside a For Each Row loop over dtInvoices from Step 2. Configure it as follows.
- URL:
https://api.polydoc.tech/pdf/convert - Method: POST
- Headers:
Authorization: Bearer YOUR_API_KEY(get the key from the PolyDoc Dashboard),Content-Type: application/json, andX-Sandbox: truewhile you're testing. - Response type: Text — with
cloudStorageset, PolyDoc replies with a small JSON envelope after uploading the PDF to your bucket. (Drop thecloudStorageblock and switch to Binary if you want the raw PDF bytes back in the response instead.) - Body: assemble the JSON below from the current row. Reference your invoice template by its short ID (look it up under Dashboard → Templates), and pass the per-invoice presigned URL Step 2 generated as
cloudStorage.presignedUrl.
{
"source": "[template:YOUR_TEMPLATE_ID]",
"templateData": {
"invoice_number": "INV-2026-001",
"invoice_date": "2026-01-15",
"invoice_due_date": "2026-02-14",
"invoice_subtotal": 1200,
"invoice_tax_rate": 0.1,
"invoice_tax_amount": 120,
"invoice_total": 1320,
"customer_name": "John Doe",
"customer_email": "john.doe@example.com",
"customer_street": "456 Customer Avenue",
"customer_city": "Beautiful City",
"customer_country": "UK",
"items": [
{ "quantity": 1, "name": "Web Design Services", "description": "Custom website design and development for company homepage", "price": 800 },
{ "quantity": 1, "name": "Logo Design", "description": "Professional logo design with 3 revision rounds", "price": 300 },
{ "quantity": 1, "name": "SEO Optimization", "description": "Search engine optimization for 10 target keywords", "price": 100, "original_price": 150 }
]
},
"cloudStorage": {
"presignedUrl": "https://s3.YOUR_REGION.amazonaws.com/YOUR_BUCKET/invoices/INV-2026-001.pdf?X-Amz-Algorithm=..."
}
}
Parse the upload-confirmation response
PolyDoc PUTs the rendered PDF to the presigned URL from Step 3 directly, so there's nothing for the robot to upload. The HTTP Request's response is a small JSON envelope confirming the upload landed:
{
"success": true,
"message": "PDF uploaded to cloud storage.",
"data": {
"url": "https://s3.YOUR_REGION.amazonaws.com/YOUR_BUCKET/invoices/INV-2026-001.pdf"
}
}
Add a Deserialize JSON activity after the HTTP Request, bind it to Response.Content, and read result("data")("url").ToString() for the bucket URL. Common downstream actions inside the same For Each Row loop:
- Send Outlook / Gmail Message with the URL as a link in the body — no attachment needed, the bucket serves the file.
- Append Item to Excel Range back to the source sheet, storing the URL next to the invoice as a fulfillment record.
- Add Queue Item to an Orchestrator queue so a follow-up process (signing, archival, ledger update) can pick it up.
Publish and schedule from Orchestrator
Publish from Studio Web — the process becomes available in Orchestrator. Open it under Automations → Processes and add a Time Trigger (daily, hourly, etc.) or a Queue Trigger if you want it driven by an Orchestrator queue. Test once with Start a Job, then leave the trigger enabled.
Use Case 2: On-demand PDFs from a UiPath App
Let a human kick off a PDF generation from a browser form: build a UiPath App with the input fields, wire its Submit button to a Studio Web process that calls PolyDoc with cloudStorage.presignedUrl, and display the resulting bucket URL back to the user.App form → Run Process (PolyDoc + cloudStorage) → return URL → App File Viewer
Wrap the PolyDoc call in a callable process
In Studio Web, create a process called Generate Invoice On Demand. Open the left Data manager pane (the second icon down on the left rail) and add the invoice fields as Inputs — one String per text field, Double per amount, Date per date, a List<Object> in_items for the line items, plus an in_presignedUrl String the App will fill with a freshly generated presigned PUT URL. The body shape is identical to Use Case 1 Step 3 — same headers, same templateData map, plus cloudStorage.presignedUrl = in_presignedUrl. Define an Output out_pdfUrl bound to JObject.Parse(Response.Content)("data")("url").ToString() so the App can render the result. Publish.
Build the form in a UiPath App
Open Apps from the Automation Cloud sidebar (cloud.uipath.com/.../apps_), click Create new app, name it the same as the process from Step 1, and pick the Blank Page template. Hit Add control → Input and drag one control onto the canvas per process input argument:
- Text fields: invoice number, customer name, customer email, customer street, customer city, customer country.
- Number fields: invoice subtotal, tax rate, tax amount, total. Use Apps'
Numbercontrol type so the value is emitted as a number (not a string) to the process. - Date pickers: invoice date, invoice due date. Format the bound value as
yyyy-MM-dd. - Data table: line items. Bind to a local Apps variable
vItemswith columns matching the process'in_itemsshape.
Wire Submit to Run Process
Add a Submit button. In its Events tab, attach a Run Process event and pick the Generate Invoice On Demand process you published in Step 1. Map each form control's value to the matching process argument. For in_presignedUrl, call your signer endpoint via an Apps HTTP Request action just before Run Process (or have a sidecar Studio Web sub-process generate it via UiPath's AWS Activities) and pass the result through. The Run Process executes the same PolyDoc body shape from Use Case 1 Step 3, just fed from form controls instead of a DataTable row.
Display the generated PDF in the App
Below the submit button, place a File Viewer (or Hyperlink) control bound to the process' out_pdfUrl output argument. When the user hits Submit, Apps runs the process, PolyDoc PUTs the PDF directly into your bucket, and the viewer renders it from the returned URL. Publish the App and share its URL with whoever needs to generate invoices on demand.