Mar 03 2023 06:26 AM - edited Mar 03 2023 06:27 AM
I work for a performing arts organization, and we manually create documents ("one sheets") related to performance information in tables like casts, crews, chorus details, etc. See the example picture below. I would like to start keeping this table data in Microsoft Lists for all the performances and use the new Power Automate Syntex function to generate these tables into the Word documents automatically.
I am confused on how to go about using the Syntex function to create tables. All of the examples and docs are showing simple examples that look like mail merges. Does anyone have advice how to handle the tables?
Note that the function will have to filter the lists to only pull in the information for that performance (which is in the list as a column), and the next document would have a different performance and so on.
Help?
Aug 20 2023 04:54 AM
@rsderby Sorry to say I don't have a solution for this. I'm having the same problem and been hunting for a solution for many months now. I want to create an invoice that has a table with each billable item as a row in the table but I can't find any examples how to populate the table. If I use the list columns from a 'get items' it goes into a 'Apply to Each' loop so tried the 'Select' Data Operation and 'Create HTML table' and various array variables and JSON formats but it always fails.
It works if I manually create the doc via the library but not via power automate.
Has anyone succeeded in using tables?
Aug 21 2023 02:07 AM
@Wayne_Addison you can use a Data Operation -> Compose method to bind the items to a table in content assembly.
Sep 11 2023 01:21 AM - edited Sep 11 2023 01:23 AM
Struggling with the same behavior. @spucelik @Wayne_Addison @rsderby
I have a modern Syntex Template with a Table. The Template with Table is supported manually from SharePoint New Menu.
In Power automate action (Preview) "Generate document using Microsoft Syntex (preview)"
https://learn.microsoft.com/en-us/microsoft-365/syntex/automate-document-generation
microsoft wrote:
10. The action does not support images and tables and templates containing these fields are hidden while selecting the templates in the action.
But the Template with table is not hidden in the action (instead it is a required column) and therefore i have to add the Table Column Mapping from dynamic content. But this is not working in many variations, because i need a Apply to Each Array in the table mapping.
I guess how a Data operation compose could help for a dynamic repeating section to bind the table entries to the table in content assembly?
How can i get the action working with tables as expected?
Or does the action not working with tables as expected, because of preview state?
Sep 11 2023 04:38 AM
Consider the following Power Automate Example
2. Now you're ready to populate the smart template with values. Notice that for my table I'm simply taking the JSON output that is produces from the Data Operation and binding it to the table.
3. The result of this will be added to the table in the smart template.
Sep 13 2023 03:34 AM - edited Sep 13 2023 03:46 AM
@spucelik thanks for your hints. But i can not get it to work. I fail to send the JSON-Objekt for the Table (from a get items select filter) to the TableField in the Syntex action. I always get
[{"ErrorMessage":"Answer for data type 'table' has wrong format.","HasError":true},{"ErrorMessage":"","HasError":false}]
clientRequestId: b65638ae-5dfb-4100-a224-0327f8c859dc
serviceRequestId: b65638ae-5dfb-4100-a224-0327f8c859dc
i also get this error when i try to update the Syntex-Template-TableField with a simple JSON-Object (single Item) like this one:
[
{
"Nr.": "1",
"Bereitzustellende": "Test",
"Detaillierte Erläuterungen": "Test",
"Anzufordern von": "Test",
"Stand": "offen",
"Bemerkung": "Test"
}
]
Do you have a working example for a suitable JSON?
I tried this without success
Sep 13 2023 04:58 AM
Hi @spucelik and all on this thread, I've been meaning to try your solution but have been getting a brand new problem when creating the template. Whenever I define the table field I get this error:
It started happening around the time MS switched new Syntex licencing from per-user to PAYG. I thought I'd be ok as my per-user was valid until Apr-2024 then I just saw this...
So MS could be switching off content assembly (or at least any new features) unless you are on PAYG even if you have a legacy per-user licence. Are you guys per-user or PAYG?
Sep 15 2023 05:09 AM
@Schneika Here are some screen shots of it working in my environment. There is also updated documentation to reference.
Here is the result of my Data Operation -> Select activity going against a library.
When binding the information to the template, here is the input values.
If you continue to have issues, I would open a support ticket and we can look at it in depth.
Sep 15 2023 05:11 AM
@Wayne_Addison I have noticed that when you do configure PAYG if you were previously PUPM, the templates need to be redeployed and published to the library. Content assembly does work with the straight PAYG billing configuration.
Try creating a new template and publishing it to a library. That should work.
Sep 18 2023 02:44 AM - edited Sep 18 2023 02:44 AM
I dont see the updated reference yet
https://learn.microsoft.com/en-us/microsoft-365/syntex/automate-document-generation
published date is the older one from 03/15/2023.
But i have already raised a Power Platform Service Support Ticket for this issue, dear @Steve Pucelik
Sep 18 2023 08:27 AM
@Schneika and @Steve Pucelik I am still having the same error that Karl is having. I see the inputs to the create document are proper JSON format but I get the error
Sep 18 2023 08:35 AM
@Steve Pucelik - I see one big difference between your working sample and my failed attempt. In your sample your json is in this format {"Correspondence Name":"Value1", "Date Sent":"Value2"} but the output from the data select action for my sample has the value first and the field name second like this by comparison {"Value1":Correspondence Name", "Value2":"Date Sent"}. Seems the data select is backwards in my case. I'll try this and respond back.
Sep 18 2023 08:38 AM
Oct 03 2023 10:59 PM