Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get File Content behavior is different in new designer #5688

Open
tjohnson1010 opened this issue Sep 16, 2024 · 3 comments
Open

Get File Content behavior is different in new designer #5688

tjohnson1010 opened this issue Sep 16, 2024 · 3 comments

Comments

@tjohnson1010
Copy link

tjohnson1010 commented Sep 16, 2024

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
Copy link
Author

tjohnson1010 commented Sep 17, 2024

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
Copy link
Contributor

takyyon commented Sep 18, 2024

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

@tjohnson1010
Copy link
Author

workflow.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants