Niklas
Niklas

Reputation: 13145

Azure Logic app with Google Cloud Storage connection

It was pretty straight forward setting up a connection to Google Drive since there was options for it in the Logic App Designer. But I can't find any similar options for connecting to Google Cloud Storage.

Am I missing something or do I have to go with a Function App in Azure and write my own code for connecting to GCP?

"actions": {
  "Create_file": {
    "type": "ApiConnection",
    "inputs": {
      "host": {
        "connection": {
          "name": "@parameters('$connections')['googledrive']['connectionId']"
        }
      },
      "method": "post",
      "body": "@body('Get_blob_content_using_path')",
      "path": "/datasets/default/files",
      "queries": {
        "folderPath": "/GcpExportTest",
        "name": "@triggerBody()?['Name']",
        "queryParametersSingleEncoded": true
      }
    }
  }
}

...

"parameters": {
  "$connections": {
    "value": {
      "googledrive": {
        "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'googledrive')]",
        "connectionId": "[resourceId('Microsoft.Web/connections', parameters('googledrive_1_Connection_Name'))]",
        "connectionName": "[parameters('googledrive_1_Connection_Name')]"
      }
    }
  }
}

Upvotes: 0

Views: 1931

Answers (1)

Mike Urnun MSFT
Mike Urnun MSFT

Reputation: 478

As of this writing, there isn't a built-in connector in Logic Apps yet for interacting with Google Cloud Services specifically, however, because Logic Apps is great with anything RESTful and Google Cloud Storage does provide REST API, there are multiple ways you can go about to accomplish what you want, and using Azure Functions is definitely one of them.

Alternatively, if your desired workflow is something simple and you'd rather work in the LA designer view like you did with Google Drive connector, you have HTTP connector in Logic Apps at your disposal too: you would include the authentication bearer token in your request and call the specific Google Storage endpoint that executes the desired task (get, list, delete etc..) against bucket/object.

Upvotes: 3

Related Questions