I have a flow on Power Automate. It will post a json-string to my azure function. How can i write this json to a json file in blobs storage using Azure Data Factory or only Azure Function ?
1 Answer
Below is a sample where you can save JSON through the azure function. For example, Considering this to be my workflow

I am using HTTP trigger in my case and sending the JSON sample to my function app which has output binding as blob storage and My Http function App looks like this:-
init.py
from http.client import HTTPResponse
import logging
import azure.functions as func
def main(req: func.HttpRequest,outputblob: func.Out[str]) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')
print(str(req.get_json()))
outputblob.set(str(req.get_json()))
function.json
{
"scriptFile": "__init__.py",
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get",
"post"
]
},
{
"name": "outputblob",
"type": "blob",
"path": "outputcontainer/sample.json",
"connection": "AzureWebJobsStorage",
"direction": "out"
}
]
}

RESULT :
In power Automate

In function app

In Storage Account
