Renders the HTML you paste in as a PDF, downloads the finished file and emails it to you as an attachment.

UsesGmailPDF.co

Turn HTML into a PDF document

Give it the HTML for a page, a name for the file and an address, and run it whenever you have markup to turn into a document. The HTML is rendered as a PDF exactly as you wrote it, the finished file is downloaded, and it is emailed to you as an attachment.

You get an email with the PDF attached, its subject the file name you chose. No AI reads the HTML and nothing is summarized, reformatted or tidied up: what you put in is what comes out, styling and all, though any images or stylesheets the page links to must be reachable on the public web. The renderer hands back a short-lived download link rather than the file, so the PDF is downloaded straight away and that copy is attached. If no link comes back or the download fails, the run stops and nothing is emailed, so you never get a message claiming a PDF that is not there. A download failure is reported with the reason but never the address, because that link carries a signature.

Set htmlSource to blank.Set htmlSource to blank.
Set pdfFileName to blank.Set pdfFileName to blank.
Set sendTo to blank.Set sendTo to blank.
Trim pdfFileName and save it as fileName.Trim pdfFileName and save it as fileName.
If fileName doesn't end with “.pdf” (ignoring case)If fileName doesn't end with “.pdf” (ignoring case)
Yes
Change fileName to “@fileName.pdf”.Change fileName to “@fileName.pdf”.
No
No steps
PDF.coPDF.coTurn HTML into a PDF. Save it as rendered.Turn HTML into a PDF. Save it as rendered. File name: fileNamehtmlSource
Trim rendered.url and save it as pdfUrl.Trim rendered.url and save it as pdfUrl.
If pdfUrl doesn't start with “https://”If pdfUrl doesn't start with “https://”
Yes
Stop and report a problem: The HTML was sent for rendering but no PDF download link came back, so nothing was emailed. Check the HTML and try again.Stop and report a problem: The HTML was sent for rendering but no PDF download link came back, so nothing was emailed. Check the HTML and try again.
No
No steps
Set fetched to blank.Set fetched to blank.
Set downloadProblem to blank.Set downloadProblem to blank.
If a step below fails, save the error as downloadErrorIf a step below fails, save the error as downloadError
Try
Fetch pdfUrl and save it as fetched.Fetch pdfUrl and save it as fetched.
On error
Trim downloadError.message and save it as rawReason.Trim downloadError.message and save it as rawReason.
Replace pdfUrl with “the PDF download address” in rawReason and save it as safeReason.Replace pdfUrl with “the PDF download address” in rawReason and save it as safeReason.
If safeReason contains “://”If safeReason contains “://”
Yes
Change downloadProblem to “the finished PDF could not be downloaded”.Change downloadProblem to “the finished PDF could not be downloaded”.
No
Change downloadProblem to safeReason.Change downloadProblem to safeReason.
If downloadProblem is empty and fetched.ok isn't yesIf downloadProblem is empty and fetched.ok isn't yes
Yes
Change downloadProblem to “the renderer answered with status fetched.status”.Change downloadProblem to “the renderer answered with status fetched.status”.
No
No steps
If downloadProblem isn't emptyIf downloadProblem isn't empty
Yes
Stop and report a problem: The PDF was rendered but could not be downloaded, so nothing was emailed: downloadProblem.Stop and report a problem: The PDF was rendered but could not be downloaded, so nothing was emailed: downloadProblem.
No
No steps
Trim fetched.body.documents[0].document_ref and save it as documentRef.Trim fetched.body.documents[0].document_ref and save it as documentRef.
If documentRef doesn't start with “doc_”If documentRef doesn't start with “doc_”
Yes
Stop and report a problem: The download did not produce a file, so nothing was emailed. Try running it again.Stop and report a problem: The download did not produce a file, so nothing was emailed. Try running it again.
No
No steps
GmailGmailSend an email to sendTo.Send an email to sendTo. Subject: fileNameAttached is fileName, rendered from the HTML in this workflow's 'htmlSource' step. The markup was converted as written - nothing in it was rewritten or summarized.
Show in the output: Emailed fileName.Show in the output: Emailed fileName.