「ぼくのかんがえたさいきょうの ERP 連携 w/Azure Logic Apps」
自己紹介
IT エンジニア、自己紹介の練習は常にやっておいて損はないと思う #自己紹介 - Qiita
Logic Apps いいぞ
ぼくのかんがえたさいきょうのワークフロー
json
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Function-Catch": {
"actions": {
"Terminate": {
"inputs": {
"runError": {
"code": "@{outputs('Call_an_Azure_function')['statusCode']}",
"message": "@{body('Call_an_Azure_function')}"
},
"runStatus": "Failed"
},
"type": "Terminate"
}
},
"runAfter": {
"Function-Try": [
"Failed",
"Skipped",
"TimedOut"
]
},
"type": "Scope"
},
"Function-Success": {
"actions": {
"BLOB_を作成する_(V2)": {
"inputs": {
"body": "@body('Word_文書を_PDF_に変換します')",
"headers": {
"ReadFileMetadataFromServer": true
},
"host": {
"connection": {
"referenceName": "azureblob"
}
},
"method": "post",
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/files",
"queries": {
"folderPath": "/LIST",
"name": "1.TXT",
"queryParametersSingleEncoded": true
}
},
"runAfter": {
"Word_文書を_PDF_に変換します": [
"SUCCEEDED"
]
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "ApiConnection"
},
"Word_文書を_PDF_に変換します": {
"inputs": {
"host": {
"connection": {
"referenceName": "wordonlinebusiness"
}
},
"method": "get",
"path": "/api/templates/convertFile",
"queries": {
"drive": "b!ycyIdAWTIESFQLIiyjl8YvzFU_yU0B9HiBRWkSCunCBiOI6IzBXwR5FX5_OiMFWQ",
"file": "1.TXT",
"format": "pdf",
"source": "me"
}
},
"type": "ApiConnection"
},
"メールの送信_(V2)": {
"inputs": {
"body": {
"Body": "<p>正常終了しました</p><p>----</p><p>@{convertFromUtc(utcNow(), 'Tokyo Standard Time', 'yyyyMMddHHmmss')} from @{workflow().runid}</p><br>",
"Importance": "Normal",
"Subject": "正常終了",
"To": "nobukoyamada@example.com"
},
"host": {
"connection": {
"referenceName": "outlook"
}
},
"method": "post",
"path": "/v2/Mail"
},
"runAfter": {
"BLOB_を作成する_(V2)": [
"SUCCEEDED"
]
},
"type": "ApiConnection"
}
},
"runAfter": {
"Function-Try": [
"Succeeded"
]
},
"type": "Scope"
},
"Function-Try": {
"actions": {
"Call_Bat_Script_on_VM_via_REST_": {
"inputs": {
"method": "POST",
"uri": "http://stat.us/200"
},
"runAfter": {
"Call_an_Azure_function": [
"SUCCEEDED"
]
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "Http"
},
"Call_an_Azure_function": {
"inputs": {
"function": {
"connectionName": "azureFunctionOperation"
},
"method": "POST"
},
"type": "Function"
}
},
"runAfter": {
"Read_blob_content": [
"SUCCEEDED"
]
},
"type": "Scope"
},
"Read_blob_content": {
"inputs": {
"parameters": {
"blobName": "uminocompany.csv",
"containerName": "list"
},
"serviceProviderConfiguration": {
"connectionName": "AzureBlob",
"operationId": "readBlob",
"serviceProviderId": "/serviceProviders/AzureBlob"
}
},
"runAfter": {},
"type": "ServiceProvider"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"When_a_HTTP_request_is_received": {
"kind": "Http",
"type": "Request"
}
}
},
"kind": "Stateful"
}
最近のお披露目
📢 Azure Logic Apps (Standard) workflow assistant - Public Preview 🎊 - Microsoft Community Hub
https://techcommunity.microsoft.com/t5/azure-integration-services-blog/azure-logic-apps-standard-workflow-assistant-public-preview/ba-p/3978705
Azure Logic Apps の Standard ワークフローに AI を利用したヘルプを取り入れる
https://learn.microsoft.com/ja-jp/azure/logic-apps/workflow-assistant-standard
私と ERP と Functions 的なもの
まとめ
以上です〜