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

Logic Apps Azure Datalake "Read File" fails with "BadGateway" but no place to specify #6235

Open
BobWarren opened this issue Dec 9, 2024 · 0 comments

Comments

@BobWarren
Copy link

BobWarren commented Dec 9, 2024

Describe the Bug with repro steps

Existing Azure Logic App for send Email. Added step to "Read File" from filename parameter from our Azure Datalake gen2 storage and attach. Every test gets "BadGateway" response. However, there is nowhere I can find to specify a gateway?

What type of Logic App Is this happening in?

Standard (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#",
        "actions": {
            "Send_an_email_(V2)": {
                "type": "ApiConnection",
                "inputs": {
                    "host": {
                        "connection": {
                            "referenceName": "office365-1"
                        }
                    },
                    "method": "post",
                    "body": {
                        "To": "@triggerBody()?['recipients']",
                        "Subject": "@triggerBody()?['subject']",
                        "Body": "<table style=\"width:100%;\">\n        <tbody><tr>\n            <td style=\"width:150px;\">\n\n            </td>\n            <td style=\"padding-right:auto;\">\n                <p style=\"font-family:Arial,Helvetica,sans-serif;font-size:2.5rem;font-weight:bold;\">\n                    @{triggerBody()?['title']}\n                </p>\n            </td>\n        </tr>\n    </tbody></table>\n    <hr style=\"height:0.5rem;color:#FFB91D;\">\n@{triggerBody()?['body']}",
                        "Cc": "@triggerBody()?['cc']",
                        "Bcc": "@triggerBody()?['bcc']",
                        "Attachments": [
                            {
                                "Name": "@lastIndexOf(triggerBody()?['attachment'],'/')",
                                "ContentBytes": "@base64(body('Read_File'))"
                            }
                        ],
                        "ReplyTo": "@triggerBody()?['replyTo']",
                        "Importance": "Normal"
                    },
                    "path": "/v2/Mail"
                },
                "runAfter": {
                    "Read_File": [
                        "SUCCEEDED"
                    ]
                }
            },
            "Read_File": {
                "type": "ApiConnection",
                "inputs": {
                    "host": {
                        "connection": {
                            "referenceName": "azuredatalake"
                        }
                    },
                    "method": "get",
                    "path": "/webhdfs/v1/@{encodeURIComponent(triggerBody()?['attachment'])}",
                    "queries": {
                        "account": "NNN_ACCOUNT_NNN",
                        "op": "OPEN",
                        "read": "true"
                    }
                },
                "runAfter": {}
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "type": "Request",
                "kind": "Http",
                "inputs": {
                    "method": "POST",
                    "schema": {
                        "properties": {
                            "bcc": {
                                "required": false,
                                "type": "string"
                            },
                            "body": {
                                "required": true,
                                "type": "string"
                            },
                            "cc": {
                                "required": false,
                                "type": "string"
                            },
                            "recipients": {
                                "required": true,
                                "type": "string"
                            },
                            "replyTo": {
                                "default": "NNNNNN",
                                "required": false,
                                "type": "string"
                            },
                            "subject": {
                                "required": true,
                                "type": "string"
                            },
                            "title": {
                                "default": "Notification",
                                "required": false,
                                "type": "string"
                            },
                            "attachment": {
                                "required": true,
                                "type": "string"
                            }
                        },
                        "type": "object"
                    }
                }
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

No response

Browser

Edge

Additional context

No response

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

No branches or pull requests

1 participant