Forum Discussion
rsderby
Mar 03, 2023Copper Contributor
Using Power Automate and Syntex to create document with multiple tables HELP?
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 pictur...
spucelik
Microsoft
Sep 11, 2023
Consider the following Power Automate Example
- This action will first get items from a SharePoint library. Then add a Data Operation -> Select action to your flow. Notice that the "Map" values correspond to a table I have in my Content Assembly template columns. This will take the results from my SPO Library and save it this table structure.
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.
Schneika
Sep 13, 2023Iron Contributor
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
- Steve PucelikSep 15, 2023Copper Contributor
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.
- Mario_FulanSep 18, 2023Iron Contributor
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.
- Mario_FulanSep 18, 2023Iron ContributorSuccess. It now works for me. What an idiot I am. I know the JSON format but for some reason had dyslexic response. This is now working for me. Thanks everyone.
- SchneikaSep 18, 2023Iron Contributor
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- Mario_FulanSep 18, 2023Iron Contributor
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
ErrorAction 'Generate_document_using_Microsoft_Syntex_(preview)_2' failedError Details[{"ErrorMessage":"Answer for data type 'table' has wrong format.","HasError":true}]
clientRequestId: 3f4cb665-5663-4fa9-b185-b6c5b053f1b4
serviceRequestId: 3f4cb665-5663-4fa9-b185-b6c5b053f1b4Here are the raw inputs to the create document with Syntex request - I've verified the heading match the headings in the Word document template (removed spaces to make sure that was not the issue):{"host": {"connectionReferenceName": "shared_sharepointonline","operationId": "CreateContentAssemblyDocument"},"parameters": {"table": "fc943c8d-db45-41a6-965a-ef63ff17f60d","template": "0x0101005F1508AB448AD04A82198A206228038C006AC7F8A786B4374AB41FB6D8D957510A","fileName": "MAP1.pdf","item/msca602030TableSelection": [{"Ameren Illinois": "OrgName","Larry Magelitz": "PrimaryContactName","Manager-Illinois Crisis Management": "PrimaryContactTitle","email address removed for privacy reasons": "PrimaryContactEmail"},{"Ameren Missouri": "OrgName","Pam Harrison": "PrimaryContactName","Director, Missouri Gas Operations": "PrimaryContactTitle","email address removed for privacy reasons": "PrimaryContactEmail"}]}}Have you found out anything through your support request inquiry?