Basically I have a very simple workflow that is supposed to be triggered by when I receiver a certain e-mail in my outlook, that then converts the e-mail to a PDF and updates it to a sharepoint file library.
I have done this workflow before with other e-mails and it has worked fine. Attached are screen shots. I have tried two things one where I specify the file’s extension as .html and another one as a .eml. Both yield errors.
When I specify HTML the workflow runs for a while. And then gives me this error: Error 502 Gateway:
{
"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-northcentralus-01.azure-apim.net",
"clientRequestId": "722875f0-b6ea-4d77-b3df-d2695ab6b2bd",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "IndexOutOfRangeException: Index was outside the bounds of the array.\nInnerExceptionMessage: \nStackTrace: at System.String.get_Chars(Int32 index)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.CssParser.ParseFontFamilyProperty(String propValue)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.CssParser.ParseFontFamily(String value)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.TranslateAttributes(HtmlTag tag, CssBox box)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.CascadeApplyStyles(CssBox box, CssData cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.Parse.DomParser.GenerateCssTree(String html, HtmlContainerInt htmlContainer, CssData& cssData)\r\n at TheArtOfDev.HtmlRenderer.Core.HtmlContainerInt.SetHtml(String htmlSource, CssData baseCssData)\r\n at TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.AddPdfPages(PdfDocument document, String html, PdfGenerateConfig config, CssData cssData, EventHandler`1 stylesheetLoad, EventHandler`1 imageLoad)\r\n at TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(String html, PageSize pageSize, Int32 margin, CssData cssData, EventHandler`1 stylesheetLoad, EventHandler`1 imageLoad)\r\n at OneDrive.Media.Transforms.Rasterizers.HtmlToPdfConverter.<>c__DisplayClass12_1.<GenerateStream>b__1() in C:\\source\\Transforms\\PdfConverters\\HtmlToPdfConverter.cs:line 83\r\n at OneDrive.Media.Utilities.MemoryStreamHelper.ExecuteAndDisposeStreamIfErrorOccurs(Stream outputStream, Action method) in C:\\source\\Utilities\\MemoryStreamHelper.cs:line 62\r\n at OneDrive.Media.Transforms.Rasterizers.HtmlToPdfConverter.<>c__DisplayClass12_0.<GenerateStream>b__0() in C:\\source\\Transforms\\PdfConverters\\HtmlToPdfConverter.cs:line 101\r\n at OneDrive.Media.Transforms.Rasterizers.HtmlRasterizer.ExecuteMethod(Func`1 method) in C:\\source\\Transforms\\Rasterizers\\HtmlRasterizer.cs:line 110\r\n at OneDrive.Media.Transforms.Rasterizers.HtmlToPdfConverter.<GeneratePdfAsync>d__11.MoveNext() in C:\\source\\Transforms\\PdfConverters\\HtmlToPdfConverter.cs:line 58\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OneDrive.Media.Utilities.Sandbox.SandboxService.<RunRequestAsync>d__1.MoveNext() in C:\\source\\Sandbox\\SandboxService.cs:line 85\n ThrowSite: ",
"source": "api.connectorp.svc.ms"
}
}
}
When I specify it as a .eml it errors at the same step with a different error: Conversion of this file to PDF is not supported. (Sandbox_BadArgument_Argument / Invalid destination page in call to CreateDocumentLink: page number is one-based and must be 1 or higher.)
Screenshots of flow
1
2
3