0

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 1

1

Below is a sample where you can save JSON through the azure function. For example, Considering this to be my workflow

enter image description here

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"
    }
  ]
}

enter image description here

RESULT :

In power Automate

enter image description here

In function app

enter image description here

In Storage Account

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.