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

# Set up Human handover with Zapier

> Forward your Watermelon chats to another tool via Zapier

By using the Watermelon Human handover, you can automatically forward messages to other software when a handover occurs from the AI Agent to a user.

### **What is the Human Handover?**

The Handover refers to the moment when the AI Agent is transferred (handover) to an agent or a team, and the Zap is initiated. In other words, there is a trigger when a handover takes place.

## 1. Set up Human handover

Start by setting up Human Handover in Watermelon. The Handover is needed so the Agent knows in which cases the Agent needs to forward conversations. The handover triggers the automation in Zapier which forwards the conversation to your email.

<Note>
  How does handover work?

  Agent collects details → customer types trigger → Human Handover fires → Zapier sends email.
</Note>

<Steps>
  <Step title="Open Human Handover in Watermelon">
    Go to Situations and go to Human Handover.

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/handover-menu.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=b47d0bd7e455654fc0a75dd38a3dd614" alt="Handover Menu" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/handover-menu.png" />
    </Frame>
  </Step>

  <Step title="Allow Human Handover outside office hours">
    Decide if you want to forward conversations outside office hours. If you turn on the toggle, conversations outside business hours will also be forwarded to your email.

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/handover-outside-business-hours.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=713e9892ed594ba56ed96887dd33f1ec" alt="Handover Outside Business Hours" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/handover-outside-business-hours.png" />
    </Frame>
  </Step>

  <Step title="Add instructions">
    To manage expectations for the end-user, you can add instructions for the Agent what it needs to say during/outside office hours. Example:

    > Your request has been submitted. Our team will reach out as soon as possible.

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/handover-instructions.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=2cec128149c994435d0da133a2f9d865" alt="Handover Instructions" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/handover-instructions.png" />
    </Frame>

    <Warning>
      Be aware that after the Handover your Agent has left the Chat. You can include this information in the instructions above.
    </Warning>
  </Step>

  <Step title="Create Trigger">
    To technically trigger the handover, we need a code word. We call this code word a trigger. When a customer types this trigger, the message is automatically forwarded.

    Click **Create** to create a new Trigger and select **new** in the dropdown menu.

    Suggested trigger: **Submit request.**

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/handover-trigger.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=a4bc01059db7294b1edeef42a1a9c259" alt="Handover Trigger" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/handover-trigger.png" />
    </Frame>

    <Note>
      It's important to choose a trigger sentence which is not used in conversations often. Otherwise the automation might be triggered without all necessary data.
    </Note>
  </Step>
</Steps>

## 2. Create automation

Now everything is set up in Watermelon, we can create the automation in Zapier. This automation will make sure your chats will actually be forwared to your email.

