Contact Form with Next.js and Notion API

Next.jsNotion APIRedisZod

Build a contact form using Next.js that stores messages in a Notion database with validation and security best practices.

Posted by Felipe Giraldo


Introduction

A contact form is essential for any website. In this article, you'll learn how to store form submissions directly in Notion.

Form Flow

  1. User submits the form
    1. Data validation with Zod
      1. Store message in Notion
        1. Send feedback to the user

          Security

          • Input validation
            • Rate limiting
              • Error handling

                Conclusion

                Notion provides a simple and powerful backend for contact forms.


                © 2026 Felipe Giraldo