Github Pages

How to submit forms on Github Pages to Notion

Notion Monkey is a fantastic tool for handling form submissions with ease. Here’s a step-by-step guide on creating a static website with a contact form on GitHub Pages using Notion Monkey that saves its data in Notion:

1. Create a GitHub Repository

  • Start by creating a new repository on GitHub. You can name it anything like your-username.github.io.

2. Create Your Website

  • You can create a simple HTML/CSS website using any code editor you prefer. Below is a basic example:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Your Website</title> </head> <body> <h1>Welcome to My Website</h1> <p>This is a simple static website.</p> <form action="https://api.notionmonkey.io/form/YOUR_FORM_ENDPOINT" method="post"> <!-- Replace "YOUR_FORM_ENDPOINT" with your actual Notion Monkey form endpoint --> <label for="name">Name:</label> <input type="text" id="name" name="name" required><br> <label for="email">Email:</label> <input type="email" id="email" name="email" required><br> <label for="message">Message:</label> <textarea id="message" name="message" required></textarea><br> <input type="submit" value="Submit"> </form> </body> </html>

3. Sign Up on Notion Monkey

  • Visit Notion Monkey and sign up for an account.
  • Create a new form and take note of the form endpoint URL.

4. Replace Form Action URL

  • Replace "https://api.notionmonkey.io/form/YOUR_FORM_ENDPOINT" in the form tag with the actual form endpoint URL you obtained from Notion Monkey.

5. Commit and Push Your Code

  • Commit your changes and push them to your GitHub repository using the following commands:
git add . git commit -m "Initial commit" git push origin main

6. Enable GitHub Pages

  • Go to the settings of your GitHub repository.
  • Scroll down to the GitHub Pages section.
  • Select the main branch as the source.

7. Access Your Website

  • Your website will now be available at https://your-username.github.io.

Once you submit this form, the data will appear in the linked db like this:

Learn more about connecting your HTML forms to Notion →

Hey, that was pretty easy!

Notion Monkey is free to get started. Why not create an account and connect it with a Github Pages form? See for yourself how simple it is to start saving your form data in Notion.

Get Started for Free
Get started