How to Connect Google Forms to Discord Using Webhooks

If you run a gaming community, a private membership group, or a study server on Discord, you likely use Google Forms to handle applications, feedback, or support tickets. By default, you must constantly check a Google Sheet to see if anyone has submitted a new response. Instead of manually monitoring the form, you can use Discord’s built-in Webhook feature combined with a simple Google Apps Script to automatically forward every new form submission directly into a specific Discord text channel the second it is submitted.

Step 1: Create a Webhook in Discord

A webhook is simply a unique URL that allows external applications (like Google) to send automated messages into a specific Discord channel.

  1. Open Discord and navigate to the server where you want the notifications to appear.
  2. Hover over the specific text channel you want to use (e.g., #applications or #admin-logs) and click the small gear icon (Edit Channel).
  3. Click on the Integrations tab on the left-hand menu.
  4. Click on Webhooks, and then click the blue New Webhook button.
  5. Give your webhook a name (e.g., “Form Bot”). This is the name that will appear next to the message when it posts in the channel.
  6. Click the blue Copy Webhook URL button. Paste this long URL into a temporary notepad document.
  7. Click Save Changes at the bottom of the screen.

Step 2: Add the Apps Script to Google Forms

Now, you need to tell your Google Form to send its data to that specific Discord URL.

  1. Open your Google Form in edit mode.
  2. Click the three vertical dots (More menu) in the top right corner, next to your profile picture.
  3. Select Script editor. A new tab will open.
  4. Delete any existing code in the editor and paste the following:
function onSubmit(e) {
  var discordUrl = "PASTE_YOUR_WEBHOOK_URL_HERE";
  
  var formResponse = e.response;
  var itemResponses = formResponse.getItemResponses();
  var message = "**New Form Submission!**\n\n";
  
  for (var i = 0; i < itemResponses.length; i++) {
    var question = itemResponses[i].getItem().getTitle();
    var answer = itemResponses[i].getResponse();
    message += "**" + question + ":** " + answer + "\n";
  }
  
  var payload = {
    "content": message
  };
  
  var options = {
    "method": "post",
    "payload": JSON.stringify(payload),
    "contentType": "application/json"
  };
  
  UrlFetchApp.fetch(discordUrl, options);
}
  1. Replace PASTE_YOUR_WEBHOOK_URL_HERE with the actual URL you copied from Discord. Ensure you keep the quotation marks around the URL.
  2. Click the Save icon (the floppy disk).

Step 3: Set Up the Automation Trigger

The code is ready, but it needs a trigger to tell it exactly when to run.

  1. In the Apps Script editor, click the Triggers icon on the far left menu (it looks like a small alarm clock).
  2. Click the large blue + Add Trigger button in the bottom right corner.
  3. Set “Choose which function to run” to onSubmit.
  4. Set “Select event type” to On form submit.
  5. Click Save.

Google will prompt you to authorize the script. Follow the on-screen prompts, select your Google account, click “Advanced,” and click “Go to project (unsafe)” to grant permission. Once authorized, submit a test response to your form. Within seconds, a bot will post the answers neatly formatted directly into your Discord channel.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.