Skip to content

Liquid Transform JSON to Text Fails Silently w/ Good JSON & MapΒ #1319

@ckemmann

Description

@ckemmann

Describe the Bug with repro steps

When passing valid JSON and a good .liquid map into a Transform JSON to Text action, the output does not contain any of the passed JSON.

  1. Create a new integration account & resource group.
  2. Create a new liquid template with the following: Hello from Liquid! {{ Hello }} and save as .liquid file.
  3. Create a new liquid map and upload your .liquid file.
  4. Create a new consumption plan logic app using the integration account you previously created.
  5. Add a trigger of your choice <-- does not matter for this issue, but I'm using "When a HTTP request is received".
  6. Add a compose action with input { "Hello": "World" }.
  7. Add a Transform JSON to Text action using the compose action output. Should be like "content": "@outputs('Compose')".
  8. Run the app.

Expected Result:

The app's Transform JSON to Text action should return the following:

Hello from Liquid! World

*This can be confirmed by testing the JSON and .liquid template created in step 2 in the liquidjs.com playground

Actual Result:

The Transform JSON to Text returns the template's static text, but not the JSON.

Hello from Liquid!

Checked the repo for Liquid and couldn't find anything similar. Checked issues and couldn't find anything there either. As far as I know, this issue hasn't been reported yet.

What type of Logic App Is this happening in?

Consumption (Portal)

Which operating system are you using?

Windows

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

Yes

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "contentVersion": "1.0.0.0",
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "type": "Request",
                "kind": "Http"
            }
        },
        "actions": {
            "Compose": {
                "type": "Compose",
                "inputs": {
                    "Hello": "World"
                },
                "runAfter": {}
            },
            "Transform_JSON_To_TEXT": {
                "type": "Liquid",
                "kind": "JsonToText",
                "inputs": {
                    "content": "@outputs('Compose')",
                    "integrationAccount": {
                        "map": {
                            "name": "SPS-TEST-MAP"
                        }
                    }
                },
                "runAfter": {
                    "Compose": [
                        "Succeeded"
                    ]
                }
            }
        },
        "outputs": {},
        "parameters": {
            "$connections": {
                "type": "Object",
                "defaultValue": {}
            }
        }
    },
    "parameters": {
        "$connections": {
            "type": "Object",
            "value": {}
        }
    }
}

Screenshots or Videos

No response

Browser

Edge Version 134.0.3124.72

Additional context

I had an exhaustive conversation with ChatGPT's o3-mini-high, where it suggested all kinds of things like wrap the {{ Hello }} with document like {{ document | Hello }}, use a Parse JSON action, change the way I was referencing the "content", force-declare @json for the content, etc. This test app is a duplicate and simplified of another app I'm using for a project, which is what is referenced in the GPT conversation. I can share that conversation if needed, but it contains possibly sensitive company information. The function of the Compose and Transform steps are nearly identical between this test app and that app, except that in the project app both actions are inside a for-each loop and the compose JSON is the item in an array that the for-each loop is iterating through, whereas this test app was stripped of that to eliminate that as a possible culprit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions