Skip to main content

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").

Screenshot placeholder: /img/guides/latenode/latenode-uc1-new-scenario.png

Add 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.

Screenshot placeholder: /img/guides/latenode/latenode-uc1-trigger-node.png

Add 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_KEY and X-Sandbox: true (get your API key from the Dashboard)
  • Content-Type: application/json
  • Body: JSON mapping trigger data to your PolyDoc template fields.
Screenshot placeholder: /img/guides/latenode/latenode-uc1-http-request.png

Add 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.

Screenshot placeholder: /img/guides/latenode/latenode-uc1-output-node.png

Test and deploy

Click Test to run the scenario with sample data. Verify the PDF output, then click Deploy to activate the scenario in production.

Screenshot placeholder: /img/guides/latenode/latenode-uc1-test-deploy.png

Use 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.

Screenshot placeholder: /img/guides/latenode/latenode-uc2-webhook-trigger.png

Add 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.

Screenshot placeholder: /img/guides/latenode/latenode-uc2-javascript-node.png

Add 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.

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

Deliver 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.

Screenshot placeholder: /img/guides/latenode/latenode-uc2-deliver.png