# Integrate Google signup form with WhatsApp through Flow Builder

In this guide, you will learn how to link your Google Signup Form with WhatsApp by using Flow Builder. By creating a flow using a webhook as a trigger, you’ll be able to link any Google Form to your WhatsApp Templates.&#x20;

&#x20;

**Requirements**

* [A MessageBird account](https://dashboard.messagebird.com/en/sign-up)
* [A WhatsApp for Business account](https://www.messagebird.com/whatsapp/)
* [A Google Account](https://myaccount.google.com/intro)

&#x20;

**Before you begin**

* Create a business account by signing up with [MessageBird - WhatsApp Business Plan](https://www.messagebird.com/whatsapp/).&#x20;
* Submit your [pre-approved Message Templates](/connectivity-platform/getting-started/working-with-whatsapp-message-templates.md) via the [WhatsApp Template Manager](https://dashboard.messagebird.com/en/whatsapp-template-manager/) in your MessageBird Dashboard. You can use the following example as a guide:

E.g. *Hi **{{1}}**,*

*This is an automated system that helps facilitate your registration process through WhatsApp. Visit this link to find out what documents you need before we get started:* [*https://www.messagebird.com/en/*](https://www.messagebird.com/en/)

*Reply with Start when you're ready to proceed.*

* Create a [Google signup form](https://docs.google.com/forms/u/0/) like the following:

#### &#x20;

&#x20;

**Step 1: Create a webhook trigger flow**&#x20;

1\. Go to [Flow Builder](https://dashboard.messagebird.com/en/flow-builder) and **create a new flow**.&#x20;

2\. Select **Webhook** as the trigger.

<figure><img src="/files/jXP0W8FbZrK2cPwWIKWO" alt=""><figcaption></figcaption></figure>

3\. Add **embeds\[0].fields\[0].value** and **embeds\[0].fields\[1].value** as your **webhook variables**.

<figure><img src="/files/NJpaLhtSDMNnbcBmEA78" alt=""><figcaption></figcaption></figure>

4\. Done? Awesome! Add a **Send WhatsApp HSM** step below your Webhook.  Choose your template, add **embeds\[0].fields\[0].value** as the **Recipient**, and **embeds\[0].fields\[1].value** as **variable 1**.

&#x20;

<figure><img src="/files/3Z3VnH2s1Z12yKNoxvT8" alt=""><figcaption></figcaption></figure>

&#x20;

<figure><img src="/files/X8Di1mEp3dS1ptfhQMAN" alt=""><figcaption></figcaption></figure>

5\. **Publish** your flow in the top-right corner of your screen, and you're good to go!&#x20;

#### &#x20;

**Step 2: Set up your Google Form**&#x20;

1\. Create a [Google Signup Form](https://docs.google.com/forms/u/0/) for use with this script.&#x20;

2\. Go to the top-right corner of your screen and select **Script editor**. Done? Now paste the following scripts.&#x20;

<figure><img src="/files/ijeZ0g5JY9ak2O15qii6" alt=""><figcaption></figcaption></figure>

&#x20;

```

var POST_URL = "https://flows.messagebird.com/flows/c60a5eaa-f68b-417e-b6e4-3a024f48d1a7/invoke";

function onSubmit(e) {
    var form = FormApp.getActiveForm();
    var allResponses = form.getResponses();
    var latestResponse = allResponses[allResponses.length - 1];
    var response = latestResponse.getItemResponses();
    var items = [];

    for (var i = 0; i < response.length; i++) {
        var question = response[i].getItem().getTitle();
        var answer = response[i].getResponse();
        try {
            var parts = answer.match(/[\s\S]{1,1024}/g) || [];
        } catch (e) {
            var parts = answer;
        }

        if (answer == "") {
            continue;
        }
        for (var j = 0; j < parts.length; j++) {
            if (j == 0) {
                items.push({
                    "name": question,
                    "value": parts[j],
                    "inline": false
                });
            } else {
                items.push({
                    "name": question.concat(" (cont.)"),
                    "value": parts[j],
                    "inline": false
                });
            }
        }
    }

    var options = {
        "method": "post",
        "headers": {
            "Content-Type": "application/json",
        },
        "payload": JSON.stringify({
            "content": "‌", // This is not an empty string
            "embeds": [{
                "title": "TOP TEXT CHANGE THIS IN SCRIPT",
                "fields": items,
                "footer": {
                    "text": "BOTTOM TEXT CHANGE THIS IN SCRIPT"
                }
            }]
        })
    };

    UrlFetchApp.fetch(POST_URL, options);
};

```

&#x20;

2\. Replace the red highlighted webhook with your **Flow Builder Webhook URL** you just created. To get your URL, open your flow, click on the **Webhook** step and tap **copy**.&#x20;

<figure><img src="/files/ZXaTaTlGYXIN8W04rm9l" alt=""><figcaption></figcaption></figure>

4\. Add a trigger into the current project. Click the clock icon below, the page of the project trigger will open. Press **Add Trigger** button, set it up per the screengrab below.

<figure><img src="/files/iU0WhEoe6WIa6MqmCgqA" alt=""><figcaption></figcaption></figure>

&#x20;

<figure><img src="/files/ijeZ0g5JY9ak2O15qii6" alt=""><figcaption></figcaption></figure>

5\. And that's it! Click the **Save** button to add a trigger to the current project.

<figure><img src="/files/KhkMBxYqmA27XsORiKCk" alt=""><figcaption></figcaption></figure>

And that’s it! 🎉 Now you know how to integrate a Google Form with WhatsApp. Check out [this demo video](https://www.youtube.com/watch?v=_XzLRolqH1Y) to see them in action!

&#x20;

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/connectivity-platform/use-cases/integrate-google-signup-form-with-whatsapp-through-flow-builder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