<Steps>
  <Step title="Open Zapier in Apps">
    In Watermelon, go to **Apps** and open **Zapier**.

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/zapier-integrations.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=82a944ee8514a8b18ca50ac9519d8a0e" alt="Zapier Integrations" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/zapier-integrations.png" />
    </Frame>
  </Step>

  <Step title="Select App and workflow">
    In the next screen select **Create from scratch** at the bottom of the page.

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/zapier-create-from-scratch.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=d20ba25d3c3485a40b0d812509cb59d5" alt="Zapier Create From Scratch" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/zapier-create-from-scratch.png" />
    </Frame>
  </Step>

  <Step title="Connect Watermelon to Zapier">
    Zapier will open in a new screen, it should show as the image below. \
    Click **Select** to connect Watermelon to Zapier.

    <Frame>
      <img src="https://mintcdn.com/watermelon/m0SdOc4sit8TtPGk/images/automation-guides/forward-conversations-to-email/forward-conversations-email-connect.png?fit=max&auto=format&n=m0SdOc4sit8TtPGk&q=85&s=7246cdb7b8215e7d2914bb61c4bf20d3" alt="Forward Conversations Email Connect Pn" width="2888" height="1376" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-connect.png" />
    </Frame>
  </Step>

  <Step title="Add API Keys">
    A new screen will open where you need to add API keys.

    <Frame>
      <img src="https://mintcdn.com/watermelon/cm_xIakt0l-qRUnh/images/automation-guides/forward-conversations-to-email/forward-conversations-email-zapier-api-keys.png?fit=max&auto=format&n=cm_xIakt0l-qRUnh&q=85&s=1c572ce481aab90a07c99138026a42fb" alt="Forward Conversations Email Zapier Api Keys Pn" width="2878" height="1580" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-zapier-api-keys.png" />
    </Frame>
  </Step>

  <Step title="Create API Key">
    In Watermelon, go to API keys and click **Create** to create a new API key.

    Give the API Key a name and make sure to select **Read and write**. Read and write permissions are needed so the API can collect and use the correct details.

    Add the keys to the Zapier fields.

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/zapier-api-key.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=d56ffb734d3bfd08afc85e9ddf7abb83" alt="Zapier Api Key" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/zapier-api-key.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/watermelon/SSTykc9V_kfCQUMw/images/guides/automation-guides/process-leads-via-zapier/zapier-create-api-key.png?fit=max&auto=format&n=SSTykc9V_kfCQUMw&q=85&s=1a8426514b91a4032851e6c7754a4d0f" alt="Zapier Create Api Key" width="2938" height="1390" data-path="images/guides/automation-guides/process-leads-via-zapier/zapier-create-api-key.png" />
    </Frame>
  </Step>

  <Step title="Test connection">
    In Zapier, click on continue to test the connection with Watermelon.

    <Frame>
      <img src="https://mintcdn.com/watermelon/7pXm_JLplF3HXQry/images/automation-guides/forward-conversations-to-email/forward-conversations-email-api-key-test-connection.png?fit=max&auto=format&n=7pXm_JLplF3HXQry&q=85&s=1e24d00985750dcb3571b9c08d4933fd" alt="Forward Conversations Email Api Key Test Connection Pn" width="2900" height="1376" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-api-key-test-connection.png" />
    </Frame>

    <Warning>
      You need a conversation in your inbox to test this step. Follow these steps if no conversations are handed off:

      1. Open your Chat Widget
      2. Start a conversation
      3. Use the Trigger word you set up in step 1 of this article.
      4. After the conversation is handed off in Watermelon, click **Find new records** in Zapier.

         Your new conversation should show up.
    </Warning>
  </Step>

  <Step title="OPTIONAL: Add AI by Zapier">
    <Warning>
      AI by Zapier is a paid service, you can also skip this step and load the full message payload into the email.
    </Warning>

    Click on the plus button to add an extra step and select **AI by Zapier**.

    <Frame>
      <img src="https://mintcdn.com/watermelon/zofLCnI651Jn5MrV/images/automation-guides/forward-conversations-to-email/forward-conversations-email-extra-step.png?fit=max&auto=format&n=zofLCnI651Jn5MrV&q=85&s=3d99ffaf1a384513b81e010aa2fa3cab" alt="Forward Conversations Email Extra Step Pn" width="2928" height="1420" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-extra-step.png" />
    </Frame>
  </Step>

  <Step title="Set up AI by Zapier">
    1. In the **input field**, click on the Plus button and select **Message payload**.

    <Frame>
      <img src="https://mintcdn.com/watermelon/zofLCnI651Jn5MrV/images/automation-guides/forward-conversations-to-email/forward-conversations-email-input-field.png?fit=max&auto=format&n=zofLCnI651Jn5MrV&q=85&s=660d1a70e18e1a52ed6bb672b7f3fd0c" alt="Forward Conversations Email Input Field Pn" width="2926" height="1414" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-input-field.png" />
    </Frame>

    2. Add the following prompt:

       > Get the details from the Message payload

           <Frame>
             <img src="https://mintcdn.com/watermelon/kRl4V26COK4HR4O3/images/automation-guides/forward-conversations-to-email/forward-conversations-email-prompt.png?fit=max&auto=format&n=kRl4V26COK4HR4O3&q=85&s=556a1d904696ff5baf8b9c3164076594" alt="Forward Conversations Email Prompt Pn" width="2922" height="1406" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-prompt.png" />
           </Frame>
    3. At **Output fields**, click **add field**. Give the fields a name and select the field type. Repeat this for all desired data.

           <Frame>
             <img src="https://mintcdn.com/watermelon/kRl4V26COK4HR4O3/images/automation-guides/forward-conversations-to-email/forward-conversations-email-output-field.png?fit=max&auto=format&n=kRl4V26COK4HR4O3&q=85&s=bc0609958b23132a61d8c752292288e1" alt="Forward Conversations Email Output Field Pn" width="2924" height="1414" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-output-field.png" />
           </Frame>
    4. Click **Generate preview** to see the outcome of your prompt and click **Finish.**

           <Frame>
             <img src="https://mintcdn.com/watermelon/kRl4V26COK4HR4O3/images/automation-guides/forward-conversations-to-email/forward-conversations-email-preview.png?fit=max&auto=format&n=kRl4V26COK4HR4O3&q=85&s=25143479b53f54f85dac94cb1c8a235c" alt="Forward Conversations Email Preview Pn" width="2926" height="1420" data-path="images/automation-guides/forward-conversations-to-email/forward-conversations-email-preview.png" />
           </Frame>
  </Step>

  <Step title="Connect your app of choice">
    Select your app of choice to connect, choose the Action you'd like to execute e.g. Create ticket, send email or create contact.

    Which action you choose depends on how you want to follow up the chat.
  </Step>

  <Step title="Test step">
    Click on **Continue** and test the email step.
  </Step>

  <Step title="Publish workflow">
    When the email is received correctly, you can **Publish** our workflow by clicking **Publish**.
  </Step>
</Steps>

### **Testing**

Open your AI Agent in a Chat Widget and send the Handover trigger which you set up in Watermelon. If all goes well, the desired data should now appear in the selected tool.

Congratulations! Your handover trigger is complete!

<Warning>
  It is not possible to test the Handover in the Playground.
</Warning>
