ScreenshotNeo

BlogHow-to

How to Convert a Webpage to PDF with n8n and Google Drive

Build an n8n workflow that turns webpage content into a PDF in Google Drive, with a choice between document conversion and browser rendering.

By the ScreenshotNeo team4 October 20267 min read

Yes. An n8n workflow can retrieve webpage content, convert it to a PDF, and upload the resulting file to Google Drive. Choose the conversion path based on what you need: importing accessible HTML into a Google Docs document is a simple document conversion, while preserving a page’s browser-rendered layout, scripts, and dynamic content calls for a browser-rendering step that creates the PDF before upload.

The Google Drive upload step stores a PDF; it does not render a live website. Google documents HTML-to-Google-Docs conversion, and n8n documents exporting Google Docs files as PDF. Those options do not promise a browser-faithful copy of an arbitrary website. n8n Google Drive file operations · Google Drive API upload and conversion guidance

Choose the conversion method

Method Use it when Considerations
HTML to Google Docs, then export to PDF You need readable document output from accessible HTML. Check formatting, images, and page breaks. It is a document conversion, not a screenshot of the live page.
Browser renderer creates PDF, then n8n uploads it Rendered appearance, CSS, JavaScript, or dynamic page content matters. Adds a rendering component. Check its access requirements, privacy, reliability, and current pricing independently.

For a static page where readable text matters more than pixel-level similarity, start with HTML conversion. For a page that depends on JavaScript or whose layout must resemble the browser, render it first and pass the resulting PDF binary to Google Drive.

Build the workflow in n8n

  1. Choose a trigger. Use a Manual Trigger while building the workflow, or another trigger that provides the webpage URL. Make the URL available as a field on the incoming item.
  2. Retrieve the page or content. Use an HTTP Request step for an accessible static page or an upstream step that supplies HTML. Confirm the response contains the intended content. A request may encounter authentication, blocking, or a page whose content is assembled in the browser.
  3. Convert the content. For document output, use Google Drive’s supported HTML-to-Google-Docs conversion path, then export the Google Docs file as PDF. The exact node sequence depends on how your n8n workflow passes the HTML and document identifiers. If browser appearance matters, use a browser-rendering step that returns PDF binary data instead.
  4. Upload the PDF. Add the Google Drive node and select File → Upload. Set the input binary field to the property that contains the PDF, provide a filename, and choose the destination drive and folder. The upload operation expects binary file data; a URL or text field alone is not a PDF upload.
  5. Review the output. Open representative PDFs and check that the page is not blank or truncated, that images appear, and that page breaks and layout meet your needs.

Google Drive node settings

Setting What to provide
Resource and operation File → Upload for the final PDF file.
Input binary field The binary property created by the conversion step. Use the field name that actually appears on the incoming item.
File name A descriptive name ending in .pdf, such as article-2026-10-04.pdf. For repeated runs, include a date, identifier, or other unique value if you do not want overwrites or ambiguous copies.
Destination Select the intended Google Drive or shared drive and folder.
Convert to Google Document Use only for the document-conversion route where appropriate. n8n notes that this option requires the Google Docs API to be enabled in Google API Console. The final PDF should be exported as PDF from a Google Docs file.

For details on upload fields and the Google Docs export formats available in the node, see the n8n Google Drive documentation. Google’s Drive API documentation lists HTML as a convertible format for Google Docs; that support does not assert exact preservation of a website’s browser layout.

Handling dynamic pages and browser rendering

A plain HTTP response may not contain the same content a visitor sees. A page may require a signed-in session, block automated requests, or build its main content with JavaScript. In those cases, first use a renderer that loads the page in a browser and returns a PDF. Then configure the next n8n step to carry that PDF as binary data, and map that binary property into Google Drive’s upload field.

