お世話になっております。
掲題の件、Microsoft Flowに対して「ステータスの更新」をトリガーにWebhookを送信して、ステータスが「完了」の場合に次のフローに進むというように設定したのですが、
「要求本文の JSONスキーマ」にどのように記載すればステータスを取得できるのでしょうか?
以下のようなjsonは試してみたのですが取得できませんでした。
================================================
{
“$schema”: “http://json-schema.org/draft-04/schema#”,
“type”: “object”,
“properties”: {
“app”: {
“type”: “object”,
“properties”: {
“name”: {
“type”: “string”
}
}
},
“record”: {
“type”: “object”,
“properties”: {
“status”: {
“type”: “object”,
“properties”: {
“value”: {
“type”: “string”
}
}
}
}
},
“recordTitle”: {
“type”: “string”
},
“url”: {
“type”: “string”
}
}
}
================================================
アドバイスなどいただけると幸いです。
お手数ですが、よろしくお願いいたします。
こんにちは。
以下、スキーマを作る簡単(?)な手順です。
-
いったん、「本文」をメール等に流すフローを作成
-
フローを実行し、メール等で本文の内容をすべて受ける
-
2の内容を全コピーして、Microsoft Flow画面に戻り「サンプルのペイロードを使用してスキーマを生成する」でペーストして「完了」をクリック
アプリストアの「顧客リスト」アプリで作ったらこうなりました。「ステータス」のところを参考にしてください。
{
“type”: “object”,
“properties”: {
“id”: {
“type”: “string”
},
“type”: {
“type”: “string”
},
“app”: {
“type”: “object”,
“properties”: {
“id”: {
“type”: “string”
},
“name”: {
“type”: “string”
}
}
},
“record”: {
“type”: “object”,
“properties”: {
“備考”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“レコード番号”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“作業者”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “array”
}
}
},
“更新者”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “object”,
“properties”: {
“code”: {
“type”: “string”
},
“name”: {
“type”: “string”
}
}
}
}
},
“作成者”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “object”,
“properties”: {
“code”: {
“type”: “string”
},
“name”: {
“type”: “string”
}
}
}
}
},
“ステータス”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“郵便番号”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“会社ロゴ”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “array”
}
}
},
“$revision”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“部署名”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“担当者名”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“メールアドレス”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“更新日時”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“顧客ランク”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“住所”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“TEL”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“FAX”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“作成日時”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“会社名”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
},
“$id”: {
“type”: “object”,
“properties”: {
“type”: {
“type”: “string”
},
“value”: {
“type”: “string”
}
}
}
}
},
“recordTitle”: {
“type”: “string”
},
“url”: {
“type”: “string”
}
}
}
ダン吉 様
ご回答いただきありがとうございます。
教えていただいた内容で設定したところ、ステータス情報を取得することができました。
サンプルjsonからスキーマが自動生成されるのは目からうろこでした。
今後の作業に役立たせます。
最終的に、以下のようになりました。
===============================================
{
“$schema”: “http://json-schema.org/draft-04/schema#”,
“type”: “object”,
“properties”: {
“app”: {
“type”: “object”,
“properties”: {
“name”: {
“type”: “string”
}
}
},
“record”: {
“type”: “object”,
“properties”: {
“ステータス”: {
“type”: “object”,
“properties”: {
“value”: {
“type”: “string”
}
}
}
}
}
}
}
===============================================
非常に助かりました。
ありがとうございます。