Create workflow template for entire table

I need help with what I’m doing wrong. I have a report right now that sets a “status” column to “run” when I hit an action. that triggers a workflow to email a document. I copied that whole thing and am now attempting to change the attachment template to email every row in the table. So far, the emailing only works when no start expression is added. I tried following the documentation and tried this: <Start:C19[Unique_ID]> with no luck. What is the correct expression to use to export the entire table?

Firstly read this:

And yet, please do clarify:

1 Like

Hi there, sorry for the long post.
I read the documentation and tried searching through the community questions before asking.

  • This is an email workflow rule
  • The audit log shows “Success” with nothing wrong in the details, yet I’m still not getting an email or anything archived.
  • <<Start:C19[Unique_ID]>> and << End>> (without the space there.)
  • Yes, I checked those before posting and just right now. Unfortunately, they didn’t solve my problem :frowning:

Can you post a screenshot from your PDF template? Provided you haven’t specified any template variables in between the <<Start>> and <<End>> it’s so normal that you don’t receive anything. Also please post a screenshot from your worfklow setup. Thnx.

1 Like

Alright, I stripped my template down and slowly added stuff back in to see what was causing the issue. Now the

  • The Start and end functions work. (The workflow emails to me.)
  • With different Start and end functions, the whole template works.
  • It stops working when I make a reference. (see photo. Red shows the problem area)
  • I now get the following error on the log:
    Error:
    “Jeenee.DataTypes.SpreadsheetException: The remote server returned an error: (400) Bad Request. → The HTML to PDF conversion web service failed to convert the HTML document to PDF for application ‘PaulusApp-770529 (f59e0b87-e262-4bdc-8856-3f003dbd1dc9)’ despite 3 retries due to: The remote server returned an error: (400) Bad Request. —> System.Net.WebException: The remote server returned an error: (400) Bad Request.\r\n at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)\r\n at Nirvana.Data.PDFEncoder.EncodePdfRocket(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n — End of inner exception stack trace —\r\n at Nirvana.Data.PDFEncoder.EncodePdfRocket(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n at Nirvana.Data.PDFEncoder.Encode(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n at Nirvana.Data.WorkflowActionResultEmail.<>c__DisplayClass68_0.b__0()”

@Austin_Nunns

1 Like

Unfortunately, that just returned the same error:

Error:
“Jeenee.DataTypes.SpreadsheetException: An exception occurred during a WebClient request. → The HTML to PDF conversion web service failed to convert the HTML document to PDF for application ‘PaulusApp-770529 (f59e0b87-e262-4bdc-8856-3f003dbd1dc9)’ despite 3 retries due to: An exception occurred during a WebClient request. —> System.Net.WebException: An exception occurred during a WebClient request. —> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. —> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host\r\n at System.Net.Sockets.NetworkStream.Read(Byte buffer, Int32 offset, Int32 size)\r\n — End of inner exception stack trace —\r\n at System.Net.ConnectStream.Read(Byte buffer, Int32 offset, Int32 size)\r\n at System.Net.WebClient.DownloadBitsState.RetrieveBytes(Int32& bytesRetrieved)\r\n at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream, CompletionDelegate completionDelegate, AsyncOperation asyncOp)\r\n at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)\r\n — End of inner exception stack trace —\r\n at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)\r\n at Nirvana.Data.PDFEncoder.EncodePdfRocket(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n — End of inner exception stack trace —\r\n at Nirvana.Data.PDFEncoder.EncodePdfRocket(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n at Nirvana.Data.PDFEncoder.Encode(Context context, String input, PageOrientationEnum pageOrientation, PageSizeEnum pageSize, Int32 pageHeight, Int32 pageWidth)\r\n at Nirvana.Data.WorkflowActionResultEmail.<>c__DisplayClass68_0.b__0()”

I want to say that that error comes up when the template file is not shared with the proper account. Try to make it publicly viewable and see if it changes. I could be completely wrong though…

But regardless, that error doesn’t tell us much. There should be an error somewhere else that’ll actually say what the issue it. Like:

“Errors”: “Error: Workflow rule ‘longtext test’ action ‘Action 1’ Attachment template. Expression ‘[blah blah]’ is invalid due to: Unable to find column ‘blah blah’. Error: Workflow rule ‘longtext test’ action ‘Action 1’ Attachment template. Start expression ‘[blah blah]’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table. Error: Workflow rule ‘longtext test’ action ‘Action 1’ Body template. Expression ‘[blah blah]’ is invalid due to: Unable to find column ‘blah blah’. Error: Workflow rule ‘longtext test’ action ‘Action 1’ Body template. Start expression ‘[blah blah]’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.”,

Which I got from here:


image

You can also try to use the “Test” button on the workflow, then “Send” on one record from the following screen, and if there is any error in the template it should show a pop-up with the error.

2 Likes

@Austin_Nunns
May I ask where your workflow template doc is? Under your own account (which the app is currently)?

1 Like