# N8n Community node for DocX template -\> Report

**URL:** <https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175>\
**Category:** Built with n8n\
**Created:** [April 14, 2023, 6:48am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175 "2023-04-14T06:48:46Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [April 14, 2023, 6:48am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/1 "2023-04-14T06:48:46Z")

</div>

Hi there,

Some time ago, I developed a node for a client to be able to fill in DocX templates with data from a JSON object. The client allowed me to make it public, and now I finally had some time to do so.  
You are also able to convert the DocX file to PDF, but you need LibreOffice installed on the server for this to work.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/8/9/894db1ac5ed2dea20a2172a5cd73a89c2471646a.png)

[https://www.npmjs.com/package/n8n-nodes-generate-report](https://www.npmjs.com/package/n8n-nodes-generate-report)

Have fun!

Developed for [Energy SOAR](https://energysoar.com?ref=kr495s) - Security orchestration, automation and response tool.

---

<div class="post-metadata">

**Author:** ![davidwatters](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@davidwatters](https://community.n8n.io/u/davidwatters)\
**Post date:** [December 11, 2024, 6:22pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/2 "2024-12-11T18:22:52Z")

</div>

Hey Bram, nice work. This works really well. Is there any support for dynamic images to be inserted into the docx template?

Cheers!  
David

---

<div class="post-metadata">

**Author:** ![Maxim\_Broos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/maxim_broos/32/61923_2.png) [@Maxim\_Broos](https://community.n8n.io/u/Maxim_Broos)\
**Post date:** [March 2, 2025, 8:20pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/3 "2025-03-02T20:20:12Z")

</div>

It seems like the image plugin for the easy-template-x is not included in the npm package, so i suppose there is no support (as of yet)… I’m looking for this function as well so i’ll let you know if i find anything.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [March 2, 2025, 9:44pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/4 "2025-03-02T21:44:53Z")

</div>

The node works as is. Not sure what you are talking about.  
Just install and make sure to restart your n8n instance after installing.

---

<div class="post-metadata">

**Author:** ![Maxim\_Broos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/maxim_broos/32/61923_2.png) [@Maxim\_Broos](https://community.n8n.io/u/Maxim_Broos)\
**Post date:** [March 2, 2025, 10:13pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/5 "2025-03-02T22:13:40Z")

</div>

Sorry for the misunderstanding, it does work as-is! Thank you very much by the way for providing this plugin, amazing work and much appreciated that it is opensourced.

However, like @Davidwatters, i am trying to get n8n to insert an image from n8n (binary) into a Docx document and it seems this is not supported. Or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![jRuMoL](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jrumol/32/66871_2.png) [@jRuMoL](https://community.n8n.io/u/jRuMoL)\
**Post date:** [May 13, 2025, 11:56am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/6 "2025-05-13T11:56:42Z")

</div>

Thank you very much for the node. I tried and it worked very well. However, when I download the file and try to open with word I always get an error saying that the file is wrong.  
I can open it with google docs and also with Pages, but not with Word. It is funny that a doc file can be opened by other software rather than the one it was made for.  
Do you know what can be the problem?

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [May 13, 2025, 2:16pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/7 "2025-05-13T14:16:51Z")

</div>

Have you added .docx to the filename?

---

<div class="post-metadata">

**Author:** ![jRuMoL](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jrumol/32/66871_2.png) [@jRuMoL](https://community.n8n.io/u/jRuMoL)\
**Post date:** [May 15, 2025, 12:26pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/8 "2025-05-15T12:26:34Z")

</div>

![Screenshot 2025-05-15 212419](https://europe1.discourse-cdn.com/n8n/original/3X/9/9/99946028e590f03412acadcaa8c9956162ecbd50.png)

I didn’t put .docx in the file because it says that i shouldn’t add the extension. This is a picture of the node. I download the template from minio (S3 bucket) and pass through the node, but when I download and open the docx… it is “corrupted”.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [May 15, 2025, 1:39pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/9 "2025-05-15T13:39:42Z")

</div>

Hi @jRuMoL  
Ah yeah oops. Forgot about that (is because you can also convert to pdf)  
I see your file is actually a dotx that comes into the node. So possibly something going wrong there. Cannot really help any further as you are not inserting docX which is what it is built for. (never even heard of dotx to be honest)

---

<div class="post-metadata">

**Author:** ![jRuMoL](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jrumol/32/66871_2.png) [@jRuMoL](https://community.n8n.io/u/jRuMoL)\
**Post date:** [May 16, 2025, 6:47am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/10 "2025-05-16T06:47:02Z")

</div>

OK. That was the problem.

.dotx files are templates. As this is an automation node to fill in templates of documents, I though the input should be .dotx files. However, I converted the input file into .docx and worked perfectly.

I don’t know if there could someone like me who had the same problem. May be you can consider adding this information in the guidelines.

Again thank for you great work. And by the way, do you know if there is a possibility of adding images to the documents. I have seen that someone asked about that but there were no answer.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [May 16, 2025, 11:35am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/11 "2025-05-16T11:35:31Z")

</div>

The info says to fill in the DocX template. 🙂

---

<div class="post-metadata">

**Author:** ![rodrigokieffer](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/rodrigokieffer/32/83326_2.png) [@rodrigokieffer](https://community.n8n.io/u/rodrigokieffer)\
**Post date:** [May 23, 2025, 5:29pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/12 "2025-05-23T17:29:03Z")

</div>

The n8n team could integrate this node natively/officially, so that it can be used in the n8n cloud.

I think this functionality is important for the n8n platform.

---

<div class="post-metadata">

**Author:** ![L1zar](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/l1zar/32/90722_2.png) [@L1zar](https://community.n8n.io/u/L1zar)\
**Post date:** [June 15, 2025, 2:13am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/13 "2025-06-15T02:13:57Z")

</div>

> [@BramKn](#):
>
> says to fill in the DocX template.

Hi BramKn.

I really like your plugin and want to use it’s full potential. Sadly it’s not complete… Unless were in error, but I do not believe we are after testing.

While it parses document.xml it does not seem to parse footer1.xml to footer20.xml or header1.xml to header20.xml (1-20 are not static just examples as it creates a new header and footer for each unique header section.) for the headers and footers in the DOCX. This is an issue as any of the items in the the files for header and footer are not changed out in processing.

To fix the code it should load and iterate through all .xml files in the root folder. For example if the DOCX were extracted to Folder1 it should grab the names of all files with xml extensions, not just document.xml. Maybe ignoring fontTable.xml, styles.xml, numbering.xml for the sake of processing speed, although in all truth it would not affect them negatively regardless.

We also have a way to update images in the file so they render to the pages if your interested.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [June 15, 2025, 7:22am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/14 "2025-06-15T07:22:22Z")

</div>

Hi,

The node is using a package that actually does the modifications. So you will need to check with the creators of that package for this issue with the headers and footers.

---

<div class="post-metadata">

**Author:** ![L1zar](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/l1zar/32/90722_2.png) [@L1zar](https://community.n8n.io/u/L1zar)\
**Post date:** [June 16, 2025, 5:10am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/15 "2025-06-16T05:10:19Z")

</div>

I would be inclined to agree with you, except the fork fill-docx from your code uses a more up to date version of easy-template-x and it fills the fields throughout the templates. By that logic I would be inclined to believe the version of easy-template-x your using is out of date. Do with it as you will, but as you made the original I though you want to know. Yours also has the ability to render the pdf which is really nice.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [June 16, 2025, 1:43pm UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/16 "2025-06-16T13:43:50Z")

</div>

The node was created a while ago. 😉  
I have no reason to update it, so I won’t be spending the time to do that.

---

<div class="post-metadata">

**Author:** ![Jasper\_Wemmenhove](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jasper\_Wemmenhove](https://community.n8n.io/u/Jasper_Wemmenhove)\
**Post date:** [October 23, 2025, 10:15am UTC](https://community.n8n.io/t/n8n-community-node-for-docx-template-report/25175/17 "2025-10-23T10:15:06Z")

</div>

Is there a way for the replaced content to be stylized? (I.E., have certain bolding, spacing etc.) Or does anyone know of a node that can do this?
