Google Form to Discord

Send Google Form Submissions to a Discord Channel


1) Make channel in the Discord where your Google Form results should go, and create a webhook for that channel.
Copy the webhook and paste it in a text file for safe keeping. A webhook looks similar to the following:
https://discord.com/api/webhooks/775733079481253898/XO-qFzh8uHGwaqRaWf2XGNI-hMp-Q0xqE7iLRVIXyaq2vNYqIAx3vMFJujiHgT0cR6Dp







2) Make a Google Form at https://docs.google.com/forms and give the form a title.
On the Google Form, click the 3 dot menu in the upper right corner, and choose Script Editor:




3) Give the script a title, and delete any contents that Google has filled in to the script for you.


4) Paste the following content in the script, substuiting YOUR-WEBHOOK-GOES-HERE with the webhook you created in step 1:
function onSubmit(e) {
var discordPayload = {
content: 'Form submitted',
embeds: [{
type: 'rich',
title: 'Form submission',
color: 7506394,
fields: []
}]
}
e.response.getItemResponses().forEach(function(i) {
var v = i.getResponse() || 'None'
discordPayload.embeds[0].fields.push({ name: i.getItem().getTitle(), value: v })
})
UrlFetchApp.fetch('YOUR-WEBHOOK-GOES-HERE', {
method: 'post',
payload: JSON.stringify(discordPayload),
contentType: 'application/json'
})
}




5) In the Script Editor menu, choose Edit > Current projects triggers and click "Add Trigger".


Set the trigger fields to look like the following and click save:



Thats all! When someone fills out the form, the results will be sent to to the channel in your Discord, you created in step 1.