Renders the HTML you paste in as a PDF, downloads the finished file and emails it to you as an attachment.
Uses
Gmail
PDF.co
Turn HTML into a PDF document
htmlSource to blank.Set htmlSource to blank.pdfFileName to blank.Set pdfFileName to blank.sendTo to blank.Set sendTo to blank.pdfFileName and save it as fileName.Trim pdfFileName and save it as fileName.fileName doesn't end with .pdf (ignoring case)If fileName doesn't end with .pdf (ignoring case)Yes
fileName to fileName.pdf.Change fileName to fileName.pdf.No
No steps
rendered.Turn HTML into a PDF. Save it as rendered.
File name: fileNamehtmlSourcerendered.url and save it as pdfUrl.Trim rendered.url and save it as pdfUrl.pdfUrl doesn't start with https://If pdfUrl doesn't start with https://Yes
No
No steps
fetched to blank.Set fetched to blank.downloadProblem to blank.Set downloadProblem to blank.downloadErrorIf a step below fails, save the error as downloadErrorTry
pdfUrl and save it as fetched.Fetch pdfUrl and save it as fetched.On error
downloadError.message and save it as rawReason.Trim downloadError.message and save it as rawReason.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.safeReason contains ://If safeReason contains ://Yes
downloadProblem to the finished PDF could not be downloaded.Change downloadProblem to the finished PDF could not be downloaded.No
downloadProblem to safeReason.Change downloadProblem to safeReason.downloadProblem is empty and fetched.ok isn't yesIf downloadProblem is empty and fetched.ok isn't yesYes
downloadProblem to the renderer answered with status fetched.status.Change downloadProblem to the renderer answered with status fetched.status.No
No steps
downloadProblem isn't emptyIf downloadProblem isn't emptyYes
downloadProblem.Stop and report a problem: The PDF was rendered but could not be downloaded, so nothing was emailed: downloadProblem.No
No steps
fetched.body.documents[0].document_ref and save it as documentRef.Trim fetched.body.documents[0].document_ref and save it as documentRef.documentRef doesn't start with doc_If documentRef doesn't start with doc_Yes
No
No steps
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 summarised.fileName.Show in the output: Emailed fileName.