Use Case: Generate a customer specific price list with the click of a button.
Solution: I have built a MS Power App the user interacts with to request a price list for a customer with the click of a button. The Power App starts a Power Automate flow that includes the “Start Document Generation Process with JSON” action. I have built a very simple docx template using your online google docs builder. Each price list should optionally include 9 categories of product. The JSON sent to the doc engine includes key value pairs that inform the engine which categories to include on the document. If the section flag is set to true, the engine should populate a table with the pricing details included in the JSON. If the section flag is false, the engine should hide the table. I’m using an #if statement to hide the tables.
I cannot get the docx template to render correctly. Specifically, the engine only populates one of the tables and seems to skip the rest regardless of how the section flag is set (true or false).
I have attached payload.csv which is the JSON sent to the engine. Payload.csv also contains the pricing details for each “section” object.
I have also attached a much stripped down version of the template. The template only contains 2 sections for simplicity rather than the full 9 sections.
Can you help me understand where I’m going wrong?
payload.csv (95.7 KB)
template.docx (20.3 KB)
