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.
- Open Discord and navigate to the server where you want the notifications to appear.
- Hover over the specific text channel you want to use (e.g., #applications or #admin-logs) and click the small gear icon (Edit Channel).
- Click on the Integrations tab on the left-hand menu.
- Click on Webhooks, and then click the blue New Webhook button.
- 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.
- Click the blue Copy Webhook URL button. Paste this long URL into a temporary notepad document.
- 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.
- Open your Google Form in edit mode.
- Click the three vertical dots (More menu) in the top right corner, next to your profile picture.
- Select Script editor. A new tab will open.
- 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);
}- Replace
PASTE_YOUR_WEBHOOK_URL_HEREwith the actual URL you copied from Discord. Ensure you keep the quotation marks around the URL. - 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.
- In the Apps Script editor, click the Triggers icon on the far left menu (it looks like a small alarm clock).
- Click the large blue + Add Trigger button in the bottom right corner.
- Set “Choose which function to run” to onSubmit.
- Set “Select event type” to On form submit.
- 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.