Forum Discussion
Using Power Automate and Syntex to create document with multiple tables HELP?
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
Schneika Here are some screen shots of it working in my environment. There is also updated https://learn.microsoft.com/en-us/microsoft-365/syntex/automate-document-generation 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.
- Wayne_AddisonOct 04, 2023Copper ContributorSuccess for me too! My problem... I didn't put labels in the header row of the table, that was my 'Microsoft Word, Sorry, we ran into a problem' error AND when I did put labels I didnt make the JSON field names exactly match the labels. I think I'm the winner Mario.
Thanks to all on the thread.
- 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": {"dataset": "https://xxxxxxx.sharepoint.com/sites/OperationalContentCenter","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?