Latenode
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 Latenode account — sign up for free, no credit card required.
Use Case 1: Generate PDFs from Database Events
Generate PDFs from database, schedule, or app events using Latenode's visual scenario builder.Database trigger node → HTTP Request node (PolyDoc API) → Email node
Create a new scenario
Open Latenode and click New Scenario. Give it a name (e.g. "Database to PDF").
/img/guides/latenode/latenode-uc1-new-scenario.pngAdd a trigger node
Add a trigger node — choose a database trigger, a schedule (cron), or an app event depending on your data source. Configure the connection credentials and the event to watch.
/img/guides/latenode/latenode-uc1-trigger-node.pngAdd an HTTP Request node for PolyDoc
Add an HTTP Request node and configure:
- URL:
https://api.polydoc.tech/pdf/convert - Method: POST
- Headers:
Authorization: Bearer YOUR_API_KEYandX-Sandbox: true(get your API key from the Dashboard) - Content-Type: application/json
- Body: JSON mapping trigger data to your PolyDoc template fields.
/img/guides/latenode/latenode-uc1-http-request.pngAdd an output node
Add an email node or storage node to deliver the PDF. Map the recipient, subject, and attach the binary PDF from the HTTP response.
/img/guides/latenode/latenode-uc1-output-node.pngTest and deploy
Click Test to run the scenario with sample data. Verify the PDF output, then click Deploy to activate the scenario in production.
/img/guides/latenode/latenode-uc1-test-deploy.pngUse Case 2: Webhook to PDF
Accept webhook data, optionally transform it with JavaScript, and generate a PDF.Webhook node → JavaScript node (prepare data) → HTTP Request node (PolyDoc) → Send email
Add a Webhook trigger node
Create a new scenario and add a Webhook trigger node. Latenode generates a unique URL — copy it and configure your external service to POST data to it.
/img/guides/latenode/latenode-uc2-webhook-trigger.pngAdd a JavaScript node to transform data
Optionally add a JavaScript node to transform the incoming webhook data. Use it to rename fields, calculate totals, or format dates before passing data to PolyDoc.
/img/guides/latenode/latenode-uc2-javascript-node.pngAdd HTTP Request node for PolyDoc
Add an HTTP Request node configured for the PolyDoc API. Set the URL, method, headers (Authorization, X-Sandbox, Content-Type), and map the transformed data to the JSON body.
/img/guides/latenode/latenode-uc2-http-request.pngDeliver the PDF
Add a delivery node (email, cloud storage, or another app) to send the generated PDF. Test the scenario end-to-end, then deploy it.
/img/guides/latenode/latenode-uc2-deliver.png