question

ThomasCOUILLEAUX-3251 avatar image
0 Votes"
ThomasCOUILLEAUX-3251 asked ·

Can't load action type "JavaScriptCode in Logic Apps.

Hello Logic Apps helpers,

After following the documentation:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-add-run-inline-code
I created a free integration account and add this action to my logic app:

 "actions": {

     "Execute_JavaScript_Code": {

         "inputs": {

             "code": "var text = \"Hello world from \" + workflowContext.workflow.name;\r\n\r\nreturn text;"

         },

         "runAfter": {

             "Parse_JSON": [

                 "Succeeded"

             ]

         },

         "type": "JavaScriptCode"

     },

Visual studio code return this issue:

The type of the flow operation.

Value is not accepted. Valid values: "ApiConnection", "ApiConnectionWebhook", "ApiManagement", "AppendToArrayVariable", "AppendToStringVariable", "Batch", "Compose", "DecrementVariable", "Expression", "FlatFileDecoding", "FlatFileEncoding", "Foreach", "Function", "Http", "HttpWebhook", "If", "IncrementVariable", "InitializeVariable", "IntegrationAccountArtifactLookup", "Join", "Liquid", "ParseJson", "Query", "Recurrence", "Request", "Response", "Scope", "Select", "SendToBatch", "SetVariable", "SlidingWindow", "Switch", "Table", "Terminate", "Until", "Wait", "Workflow", "XmlValidation", "Xslt".(1)

Did you know if the JavaScriptCode type is still available ?

Is there some requirements i dismissed ?

THX in Advanced

azure-logic-apps
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LarsMaertins avatar image
0 Votes"
LarsMaertins answered ·

Hi,

is it possible that you didn't link the integration account to the logic app as described in:

Link to logic app

I encountered that it's not possible to save the logic app using the online code editor if I add a JavaScript Code and the integration account isn't linked. Maybe this is why it's displayed as an invalid type.

But perhaps JavaScript Code isn't available for the VS Code Plugin yet or yours is outdated, because it's still in Preview mode in the online Logic Apps Designer.

You should try to use the online Designer for once and I'll test it with VS Code later today.
Let me know if something helped or if you found the problem.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ThomasCOUILLEAUX-3251, Just checking in to see if the above post helped answer your question. Kindly let us know if you have any further questions on this specific topic, we would be more than happy to assist you. Please do mark the post which was helpful by clicking on ‘Accept Answer’ & ‘Up-Vote’ to help the community find the right answers.

Having mentioned that, Azure Logic Apps service is yet to be migrated to Q&A. Please post/continue your question on the MSDN forum for the service (Azure Logic Apps forum) to receive inputs from the targeted audience.

We are actively working to onboard all services. We will make a public announcement once complete.

Thank you for your patience as we evolve the Q&A platform.


0 Votes 0 ·
ThomasCOUILLEAUX-3251 avatar image
0 Votes"
ThomasCOUILLEAUX-3251 answered ·

Thx to your reply,

The integration account is linked with the logic app:

alt text


I have the same issue with the web designer:

alt text

The error message in webdesigner is not correct, when i checked in vscode i have the same error but i can see the Javascript flow operation is not enabled:

alt text



·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.