Keep the rendering and storage responsibilities separate: the renderer produces the PDF; the Drive node stores it. Verify whether the chosen renderer can access the page and whether sending the page or credentials to it is acceptable. The cited Drive upload documentation describes the final file handoff, not the behavior or fidelity of a particular renderer.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. It can return a PDF from one request, so you can skip managing a browser-rendering step yourself and upload the response as binary data in n8n. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -d format=pdf -o page.pdf

In n8n, make an HTTP Request to the API with your access key and target URL, configure the response to be handled as a file/binary value, and map that binary property to the Google Drive node’s upload field. Keep the API key in n8n credentials or another secret store rather than embedding it in a workflow shared with people who should not have access.

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the capture. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card.

Test the complete flow

  1. Run the workflow with one known, accessible URL.
  2. Inspect the conversion output before upload. Confirm that the binary property contains a PDF rather than HTML or an empty value.
  3. Run the Drive upload and check its result for the created file and destination.
  4. Open the PDF from Drive and inspect text, images, page breaks, and whether dynamic content is present when expected.
  5. Try a second URL with different layout or content behavior before relying on the workflow for a batch.

Troubleshooting

Symptom Likely cause Fix
PDF is blank or missing the main content The retrieved HTML is an authentication wall, block page, or initial shell before client-side rendering. Inspect the fetched response. Provide authorized access where supported, or use a browser renderer for content assembled in the page.
Drive upload says binary data is missing The upload node’s binary field name does not match the conversion step’s output property, or the previous step returned text/JSON. Inspect the incoming item and select the actual binary property. Ensure the conversion step returns a PDF file.
Google Docs conversion is unavailable or fails The Google Docs API may not be enabled, or the input is not suitable HTML for the conversion route. Enable the Google Docs API in Google API Console as n8n’s documentation requires for “Convert to Google Document,” and verify the input and node configuration.
PDF content is cut off or layout differs Document conversion does not reproduce all browser styling or pagination. Inspect the converted document and adjust expectations or use a browser-rendering step that creates a PDF before upload.
Images are absent Images may be inaccessible to the conversion process, require authentication, or not be represented in the retrieved content. Check image URLs and access, and review the resulting PDF. For visual output, use a renderer with suitable page access.
Duplicate or confusing files accumulate Each run uses the same generic filename or lacks a naming convention. Build a filename from the page identity and run date or another unique value. Choose the intended folder explicitly.

Performance, reliability, and cost

Each workflow run depends on retrieval, conversion, and upload succeeding. A slow or blocked source page can affect retrieval or rendering; a rendering route also adds a separate component to monitor. Use clear filenames and verify the uploaded file when the workflow is important. For recurring jobs, decide how to handle retries and duplicate uploads so a transient failure does not silently leave a missing PDF or create confusing copies.

The Google Drive documentation cited here establishes the upload and conversion capabilities, not a runtime, success rate, or price for a complete workflow. Account for the n8n deployment and any rendering service you choose using their current terms. HTML-to-Docs conversion avoids a separate browser renderer, while browser rendering adds setup and may involve a third-party service. ScreenshotNeo’s stated plans include 1,000 free shots per month with no card; paid plans start at $5 for 3,000 shots. A screenshot-to-PDF request consumes a screenshot according to the service’s plan and billing rules.

FAQ

Can n8n save a webpage as a PDF in Google Drive?

Yes. Convert the content to a PDF or render it to PDF first, then pass the PDF binary to Google Drive’s File → Upload operation.

Does Google Drive upload convert a live webpage to PDF?

No. Upload stores a file. The conversion route imports HTML into a Google Docs-compatible document and exports that document as PDF; browser-rendered capture is a separate step.

Which method should I use for a JavaScript-heavy page?

Use a browser-rendering step if the needed content appears only after the page runs its scripts. Confirm the renderer can access the page and inspect the generated PDF.

Can I use this for pages that require a login?

Only if the retrieval or rendering step has authorized access to the page. Do not assume an unauthenticated request will see the same content as your browser session.