---
title: Lightning Flow Action – Convert DOCX to PDF
description: "If you have a DOCX file that you want to convert into a PDF, you can use a Flow to handle this. Use the \"Convert a DOCX to PDF\" action in the Flow Builder. You can write your own logic…"
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-packs/lightning-flow-action-convert-docx-to-pdf/"
updated: "2025-01-23"
category: PDF BUTLER PACKS
---

# Lightning Flow Action – Convert DOCX to PDF

If you have a DOCX file that you want to convert into a PDF, you can use a Flow to handle this. Use the "Convert a DOCX to PDF" action in the Flow Builder.

You can write your own logic to define the record and Content Document that needs to be converted.

![](https://pdfbutler.com/wp-content/uploads/2025/01/Convert-DOCX-to-PDF.png)

 

Properties to set:

- Content Document Id: Mandatory - Id of the ContentDocument that is the DOCX file
- Record Id: Mandatory - Id of the record the PDF should be linked to
- Run Async: Optional - False by default. Set to "TRUE" if you are running for a trigger or you have done other updates/inserts in the same transaction
- Save as new Content Document Version: Optional - False by default. Set to "TRUE" when there should not be a new ContentDocument created but the PDF has to be added as a new version to the Content Document provided (see parameter 1)

Return values:

There will only be return values when Run Async is "FALSE"!

- Content Document Id: the new ContentDocumentId if Save as new Content Document Version is "FALSE"
- Content Version Id: the new ContentVersionId
