Workatoを使用して、オブジェクトデータをGoogle シートと同期する
Liferay DXP 7.4+
ここでは、 Workatoを使用して、Webhook を使用して Liferay オブジェクトと Google スプレッドシート間の同期タスクをトリガーする方法を学習します。 この方法でデータを同期するには、Workatoのアカウント、Googleスプレッドシート、およびアクティブなDXP 7.4インスタンスが必要です。 DXPインスタンスには、Googleスプレッドシートにデータを送受信するための必要なフィールドを持つ公開オブジェクトも必要です。
オブジェクトデータをGoogle シートに同期させる
以下の手順で、オブジェクトデータをGoogle シートに同期させます。
-
Workato にログインし、 プロジェクト ページに移動します。
![[Projects]ページに移動します。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/01.png)
-
「レシピ」 ページに移動し、「 「レシピの作成」」をクリックします。
![[Recipes]ページに移動し、[Create Recipe]をクリックします。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/02.png)
-
レシピ 名前、 場所を入力し、 Webhook からのトリガー 開始点を選択します。 次に、 ビルドを開始をクリックします。
![[Name]と[Location]を入力し、開始地点を選びます。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/03.png)
-
セットアップパネルで、 [Start guided setup]をクリックします。
![[Start guided setup]をクリックします。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/04.png)
-
イベント名 を入力し、生成された Webhook URLをコピーします。
![[Event Name]を入力し、[Next]をクリックします。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/05.png)
-
Liferay インスタンスで、コピーした URL を使用して、新しいオブジェクト エントリが追加されるたびに webhook エンドポイントにリクエストを送信するオブジェクト アクション を定義します。

-
[Next] をクリックし、Webhookをトリガーするためのテストオブジェクトエントリーを追加します。
これにより、Webhookモジュールがオブジェクトのデータ構造を自動的に決定することができます。

-
テストにより、オブジェクトのデータ構造が正常に決定されたことを確認し、 [Setup Webhook]をクリックします。

-
アクションの場合は、 アプリ内のアクションを選択します。
![[Action]で、[Action in an app]を選択します。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/09.png)
-
Google Sheets アプリを選択します。

-
行の追加 アクションを選択します。
![[Add Row]アクションを選択します。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/11.png)
-
アプリをGoogleアカウントに接続します。

-
オブジェクトと同期する目的の スプレッドシート と ワークシート を選択します。

-
シートの列をオブジェクトのストラクチャーのデータフィールドにマッピングします。

-
[保存]をクリックします。
![[保存]をクリックします。](https://resources.learn.liferay.com/images/dxp/latest/en/low-code/objects/integrating-objects-with-third-party-services/using-google-sheets-with-objects/using-workato-to-sync-object-data-with-google-sheets/images/15.png)
-
アセット ページに移動し、 ケバブ ボタン をクリックして、 開始 を選択し、レシピを有効にします。
