here is my code view
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Append_to_array_variable": {
"inputs": {
"name": "attachment",
"value": {
"ContentBytes": "@{base64(body('Get_blob_content_(V2)'))}",
"Name": "@{substring(items('For_each'), add(lastIndexOf(items('For_each'),'/'), 1), sub(sub(length(items('For_each')),1), lastIndexOf(items('For_each'),'/')))}"
}
},
"runAfter": {
"Get_blob_content_(V2)": [
"Succeeded"
]
},
"type": "AppendToArrayVariable"
},
"Get_blob_content_(V2)": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "get",
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('logappstoregeacct'))}/files/@{encodeURIComponent(encodeURIComponent(items('For_each')?['Path']))}/content",
"queries": {
"inferContentType": true
}
},
"runAfter": {},
"type": "ApiConnection"
}
},
"foreach": "@body('Lists_blobs_(V2)')?['value']",
"runAfter": {
"Lists_blobs_(V2)": [
"Succeeded"
]
},
"type": "Foreach"
},
"Initialize_variable": {
"inputs": {
"variables": [
{
"name": "attachment",
"type": "array"
}
]
},
"runAfter": {},
"type": "InitializeVariable"
},
"Lists_blobs_(V2)": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "get",
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/foldersV2/@{encodeURIComponent(encodeURIComponent('JTJmaW5wdXQtbGFwcHM='))}",
"queries": {
"nextPageMarker": "",
"useFlatListing": true
}
},
"metadata": {
"JTJmaW5wdXQtbGFwcHM=": "/input-lapps"
},
"runAfter": {
"Initialize_variable": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Send_an_email_(V2)": {
"inputs": {
"body": {
"Attachments": [
{
"ContentBytes": "@{base64(triggerBody()?['AttachmentContent'])}",
"Name": "@{triggerBody()?['AttachmentName']}"
}
],
"Body": "<p>@{triggerBody()?['Body']}</p>",
"Subject": "@{triggerBody()?['Subject']}",
"To": "******@yahoo.com"
},
"host": {
"connection": {
"name": "@parameters('$connections')['outlook']['connectionId']"
}
},
"method": "post",
"path": "/v2/Mail"
},
"runAfter": {
"For_each": [
"Succeeded"
]
},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"inputs": {
"method": "GET"
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {
"$connections": {
"value": {
"azureblob": {
"connectionId": "/subscriptions/69ad1e58-75e4-419c-b78e-60abe473fe7a/resourceGroups/LogicApps_ResourceGrp/providers/Microsoft.Web/connections/azureblob",
"connectionName": "azureblob",
"id": "/subscriptions/69ad1e58-75e4-419c-b78e-60abe473fe7a/providers/Microsoft.Web/locations/eastus/managedApis/azureblob"
},
"outlook": {
"connectionId": "/subscriptions/69ad1e58-75e4-419c-b78e-60abe473fe7a/resourceGroups/LogicApps_ResourceGrp/providers/Microsoft.Web/connections/outlook",
"connectionName": "outlook",
"id": "/subscriptions/69ad1e58-75e4-419c-b78e-60abe473fe7a/providers/Microsoft.Web/locations/eastus/managedApis/outlook"
}
}
}
}
}