Skip to main content
Nintex Community Menu Bar

Hello,

I get the following error The specified value is unknown. Error Code: TypeCasting.UnknownCasting] when calling a xtension which should return an ics file.

The xtension is a .net core api and nintex does recognize the specified result type as file.

The responses part of the definitions looks like this:

"responses": {

               "200": {

                  "description": "OK",

                  "schema": {

                     "type": "object",

                     "properties": {

                        "file": {

                           "type": "string",

                           "format": "byte"

                        }

                     }

                  }

               }

            }

I tried it according to OpenAPI Specification quick reference and Download base64 files but they differ on the properties part “file” <> “content”. But both ways dont work.

But when calling the xtension i get this error.

Is there anything, that I am missing?

Thank you in advance!

Niklas

I think i got a bit further now.

I am now returning a base64 string from my api an not a filecontentresult.

I am creating the string like this: "data:text/calendar;base64," + Convert.ToBase64String(myBytes)

Now the workflows successfully calls the xtension, but when i try to send the received attachment via mail, i get the error “WorkflowExecution.Runtime.Internal] The workflow failed unexpectedly.”

The received object is structured like this:

When i send the objICSFile the mail successfully sends, but without any attachments, and when i send the Content the mail runs into the error above.


Hi ​@NiklasG,

I was recently playing with the Nintex API and exporting workflows.
I found that configuring my response as per the below put the file into a file variable, which I could then use downstream in the workflow.
Maybe this might work for you.
 

                "responses": {
"200": {
"description": "Successful download",
"schema": {
"type": "file"
}
},


 


Hi ​@NiklasG have you solved this error?


Reply