Skip to main content
Participant
October 30, 2022
Question

Adobe Doc Gen - It seems there was an error on the server

  • October 30, 2022
  • 3 replies
  • 11481 views

Hi, 

 

Im trying to generate a document in word using the Adobe Document Generation plugin, using the json data as below. When I click on generated document I get the error as in screenshot below. I Validated the json and didn't find any issues.

 

Any ideas

 

[ 
  {
        "OwnerID": "L001",
		"Properties": [
				{
					"PropertyID": "P001",
					"Property Address": "12 St LA",
					"Rent": "300",
					"Bedroom": "2"
				},
				{
					"PropertyID": "P002",
					"Property Address": "3 St SA",
					"Rent": "450",
					"Bedroom": "3"
				}
			]
	},
    {
        "OwnerID": "L002",
        "Properties": [
				{
					"PropertyID": "P003",
					"Property Address": "4 St SA",
					"Rent": "500",
					"Bedroom": "4"
				
				}
			]
	},
    {
        "OwnerID": "L003",
        "Properties": [
				{
					"PropertyID": "P004",
					"Property Address": "20 St LA",
					"Rent": "400",
					"Bedroom": "2"
				}
			]
	}
]

 

 

3 replies

Known Participant
November 26, 2024

Here is the API error screenshot (attached the wrong image in last post)

Raymond Camden
Community Manager
Community Manager
November 26, 2024

Nevermind, a result showing corrupted doc would NOT be a network issue. I'd say let's focus on the API side, not the Word Add-In for now. Are you able to send me a copy of one Word doc showing the issue?

Known Participant
November 26, 2024

Hi Raymond. Certainly. Let me collect the JSON and a couple of the templates. 

 

