> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or Update User

> Zapier の Create or Update User アクションを使用して、Google Forms、HubSpot、Typeform、Google Sheets などのソースから MoEngage のユーザーを追加または更新します。

## はじめに

[Zapier](https://zapier.com/) は、使用しているアプリやサービスを接続してワークフローを自動化できるオンラインプラットフォームです。MoEngage と Zapier の連携を使用すると、Zapier 上の 5,000 以上のアプリを対象としたカスタムワークフローの自動化を作成できます。

「Create or Update User」アクションは、MoEngage にユーザーを追加するのに役立ちます。ユーザーがすでに存在する場合、このアクションはユーザーの属性を更新します。

## ユースケース

このアクションを使用すると、Zapier を使用して複数のソースからほぼリアルタイムでユーザーを作成または更新できます。以下はその一例です。

1. Google Form が送信されたときに、MoEngage のユーザー属性を更新する。
2. Facebook Lead Ad の新しいリードで、MoEngage のユーザーを作成または更新する。
3. HubSpot から MoEngage のユーザーを作成または更新する。
4. Typeform のエントリから MoEngage に新しいユーザーを追加する。
5. Google Sheets の行から MoEngage のユーザーを作成または更新する。

<Info>
  **前提条件**

  Zapier アカウントにアクセスでき、そのアカウントが MoEngage アカウントに接続されていることを確認してください。[こちらの手順に従って Zapier を MoEngage に接続](/docs/ja/partner-guide/data-and-analytics/workflow-automation/zapier/overview#connecting-zapier-to-moengage)できます。
</Info>

## 連携

このアクションは、MoEngage の [User APIs](https://www.moengage.com/docs/api/user/track-user) を使用します。このチュートリアルでは、ユースケース #1「Google Form が送信されたらすぐに MoEngage のユーザー属性を更新する」を取り上げます。[Zapier Dashboard](https://zapier.com/app/dashboard) で、左上の「+ Create Zap」をクリックします。

### ステップ 1: トリガーアプリとして Google Forms を選択する

トリガーとして「Google Forms」と入力して選択します。これが Zap を開始するトリガーになります。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7721767045524.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=8f36b7579cce4a50d903d58260d96c21" alt="Zapier でトリガーアプリとして Google Forms を選択する" width="2880" height="1564" data-path="images/partner_7721767045524.png" />

### ステップ 2: トリガーアプリを設定する

1. ドロップダウンからイベント「New Form Response」を選択します。continue をクリックします。
2. まだ接続していない場合は、Google アカウントを接続します。選択したら continue をクリックします。
3. 「Set up trigger」ステップで、ドロップダウンからフォームを選択します。continue をクリックします。
4. 「Test Trigger」をクリックして、最近のフォーム送信をサンプルデータとして取得します。データがない場合は、自動的に入力されます。
5. このデータに問題がなければ、continue をクリックします。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7721915281300.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=ae225c80d768debca06af8dbc44cc861" alt="フォームを選択した Google Forms トリガーの設定" width="2880" height="1564" data-path="images/partner_7721915281300.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7721915254548.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=6ec174177cb1a73a0625798c918be24e" alt="Google Form の送信によるテストトリガーのサンプルデータ" width="2880" height="964" data-path="images/partner_7721915254548.png" />

### ステップ 3: アクションアプリとして MoEngage を追加する

アプリから「MoEngage」を検索して選択します。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7568867646612.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=e0e208cee79897e4113ade59931f3d8c" alt="アクションアプリとして MoEngage を検索して選択する" width="1628" height="1270" data-path="images/partner_7568867646612.png" />

### ステップ 4: MoEngage アクションを設定する

1. イベントのドロップダウンから「Create or Update User」を選択します。continue をクリックします。
2. 前提条件に従っていれば、MoEngage アカウントがすでに一覧に表示されています。そのアカウントを選択するか、新しいアカウントを接続できます。完了したら continue をクリックします。
3. 次のステップ「Set up action」では、入力するか前のステップからマッピングするための属性とユーザープロパティのリストが表示されます。[詳細はこちら](/docs/ja/api/user/track-user)をご覧ください。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722082187540.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=8b5a46804f11790eb95f55d06fb49dc2" alt="属性フィールドを含む Create or Update User アクションの設定" width="2880" height="1520" data-path="images/partner_7722082187540.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722082759956.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=b702ebc3e70afec2e44598e2bc810f27" alt="Create or Update User アクションのフィールドの続き" width="2880" height="1380" data-path="images/partner_7722082759956.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722116477332.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=94cfab930bbbceb6199ad179ae32f92c" alt="Create or Update User アクションのカスタム属性セクション" width="2880" height="1320" data-path="images/partner_7722116477332.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722116440084.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=4a377fe533a55be3559433581244ea71" alt="MoEngage の Create or Update User アクションの追加フィールド" width="2880" height="996" data-path="images/partner_7722116440084.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722087108116.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=f765c02572ea8d2d4e7c862a84629868" alt="Create or Update User アクションの最後のフィールドと確認" width="2880" height="980" data-path="images/partner_7722087108116.png" />

すべての必須フィールドに入力すると、この設定をテストするオプションが表示されます。キーと値のペアの形式でカスタム属性を追加し、前のトリガーアプリの入力にマッピングすることもできます。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722184370324.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=0789982e1be8f438e46fb12e91b59ec9" alt="前のトリガーからカスタムのキーと値の属性ペアを追加する" width="1848" height="618" data-path="images/partner_7722184370324.png" />

前のステップからマッピングデータを選択すると、次のようになります。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722189009172.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=d564dff4e54e5670e9b611341fe2ff25" alt="Create or Update User アクションに表示されたマッピング済みデータ" width="1848" height="314" data-path="images/partner_7722189009172.png" />

4. この設定では、次のようにリンクしています。
   1. `Customer ID` → `Google Forms (Email Address)`
   2. `Other Attributes` → `form_submitted_on` → `Google Forms (Last Submitted Time)`
   3. `Other Attributes` → `another_attribute` → `"I can also write my own text"`
   4. マッピングに問題がなければ、「Continue」をクリックします。
5. この設定をテストするオプションが表示されます。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722308968724.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=32941c788079b3be8565b183a7b5ae11" alt="Create or Update User アクションのテスト設定画面" width="1848" height="1440" data-path="images/partner_7722308968724.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722346499092.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=2d9bbb007fdc25e1d75a4b2319f46998" alt="Create or Update User のテスト設定ビューの続き" width="1848" height="462" data-path="images/partner_7722346499092.png" />

6. 「Test & continue」をクリックして、この設定をテストします。
7. API 呼び出しが成功すると、「success」が返されます。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722381695764.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=06e55be437016a959f0dc372bcb6cbf5" alt="Create or Update User アクションの API 呼び出し成功レスポンス" width="1848" height="1078" data-path="images/partner_7722381695764.png" />

MoEngage ダッシュボードで確認することもできます。テストユーザーのプロファイルに移動し、カスタム属性を確認します。

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7722405725332.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=24bc699ee7210779b40e77682af521c8" alt="テストユーザーの MoEngage プロファイルでカスタム属性を確認する" width="1214" height="400" data-path="images/partner_7722405725332.png" />

8. すべてが正常に動作することを確認したら、「Publish Zap」をクリックします。Google Form に新しい回答が追加されるたびに Zap が実行されます。
