Passing File type at Azure Logic App HTTP Post Request

Mohamed Hussein 710 Reputation points
2024-12-03T18:30:05.73+00:00

Hello,

I'm trying to send .ogg voice file to whisper through Azure Logic App

Whisper API does not accept file URL

I've the file at blob storage dowloaded from Meta (WhatsApp Business API)

tried to follow steps here, but did not work

https://learn.microsoft.com/en-us/azure/connectors/connectors-native-http?tabs=standard#content-with-multipartform-data-type

Appreciate your support

    "body": {
      "$content-type": "multipart/form-data",
      "$multipart": [
        {
          "body": "@{body('DownloadVoiceMedia')}",
          "headers": {
            "Content-Disposition": "form-data; name=file; filename=voicecommand.ogg"
          }
        }
      ]
    }
  },
  "runAfter": {
    "GetMediaVoicePublicURL": [
      "SUCCEEDED"
    ]
  },
  "runtimeConfiguration": {
    "contentTransfer": {
      "transferMode": "Chunked"
    }
  }
}

] }

User's image

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,546 questions
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 17,766 Reputation points Moderator
    2024-12-03T23:35:52.34+00:00

    Hi @Mohamed Hussein

    Can you try with the below request body and see if this helps

    "body": {
                            "$content-type": "multipart/form-data",
                            "$multipart": [
                                {
                                    "headers": {
                                        "Content-Disposition": "form-data; name=file; filename=filename.ogg",
                                        "Content-Type": "audio/ogg"
                                    },
                                    "body": {
                                        "$content-type": "audio/ogg",
                                        "$content": "@{base64(body('DownloadVoiceMedia'))}"
                                    }
                                }
                            ]
                        }
    
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.