Skip to content

Instantly share code, notes, and snippets.

@mweslander
Forked from jmolivas/script.js
Created April 8, 2019 18:13
Show Gist options
  • Select an option

  • Save mweslander/331934ff08445d4088d777d8a91cc8ca to your computer and use it in GitHub Desktop.

Select an option

Save mweslander/331934ff08445d4088d777d8a91cc8ca to your computer and use it in GitHub Desktop.
Trigger Netlify build from a Google Spreadsheet
# From your Google Spreadsheet, select the menu item Tools > Script editor.
# Copy and paste this code.
# Replace uuid with the build_hooks uuid from your Netlify project.
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Scripts')
.addItem('Build', 'build')
.addToUi();
}
function build() {
UrlFetchApp.fetch('https://api.netlify.com/build_hooks/uuid', {
'method': 'post',
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment