Scheduled cloud flow → HTTP → Parse JSON → Excel Online (Business)を使い、source、market_session、data_updated_atを保存します。
- OneDrive for BusinessまたはSharePointにFxRates表を作ります。
- 全symbolを1つのHTTPリクエストで取得します。
- JSONを解析してからExcelへ割り当てます。
- source、market session、data_updated_atを保持します。
- HTTPのtenant権限を確認し、FreeやMicrosoft 365を前提にしません。Logic Appsは別製品です。
Excelブックを準備する
FxRatesにCheckedAtUtc、Base、EUR、GBP、JPY、EURSource、GBPSource、JPYSource、MarketSession、DataUpdatedAt、EUREffectiveAt、GBPEffectiveAt、JPYEffectiveAt列を作ります。Excel connectorは名前付き表に書きます。
スケジュールflowを作る
Create → Scheduled cloud flowで頻度とtimezoneを設定し、HTTP GETを追加します。
https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP,JPYAuthorization: Bearer <value from a protected flow variable>キーをURLに置かず、secret environment variableまたは承認済みconnection-referenceとsecure inputs/outputsを使います。ダウンロード可能なレシピに正確なaction名、Parse JSON schema、Excel mappingがあります。
書き込む前に解析する
HTTP bodyをParse JSONで解析し、result、base、rates、sources、effective_at、market_session、data_updated_atを必須にします。実行時刻だけで鮮度を推測しません。
{"type":"object","required":["result","base","rates","sources","effective_at","market_session","data_updated_at"],"properties":{"result":{"type":"string","enum":["success"]},"base":{"type":"string"},"rates":{"type":"object","additionalProperties":{"type":"number"}},"sources":{"type":"object","additionalProperties":{"type":"string"}},"effective_at":{"type":"object","additionalProperties":{"type":"string"}},"market_session":{"type":"string"},"data_updated_at":{"type":"string"}}}Excelに行を追加する
Excel Online (Business)のAdd a row into a tableでrates、sources、effective_at、market_session、data_updated_atを割り当てます。CheckedAtUtcだけutcNow()を使います。
Excel変更には最大30秒の遅延があり同時変更は避けます。FxRatesのwriterをこのflowだけにします。
失敗を処理する
失敗分岐でstatusと実行リンクを記録します。429ではretry指示に従い、concurrency=1、試行回数を制限します。日次は30日で約30、毎時は720リクエストです。
ライセンスと制限を確認する
Power Automate licensing FAQでstandardとpremiumを確認します。Freeを保証せず、Excelの制限も確認します。Logic Appsの料金はPower Automate権限を決めません。
レポート、計画、推定、分析用で、規制取引の決済には使いません。