{"stackng__STACKID__c":"312D76","stackng__FinishAirport__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeaVAAT"},"Id":"a015f00000DAeaVAAT","Name":"KPDK/PDK - DeKalb–Peachtree"},"stackng__RouteAirportCodes__c":"KPDK-KATL-KVNY-KPDK","stackng__Aircraft__c":"a005f000008qgpHAAQ","stackng__SalesOwner__c":"0055f000006W4y5AAC","stackng__Model__r":{"attributes":{"type":"stackng__Model__c","url":"/services/data/v62.0/sobjects/stackng__Model__c/a0C5f000018n30LEAQ"},"stackng__BaggageCapacity__c":"","Id":"a0C5f000018n30LEAQ","Name":"Challenger 650"},"stackng__ImageExterior__c":"https://stackimagesdatastore.blob.core.windows.net/bosimages/placeholder-exterior-590x360.png","stackng__FlightMapImageHtmlTag__c":"","Name":"22020173 Demo Customer VIP, Inc. (Multi Leg)","stackng__StartAirport__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeaVAAT"},"Id":"a015f00000DAeaVAAT","Name":"KPDK/PDK - DeKalb–Peachtree"},"stackng__PAXest__c":3,"stackng__FinishAirport__c":"a015f00000DAeaVAAT","stackng__TripNumber__c":"22020173","stackng__Account__r":{"attributes":{"type":"Account","url":"/services/data/v62.0/sobjects/Account/0015f00000CSOF4AAP"},"Id":"0015f00000CSOF4AAP","Name":"Demo Customer VIP, Inc."},"stackng__NotesToClient__c":"","stackng__Operator__c":"0015f00000LaAteAAF","stackng__Aircraft__r":{"attributes":{"type":"stackng__Aircraft__c","url":"/services/data/v62.0/sobjects/stackng__Aircraft__c/a005f000008qgpHAAQ"},"stackng__Seats_formula__c":16,"stackng__SeatConfig__c":"","stackng__TailNumber__c":"OH-WIW","Id":"a005f000008qgpHAAQ","Name":"OH-WIW Challenger 650 (EFHK/HEL)"},"stackng__StartAirport__c":"a015f00000DAeaVAAT","stackng__ImageInterior__c":"https://stackimagesdatastore.blob.core.windows.net/bosimages/placeholder-interior-590x360.png","stackng__Contact__r":"","stackng__Account__c":"0015f00000CSOF4AAP","stackng__TripDatesLocal_text__c":"15-Nov-2024 to 17-Nov-2024","stackng__Operator__r":{"attributes":{"type":"Account","url":"/services/data/v62.0/sobjects/Account/0015f00000LaAteAAF"},"Id":"0015f00000LaAteAAF","Name":"Jetflite OY"},"stackng__ImageLayout__c":"https://stackimagesdatastore.blob.core.windows.net/bosimages/placeholder-layout-590x220.png","stackng__Contact__c":"","stackng__TripName_formula__c":"22020173 Demo Customer VIP, Inc. (Multi Leg)","stackng__SalesOwner__r":{"attributes":{"type":"User","url":"/services/data/v62.0/sobjects/User/0055f000006W4y5AAC"},"Id":"0055f000006W4y5AAC","Name":"Johan Demo"},"Id":"a0J5f000000j97hEAA","stackng__Model__c":"a0C5f000018n30LEAQ","stackng__StartDateLocal__c":"2024-11-15","UserName":"Johan Demo","UserEmail":"johan+devops@stack.aero","UserTitle":"Senior Charter Sales Executive","UserPhone":"+1 404 490-1197‬","UserMobile":"+1 404 935 8702","CurrentDate":"26-Nov-2024","CurrentDateTime":"26-Nov-2024 11:57:46 -0500","SignTags":"{{#clientDate=Date1_es_:signer1:date:format(date,'mmm dd, yyyy HH:mm')}} {{#clientSign=Signature1_es_:signer1:signature:dimension(width=50mm, height=9mm)}} {{#clientName=Name1_es_:signer1:fullname}} {{#clientTitle=Ttl1_es_:signer1:title}} {{#clientCompany=Cmpy1_es_:signer1:company}} {{#clientInitials=Int1_es_:signer1:initials}} {{#clientAddress=Address1_es_:signer1:multiline(3):dimension(width=50mm)}} {{#senderDate=Date2_es_:signer2:date:format(date,'mmm dd, yyyy HH:mm')}} {{#senderSign=Signature2_es_:signer2:signature:dimension(width=50mm, height=9mm)}} {{#senderName=Name2_es_:signer2:fullname}} {{#senderTitle=Ttl2_es_:signer2:title}} {{#senderCompany=Cmpy2_es_:signer2:company}} {{#senderInitials=Int2_es_:signer2:initials}} {{#senderAddress=Address2_es_:signer2:multiline(3):dimension(width=50mm)}}","stackng__Segments__r":[{"stackng__From__c":"a015f00000DAeaVAAT","stackng__ToIATA__c":"ATL","stackng__To__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeYVAA1"},"stackng__LocalName__c":"Hartsfield–Jackson Atlanta International Airport","stackng__ShortName_formula__c":"KATL/ATL (Atlanta, GA)","Id":"a015f00000DAeYVAA1","Name":"KATL/ATL - Hartsfield–Jackson Atlanta International"},"stackng__ToCity__c":"Atlanta, GA","stackng__ArriveDay__c":"Fri","stackng__ArriveTimeLocal12H__c":"9:36am","stackng__CrewNotes__c":"","stackng__PaxCount__c":1,"stackng__renderBaggageDetails__c":false,"stackng__Model__r":{"attributes":{"type":"stackng__Model__c","url":"/services/data/v62.0/sobjects/stackng__Model__c/a0C5f000018n30LEAQ"},"stackng__BaggageCapacity__c":"","Id":"a0C5f000018n30LEAQ"},"stackng__OperatorName__c":"Jetflite OY","Name":"Leg 1","stackng__FromCodes__c":"KPDK/PDK","stackng__To__c":"a015f00000DAeYVAA1","stackng__FromIATA__c":"PDK","stackng__DepartTimeLocal__c":"09:00","stackng__EBT_formula__c":"0h 36m","stackng__LegNumber__c":1,"stackng__ArriveDateLocal_text__c":"15-Nov-2024","stackng__DepartTimeLocal12H__c":"9:00am","stackng__FlightNumber__c":"","stackng__renderPaxNotes__c":false,"stackng__ToCodes__c":"KATL/ATL","stackng__PassengerNotes__c":"","stackng__BaggageDetails__c":"","stackng__DepartDateLocal_text__c":"15-Nov-2024","stackng__DepartDay__c":"Fri","stackng__DepartureFBO__r":"","stackng__Model_formula__c":"Challenger 650","stackng__FromCity__c":"Atlanta, GA","stackng__renderCrewNotes__c":false,"stackng__PaxActual__c":0,"Id":"a0F5f000001WqTuEAK","stackng__Aircraft_formula__c":"OH-WIW","stackng__Model__c":"a0C5f000018n30LEAQ","stackng__From__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeaVAAT"},"stackng__LocalName__c":"DeKalb–Peachtree Airport","stackng__ShortName_formula__c":"KPDK/PDK (Atlanta, GA)","Id":"a015f00000DAeaVAAT","Name":"KPDK/PDK - DeKalb–Peachtree"},"stackng__ArrivalFBO__r":"","stackng__ArriveTimeLocal__c":"09:36","stackng__DepartTimeTBC__c":false,"index":1,"stackng__Pax__r":[],"stackng__SegmentServices__r":[]},{"stackng__From__c":"a015f00000DAeYVAA1","stackng__ToIATA__c":"VNY","stackng__To__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeTJAA1"},"stackng__LocalName__c":"Van Nuys Airport","stackng__ShortName_formula__c":"KVNY/VNY (Van Nuys, CA)","Id":"a015f00000DAeTJAA1","Name":"KVNY/VNY - Van Nuys"},"stackng__ToCity__c":"Van Nuys, CA","stackng__ArriveDay__c":"Fri","stackng__ArriveTimeLocal12H__c":"12:05pm","stackng__CrewNotes__c":"","stackng__PaxCount__c":3,"stackng__renderBaggageDetails__c":false,"stackng__Model__r":{"attributes":{"type":"stackng__Model__c","url":"/services/data/v62.0/sobjects/stackng__Model__c/a0C5f000018n30LEAQ"},"stackng__BaggageCapacity__c":"","Id":"a0C5f000018n30LEAQ"},"stackng__OperatorName__c":"Jetflite OY","Name":"Leg 2","stackng__FromCodes__c":"KATL/ATL","stackng__To__c":"a015f00000DAeTJAA1","stackng__FromIATA__c":"ATL","stackng__DepartTimeLocal__c":"11:00","stackng__EBT_formula__c":"4h 05m","stackng__LegNumber__c":2,"stackng__ArriveDateLocal_text__c":"15-Nov-2024","stackng__DepartTimeLocal12H__c":"11:00am","stackng__FlightNumber__c":"","stackng__renderPaxNotes__c":false,"stackng__ToCodes__c":"KVNY/VNY","stackng__PassengerNotes__c":"","stackng__BaggageDetails__c":"","stackng__DepartDateLocal_text__c":"15-Nov-2024","stackng__DepartDay__c":"Fri","stackng__DepartureFBO__r":"","stackng__Model_formula__c":"Challenger 650","stackng__FromCity__c":"Atlanta, GA","stackng__renderCrewNotes__c":false,"stackng__PaxActual__c":0,"Id":"a0F5f000001WqTvEAK","stackng__Aircraft_formula__c":"OH-WIW","stackng__Model__c":"a0C5f000018n30LEAQ","stackng__From__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeYVAA1"},"stackng__LocalName__c":"Hartsfield–Jackson Atlanta International Airport","stackng__ShortName_formula__c":"KATL/ATL (Atlanta, GA)","Id":"a015f00000DAeYVAA1","Name":"KATL/ATL - Hartsfield–Jackson Atlanta International"},"stackng__ArrivalFBO__r":"","stackng__ArriveTimeLocal__c":"12:05","stackng__DepartTimeTBC__c":false,"index":2,"stackng__Pax__r":[],"stackng__SegmentServices__r":[]},{"stackng__From__c":"a015f00000DAeTJAA1","stackng__ToIATA__c":"PDK","stackng__To__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeaVAAT"},"stackng__LocalName__c":"DeKalb–Peachtree Airport","stackng__ShortName_formula__c":"KPDK/PDK (Atlanta, GA)","Id":"a015f00000DAeaVAAT","Name":"KPDK/PDK - DeKalb–Peachtree"},"stackng__ToCity__c":"Atlanta, GA","stackng__ArriveDay__c":"Sun","stackng__ArriveTimeLocal12H__c":"7:35am","stackng__CrewNotes__c":"","stackng__PaxCount__c":3,"stackng__renderBaggageDetails__c":false,"stackng__Model__r":{"attributes":{"type":"stackng__Model__c","url":"/services/data/v62.0/sobjects/stackng__Model__c/a0C5f000018n30LEAQ"},"stackng__BaggageCapacity__c":"","Id":"a0C5f000018n30LEAQ"},"stackng__OperatorName__c":"Jetflite OY","Name":"Leg 3","stackng__FromCodes__c":"KVNY/VNY","stackng__To__c":"a015f00000DAeaVAAT","stackng__FromIATA__c":"VNY","stackng__DepartTimeLocal__c":"01:15","stackng__EBT_formula__c":"3h 20m","stackng__LegNumber__c":3,"stackng__ArriveDateLocal_text__c":"17-Nov-2024","stackng__DepartTimeLocal12H__c":"1:15am","stackng__FlightNumber__c":"","stackng__renderPaxNotes__c":false,"stackng__ToCodes__c":"KPDK/PDK","stackng__PassengerNotes__c":"","stackng__BaggageDetails__c":"","stackng__DepartDateLocal_text__c":"17-Nov-2024","stackng__DepartDay__c":"Sun","stackng__DepartureFBO__r":"","stackng__Model_formula__c":"Challenger 650","stackng__FromCity__c":"Van Nuys, CA","stackng__renderCrewNotes__c":false,"stackng__PaxActual__c":0,"Id":"a0F5f000001WqTwEAK","stackng__Aircraft_formula__c":"OH-WIW","stackng__Model__c":"a0C5f000018n30LEAQ","stackng__From__r":{"attributes":{"type":"stackng__Airport__c","url":"/services/data/v62.0/sobjects/stackng__Airport__c/a015f00000DAeTJAA1"},"stackng__LocalName__c":"Van Nuys Airport","stackng__ShortName_formula__c":"KVNY/VNY (Van Nuys, CA)","Id":"a015f00000DAeTJAA1","Name":"KVNY/VNY - Van Nuys"},"stackng__ArrivalFBO__r":"","stackng__ArriveTimeLocal__c":"07:35","stackng__DepartTimeTBC__c":false,"index":3,"stackng__Pax__r":[],"stackng__SegmentServices__r":[]}],"stackng__Contacts__r":[]}

 

