I’m using a Power Automate flow to translate the CanvasContent1 of a SharePoint page via the API call _api/web/lists/GetByTitle('Site%20Pages')/items(52)/CanvasContent1
. After extracting the content, I parse it as JSON and translate it into another language using the "Translate Text" action. I can see the translation works fine
While attempting to save the translated content back as a draft, the flow often fails with a "Bad Gateway" error, and the process takes hours before timing out.
Questions:
Any insights or recommendations to streamline this process would be greatly appreciated.
Thanks in advance for your assistance!
Scheme I'm using in my parse.json
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"d": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"CanvasContent1": {
"type": "object",
"properties": {
"type": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
{
"statusCode": 200,
"headers": {
"Cache-Control": "no-cache",
"Vary": "Accept-Encoding",
"Set-Cookie": "ARRAffinity=9773387b6e0d4bc7a1e310d8e03534321ec431ccd30b0d4a097e9e1a610d81ce15134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DD2BCF76A60C291953144650; path=/; secure; HttpOnly,ReqClientId=06d2513a-e323-4a2b-be89-a194d5a82825; expires=Thu, 03-Jan-2075 07:50:20 GMT; path=/; secure; HttpOnly,ARRAffinity=9773387b6e0d4bc7a1e310d8e03534321ec431ccd30b0d4a097e9e1a610d81ce15134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DD2BCF76A60C291953144650; path=/; secure; HttpOnly",
"x-ms-service-request-id": "ba9c1577-9196-47cf-8b9d-f480fc7a1988",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"REQ_ID": "ba9c1577-9196-47cf-8b9d-f480fc7a1988",
"CRM.ServiceId": "CRMAppPool",
"AuthActivityId": "ff4bbd50-f8f6-413d-af6b-940e622f6b2b",
"x-ms-dop-hint": "4",
"x-ms-ratelimit-time-remaining-xrm-requests": "1,198.22",
"x-ms-ratelimit-burst-remaining-xrm-requests": "7994",
"mise-correlation-id": "49ad98ad-3a38-43b7-82e6-79cb009c9f6e",
"OData-Version": "4.0",
"X-Source": "24070241821391092020317924823935187452361649719721713412117203175166211219211101181224182,4924571311064814124416105617917515711424815097103208436220514707517273204771817",
"Public": "OPTIONS,GET,HEAD,POST",
"Date": "Fri, 03 Jan 2025 07:50:21 GMT",
"Allow": "OPTIONS,GET,HEAD,POST",
"Content-Type": "application/json; odata.metadata=minimal",
"Content-Length": "6040",
"Expires": "-1"
},
"body": {
"@odata.context": "https://org4640923e.crm4.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.PredictResponse",
"responsev2": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"operationStatus": "Success",
"predictionId": "ce66a32f-f6e2-4b25-bbc0-bfe1d4a929d1",
"predictionOutput": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "{"d » :{"CanvasContent1 » :"<div><div data-sp-canvascontrol=\\"\\ » data-sp-canvasdataversion=\\"1.0\\ » data-sp-controldata=\\"{"id » :"8e21c4ab-d7e2-4f69-ac2e-8d8ba406ad72 »,"controlType » :3,"position » :{"layoutIndex » :1,"zoneIndex » :0.5,"sectionIndex » :1,"controlIndex » :1,"sectionFactor » :0,"zoneId » : » bcbd0b5b-f899-4314-89a8-d1bdc62d7c51"},"webPartId » :"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788 »,"addedFromPersistedData » :true,"reservedHeight » :228,"reservedWidth » :968}\\"><div data-sp-webpart=\\"\\ » data-sp-webpartdataversion=\\"1.6\\ » data-sp-webpartdata=\\"{"id » :"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788 »,"instanceId » : » 8e21c4ab-d7e2-4f69-ac2e-8d8ba406ad72 »,"title » :"Bannière »,"description » :"Afficher une bannière avec le titre et les informations sur l’auteur »,"audiences » :[],"serverProcessedContent » :{"htmlStrings » :{},"searchablePlainTexts » :{},"imageSources » :{"imageSource » :"https://cdn.hubblecontent.osi.office. net/m365content/publish/2cb5584a-d96c-451c-96cb-c429e16d2a9d/186678901.jpg"},"links » :{},"customMetadata » :{"imageSource » :{"width » :3390,"height » :2260}}},"dataVersion » :"1.6 »,"properties » :{"imageSourceType » :2,"title » :"L’allocation de vélo est mise à jour », « textAlignment » :"Gauche »,"showPublishDate » :true,"authors » :[{"id » :"i :0#.f|membership|anouck@anfisolutions.be" »,"upn » :"anouck@anfisolutions.be »,"email » :"anouck@anfisolutions.be" »,"name » :"Anouck Fierens »,"role » :""}], « showTopicHeader » :false,"authorByline » :["i :0#.f|membership|anouck@anfisolutions.be"],"layoutType » :"FullWidthImage »,"topicHeader » :" »,"enableGradientEffect » :true,"isDecorative » :true,"imgHeight » :2260,"imgWidth » :3390},"containsDynamicDataSource » :false}\\"><div data-sp-componentid=\\"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\\"></div><div data-sp-htmlproperties=\\"\\"><img data-sp-prop-name=\\"imageSource\\ » src=\\"https://cdn.hubblecontent.osi.office.net/m365content/publish/2cb5584a-d96c-451c-96cb-c429e16d2a9d/186678901.jpg\\ » data-sp-cust-width=\\"3390\\ » data-sp-cust-height=\\"2260\\ » /></div></div></div><div data-sp-canvascontrol=\\"\\ » data-sp-canvasdataversion=\\"1.0\\ » data-sp-controldata=\\"{ » controlType » :4,"id » :"1212fc8d-dd6b-408a-8d5d-9f1cc787efbb »,"position » :{"controlIndex » :2,"sectionIndex » :1,"sectionFactor » :12,"zoneIndex » :1,"layoutIndex » :1,"zoneId » :"69398f3c-2220-4901-b4ff-5c9f1506b379"},"addedFromPersistedData » :true}\\"><div data-sp-rte=\\"\\"><p style=\\"margin-left :0in ;\\">Nous essayons d’avoir de plus en plus d’employés sur leurs vélos et nous avons de bonnes nouvelles à annoncer. L’indemnité vélo passera de 0,23 centime d’euro le kilomètre à 0,25 centime d’euro le kilomètre. Cela peut sembler une augmentation limitée, mais ceux qui se rendent au travail à vélo tous les jours remarqueront rapidement la différence sur leur fiche de paie. Continuez à faire du vélo !</p></div></div><div data-sp-canvascontrol=\\"\\ » data-sp-canvasdataversion=\\"1.0\\ » data-sp-controldata=\\"{"controlType » :0,"pageSettingsSlice » :{"isDefaultDescription » :false,"isDefaultThumbnail » :false,"isSpellCheckEnabled » :true,"globalRichTextStylingVersion » :1,"rtePageSettings » :{"contentVersion » :5,"indentationVersion » :2}, « isEmailReady » :false},"htmlAttributes » :["modifiedDescription"]}\\ » data-sp-meta-modifiedDescription=\\"\\"></div></div>"}}"
}
}
}
}
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional