Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
74 stars 81 forks source link

Get File Content behavior is different in new designer #5688

Open tjohnson1010 opened 3 days ago

tjohnson1010 commented 3 days ago

Describe the Bug with repro steps

The new Logic App designer saves to code body('Get_file_content') differently, which at run-time, causes it to behave incorrectly.

Steps to reproduce:

1) Add a "Get file content" action from an Azure File Storage to a Logic App.

2) Add a call to another Logic App passing the File Contents of the action from step 1 using the property from the Designer.

3) Run the Logic App.

In My Case the file was an XML document.

In the new Designer you will get JSON of the file's octet:

{

"$content-type": "application/octet-stream",

"$content": "PFdNV1J…"

},

In the Legacy Designer you will get the actual content of the file:

"<WMWROOT,.,"

What the new Designer saves as code:

"@body('Get_file_content')"

What the Legacy Designer saves as code:

"@{body('Get_file_content')}"

The only difference was that the LEGACY Designer wrapped the function with curly braces. To test this, I manually added and removed the braces in code and the behavior did change at run-time.

I prefer the Legacy behavior, in that if the consumer expects a string, it works as expected. With the new Designer I would need to either use a Parse Json action or several functions, Json and base64ToString of a property of the body to get the string representation of the content.

What type of Logic App Is this happening in?

Consumption (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

No response

Screenshots or Videos

No response

Browser

Microsoft Edge for Business

Version 128.0.2739.79 (Official build) (64-bit)

Additional context

No response

tjohnson1010 commented 2 days ago

I've seen the results fail when using the content as a parameter when calling another Logic App. It seems many of the connectors that are file based will work correctly with either result.

takyyon commented 1 day ago

@tjohnson1010 Can you please share the workflow.json you are using?

tjohnson1010 commented 16 hours ago

workflow.json