For the attached templates:

- 400_EX_FlightBrief_A4.docx > This is a complex structure;  However, earlier versions (not edited in a few months) work;

- stackng.docx > this only uses a single merge field from the JSON but still fails

- stack-flightbrief-long-map.docx > this is a template that works in the API (docx upload date 18 Oct 2024)

- FLight Brief Long.pdf > result of stack-flightbrief-long-map returned by API

 

Hope this helps narrow down the issue.

Known Participant
November 26, 2024

Hi Group!

I am also getting the same error as of Monday this week. My last Word auto-update was Nov 11 and issue started Nov 25. MacOS. The Word plug-in produce the same error as in the screenshot in the original post. When I run the process through the API in the Document Generation module of the application our company develops and supports for our customers I get the attached error saying the document is corrupt. I have tried multiple different templates with different complexity levels, and even a completely blank document, and one with a single merge field. All same result. There are no Word updates pending at the moment, I will try and reinstall the plug-in but I suspect it's not going to work as the error is also thrown by the API generation call from the embedded app. Any ideas on what to troubleshoot next?

Raymond Camden
Community Manager
Community Manager
November 26, 2024

If you get the error in the Word Add-In and via the API, it may be a network block on your side perhaps? I just tested and the API is working fine for me. 

cfjedimaster
Inspiring
November 1, 2022

Are you still getting this error now? Can you share the Word doc?

Participant
November 1, 2022

Hi, 

its a standard word file and please find below the steps on the document generation using the json. As shared, if I use the first object in the json, there is no error but when the complete json is used, the server error appear. Wondering if there is any issue in the json schema 

 

 

 

 

Thanks

 

Participant
November 3, 2022

As an aside, I can confirm now that our API does *not* support Arrays as a top level object, only, well, objects (key value pairs), you can obviously have arrays underneath that. Our Word Add-In is just checking for valid JSON. 

 

So we need to edit the docs, _and_ the Word Add-In. 

 

To be clear, you can't just take your *existing* array and put it in an object, you need to make Properties itself an array.


Hi Raymond

 

Below is the data source in excel and I'm using power automate to generate the json. I would greatly appreciate if you could provide a the json schema for the table below. Please note the properties are associated with an Owner i.e OwnerID. An Owner can have more than 1 property

 

Excel Data:

OwnerIDPropertyIDProperty AddressRentBedroom
L001P00112 St LA3002
L001P0023 St SA4503
L002P0034 St SA5004
L003P00420 St LA4002

 

Thanks

Jag