/d/ and /edit in the URL)Embed this code where you want your widget to display.
Instructions
1. Set up a Google Apps Script
function doPost(e) {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("NAME");
const timestamp = Utilities.formatDate(new Date(), "GMT", "yyyy-MM-dd");
sheet.insertRowBefore(2);
sheet.getRange(2, 1, 1, 2).setValues([[timestamp, true]]);
return ContentService.createTextOutput("Row added successfully");
}
Copied
Embed this code where you want your button to live. Put it on a secret or private page, as anyone with access will be able to log your activity.
Note it includes HTML, JS and CSS. You may need to embed these separately depending on what platform you're using.
You could Embed the raw generated code on Notion, if you follow these steps:
Need a plain HTML page template to host it on? Grab the code below and add your generated content. You will need separate the code that was generated into HTML, CSS and JS. Add these where noted below.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PAGE TITLE HERE</title>
<meta name="description" content="PAGE DESCRIPTION HERE">
<meta name="robots" content="index, follow">
<link rel="icon" href="" type="image/x-icon">
<style>/* Generated CSS here */</style>
</head>
<body>
<header><!-- Anything for the header goes here --></header>
<main><!-- Generated HTML here --></main>
<script>// Generated Javascript here</script>
</body>
</html>
Copied
You could then host this for free on Cloudflare or similar.