Skip to content

Webhook 429 error in google scripts #8411

Description

@ModerateWinGuy

Description

Im running a very simple script triggered by a google form being filled out, pretty much like this:
`const POST_URL = "https://discord.com/api/webhooks/YourDetails";

function onSubmit(e) {
const options = {
"method": "post",
"headers": {
"Content-Type": "application/json",
},
"payload": JSON.stringify({
"content": "‌",
"embeds": [{
"title": "Form",
"color": 33023,
"fields": {
"name":"TEST",
"value": "TEST",
"inline": false
},
"footer": {
"text": "Woo!"
},
"timestamp": new Date().toISOString()
}]
})
};

UrlFetchApp.fetch(POST_URL, options);

};`

It had run fine for years, but recently whenever it runs it returns:
Exception: Request failed for https://discord.com returned code 429.

I can't be being rate limited, because this runs maybe once a week and errors every time.

Steps to Reproduce

Create google form triggered app script, copy the above script and put in a discord webhook url and run

Expected Behavior

It should post to the webook

Current Behavior

429 error

Screenshots/Videos

No response

Client and System Information

Chrome
Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions