PowerAutomateでChatGPTを使う方法
今回はPowerAutomateで、ChatGPTを使う方法について解説していきます。
PowerAutomateとChatGPTを連携させることで、自動化されたワークフローにAIの力を取り入れることが可能になります。
これにより、日々の業務をより効率的に、かつスマートに進めることができます。
必要なもの
環境
Microsoft Windows 11 Home
Outlook
OneDrive
PowerAutomate(クラウドフロー) 有償版
※今回はPowerAutomateのクラウドフローの有償版を利用しています。
事前にChatGPTのAPIキーを取得して下さい。
APIキーの取得方法は下記から確認して下さい。

PowerAutomate設定
次にPowerAutomateの設定をしていきます。
今回はTeamsに投稿された内容をOpenAIのAPIを利用して要約する処理を実装していきます。
PowerAutomateにアクセスして「作成」をクリックして下さい。

「自動化したクラウドフロー」を選択してください。

フロー名を設定して下さい。
分かりやすい名前なら何でもよいですが、今回は「Teams要約」と入力します。

「チャンネルに新しいメッセージが追加されたとき」を選択してください。

「チーム」と「チャネル」を選択して下さい。

次にChatGPT APIを利用して、メッセージを要約する処理を追加します。

OpenAIで検索して「OpenAI GPT」を選択して下さい。

「Get chat completions」を選択して下さい。

APIキーの設定が求めるので、接続名とAPI Keyを設定して下さい。
接続名は分かりやすい名前であれば、何でも良いですが今回は「ChatGPTAPI」にして下さい
API Keyは以下のように入力してください。
“Bearer 半角スペース あなたのAPIキー”で入力して下さい。
具体的には「Bearer sk-xxxxxxxxxxxxx」になります。

次に設定を進めていきます。
以下の内容のように設定して下さい。

最後に新しいステップを選んで、「チャンネル内のメッセージで応答します」を選択して下さい。
下記のように設定して下さい。

実行してみる
実際に、作ったPowerAutomateのフローを実行してみました。
PowerAutomateの説明を投稿すると、下記の文章を要約してくれました。

以上で設定完了です。