Populate documents (eg word) that have place holders

Hi

Would it be possible to build a node which populates eg a word document that has place holders inside it?

Example a template is stored in Nextcloud and it contains a place holder eg {{name}} , A workflow pics up the template and then a node populates the place holders and then saves the word document back to another Nextcloud folder.

Hope you understand the question

Kind regards
Mattias

Some time ago this case was opened

Not sure if this is currently available but this is quite useful to generate documents dynamically.

@Miquel_Colomer Is sadly still not directly available in n8n as we are still evaluating how we want to make such a feature available inside of n8n.

@Mattias_Larsson Sounds very interesting. Just checked there seem to be multiple npm module which could be used to create such a node. Some I found within a few minutes:

1 Like

Here some others (also with image support):

(Looks to me like it has most of the functions)

Here another one:

I think I’ll try it out myself.

1 Like

generating reports from iterated json results would make this tool so much more powerful and handy.

I am looking for a solution to replace a place holder like $mysignature with a specific image of a signature. Would some of these nodes be able to do that?

@BramKn developed for us Generate Report node like this described here.

Please check n8n-nodes-generate-report - npm

2 Likes

This feature is seamlessly implemented in Make.com, and I currently use it as a single external step whenever needed.

The process is straightforward:
1. Store the Word document with variables in Google Drive.
2. Run the “Create Document from Template” action in Make.com.
3. Provide an array of variable values, where each entry consists of a name and its corresponding value.
4. Handle tables dynamically by specifying the start and end of the table, along with the variables for the table content if the document contains a table with an array

I think its is crutial feature on n8n

Is there any update on this request?
Is there any way to do this on n8n?

4 Likes

Anything new?

There is a community node: DocxTemplater | n8n community node | NCNodes

I don’t know if it works well or not