Power Automate を使用してAPI のデータを自動化されたタスクに統合

杉本和也
杉本和也
リードエンジニア
CData Connect AI を使用してAPI のデータに接続し、API のデータをリアルタイムでPower Automate タスクに統合します。

Microsoft Power Automate は、一般的なアプリとサービスでイベント(ワークフロー)を自動化するオンラインサービスです。CData Connect AI と組み合わせると、ビジュアライゼーションやダッシュボード用にAPI のデータにクラウドベースでアクセスできます。この記事では、Power Automate からConnect AI に接続し、リアルタイムAPI のデータをワークフローとタスクに統合する方法を説明します。

Connect AI からAPI に接続する

CData Connect AI は直感的なクリック操作ベースのインターフェースを使ってデータソースに接続します。
  1. Connect AI にログインし、 Add Connection をクリックします。 Adding a Connection
  2. Add Connection パネルから「API」を選択します。 データソースを選択
  3. 必要な認証プロパティを入力し、API に接続します。

    To connect to your API, configure the following properties on the Global Settings page:

    • In Authentication, select the Type and fill in the required properties
    • In Headers, add the required HTTP headers for your API
    • In Pagination, select the Type and fill in the required properties

    After the configuring the global settings, navigate to the Tables to add tables. For each table you wish to add:

    1. Click "+ Add"
    2. Set the Name for the table
    3. Set Request URL to the API endpoint you wish to work with
    4. (Optional) In Parameters, add the required URL Parameters for your API endpoint
    5. (Optional) In Headers, add the required HTTP headers for the API endpoint
    6. In Table Data click " Configure"
    7. Review the response from the API and click "Next"
    8. Select which element to use as the Repeated Elements and which elements to use as Columns and click "Next"
    9. Preview the tabular model of the API response and click "Confirm"
    接続の設定(Salesforce の表示)
  4. Create & Test をクリックします。
  5. Edit API Connection ページのPermissions タブに移動し、ユーザーベースのアクセス許可を更新します。 権限を更新

パーソナルアクセストークンの追加

OAuth 認証をサポートしていないサービス、アプリケーション、プラットフォーム、またはフレームワークから接続する場合は、認証に使用するパーソナルアクセストークン(PAT)を作成できます。きめ細かなアクセス管理を行うために、サービスごとに個別のPAT を作成するのがベストプラクティスです。

  1. Connect AI アプリの右上にあるユーザー名をクリックし、User Profile をクリックします。
  2. User Profile ページでPersonal Access Token セクションにスクロールし、 Create PAT をクリックします。
  3. PAT の名前を入力して Create をクリックします。 Creating a new PAT
  4. パーソナルアクセストークンは作成時にしか表示されないため、必ずコピーして安全に保存してください。

コネクションが構成されたら、Power Automate からAPI に接続できるようになります。

CData Connect AI に接続する

Connect AI を使用してAPI のデータをPower Automate タスクに統合するには、新しいSQL Server 接続が必要です。

  1. Power Automate にログインします。
  2. Data -> Connections -> New connection とクリックします。
  3. SQL Server を選択します。 Creating a new SQL Server Connection
  4. 接続ウィザードにて:

    • 直接接続するように選択します。
    • SQL server nametds.cdata.com,14333 に設定します。
    • SQL database name をAPI コネクションの名前(API1 など)に設定します。
    • Username をConnect AI のユーザーに設定します。([email protected]
    • Password を上記のユーザーのPAT に設定します。
    • Create をクリックします。 Connecting to Connect AI

API のデータをPower Automate タスクに統合する

Connect AI への接続が構成されたら、リアルタイムAPI のデータをPower Automate タスクに統合することができるようになります。

  1. Power Automate にログインします。
  2. My flows -> New flow とクリックし、空白またはテンプレートからフローを作成することを選択します。
  3. SQL Server アクション(Get rows など)を追加または構成し、Connect AI コネクションに接続するようにアクションを構成します。
  4. 使用するテーブルをドロップダウンメニューから選択し、詳細オプション(フィルタ、オーダーなど)を構成します。 Getting API "Rows"
  5. その後のアクションを構成してテストし、フローを保存します。

クラウドアプリケーションからAPI のデータへのSQL アクセス

Power Automate タスクからAPI のデータへリアルタイムに直接接続できるようになりました。これで、API のデータを複製せずにより多くの接続とワークフローを作成してビジネスを推進できます。

クラウドアプリケーションから直接100を超えるSaaS 、ビッグデータ、NoSQL ソースへのSQL データアクセスを取得するには、CData Connect AI を参照してください。

Power Automate の関連記事

この記事では、CData Connect AI とPower Automate(オンライン)の使用について説明しました。Power Automate Desktop を使用するその他の方法については、以下の記事をご覧ください。

はじめる準備はできましたか?

CData Connect AI の詳細、または無料トライアルにお申し込みください:

無料トライアル お問い合わせ