Hi @n8ndev123, hope you’re doing well!
This is a very common question, and I’ve found it can be tricky because template placeholders usually expect simple strings rather than structured rich text. When I use the Google Docs node to generate Word files, it typically treats everything as plain text by default. One thing I sometimes try is converting Markdown to HTML using the Markdown node, since some nodes can interpret basic HTML tags, although Word templates can be a bit strict about that. If I need more precise control over paragraphs or bullet points, I may use a Code node to structure the data and split the content into multiple smaller placeholders like {{bullet1}}, {{bullet2}}, filling them with logic instead of relying on a single large placeholder. For more complex formatting, I also consider dedicated templating services such as APITemplate.io or Bannerbear, since they are designed to inject HTML or CSS-style formatting into document templates and tend to integrate well with n8n; ultimately, I just try to balance the complexity of the text with the limitations of the template engine.
Thanks a lot for your detailed answer, I really appreciate the time you took to explain the different approaches
However, what I’m trying to achieve is slightly different — I specifically need to inject dynamically generated rich text (with formatting like bold, paragraphs, bullet points, etc.) into a single placeholder inside a Word template, rather than splitting the content into multiple predefined placeholders.
Honestly plain placeholder replacement in .docx won’t do rich text, those placeholders are just string swaps. You’d need something like docx-templater’s HTML module to actually inject formatted content into the XML structure of the Word file. Easiest way in n8n is a Code node with the docxtemplater and docxtemplater-html-module npm packages, or offload it to an external API like Carbone or DocuGenerate.
I don’t have hands-on experience with Docxtemplater, so I can’t speak from direct implementation. That said, if your goal is to inject dynamically generated rich text into a single placeholder, the general approach that has worked for me in similar situations is to generate the formatted structure first, usually as HTML or structured text in a Code node, and then pass that content into the document generation step. From what I’ve read about Docxtemplater it does seem like it was designed exactly for this kind of use case, So if is supported in your workflow, it could indeed be the right direction for handling rich text injection. I haven’t tested that package myself in n8n yet, but conceptually it aligns well with the requirement of inserting formatted content into a single placeholder. If you do try it, I’d be very interested to hear how it works in practice.