Skip to content

Conversation

@shivamvish160
Copy link
Contributor

PDF Generator Flow Action for ServiceNow

This custom Flow Designer action allows you to generate a PDF from HTML content and attach it to any record in ServiceNow using the sn_pdfgeneratorutils.PDFGenerationAPI.

Features

  • Converts HTML content into a valid PDF document.
  • Attaches the PDF to any record in ServiceNow.
  • Returns the sys_id and download link of the generated PDF.

Inputs

NameTypeDescriptionhtml_contentStringHTML content to be converted into a PDF.file_nameStringName of the PDF file (e.g., report.pdf).table_nameStringTable name of the record to attach the PDF to.| record_sys_id | String | Sys ID of the record to attach the PDF to. |

Outputs

Name Type Description
pdf_attachment_sys_id String Sys ID of the generated PDF attachment.
pdf_attachment_link String Direct download link to the PDF attachment.

🚀 Usage Instructions

  1. Add this action to your Flow Designer.
  2. Provide the required inputs:
    • HTML content to convert.
    • File name for the PDF.
    • Target table and record Sys ID.
  3. Use the outputs to reference or share the generated PDF.

🧪 Example Usage

Inputs:

  • html_content: <h1>Incident Summary</h1><p>This is a test PDF.</p>
  • file_name: incident_summary.pdf
  • table_name: incident
  • record_sys_id: a1b2c3d4e5f6g7h8i9j0

Outputs:

  • pdf_attachment_sys_id: abc123xyz456
  • pdf_attachment_link: https://instance.service-now.com/sys_attachment.do?sys_id=abc123xyz456

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@snamjosh snamjosh self-assigned this Oct 7, 2025
@snamjosh
Copy link
Contributor

snamjosh commented Oct 7, 2025

Thank you for your contribution.

@snamjosh snamjosh merged commit 7d84ddb into ServiceNowDevProgram:main Oct 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants