Create a CRUD REST API with Google Sheets Database
Simple REST API with Google Sheets
Introduction
This workflow template demonstrates how to quickly and easily create a simple REST API using n8n and a Google Sheet as a no-code database. It's a perfect starting point for building a backend for small applications, prototypes, or internal tools without writing any code.
Purpose
The purpose of this template is to provide a complete, ready-to-use n8n workflow that handles all fundamental CRUD (Create, Read, Update, Delete) operations. The workflow uses a single Webhook trigger to handle POST, GET, PUT, and DELETE requests, allowing you to manage data in your Google Sheet through standard API calls.
Setup Instructions
To get started with this template, follow these steps:
Prepare your Google Sheet: Create a new Google Sheet and add the following column headers in the first row: name, email, and status. You can use this example Google Sheet as a starting point. This sheet will serve as your database. Authenticate: In the n8n workflow, connect your Google Account credentials to the Google Sheets nodes. Select your data: Choose the Google Sheet and the corresponding sheet name from the drop-down lists in each of the Google Sheets nodes. Activate: Save and activate the workflow. Test the API: Use a tool like curl, Postman, or Insomnia to test your new API endpoints. The base URL will be your n8n webhook URL followed by /items.
Example curl Commands: POST (Create):** curl -X POST YOUR_N8N_WEBHOOK_URL/items -H "Content-Type: application/json" -d '{"name": "Alice", "email": "alice@example.com", "status": "active"}' GET (Read All):** curl -X GET YOUR_N8N_WEBHOOK_URL/items/all GET (Read Single):** curl -X GET YOUR_N8N_WEBHOOK_URL/items?id=2 PUT (Update):** curl -X PUT YOUR_N8N_WEBHOOK_URL/items?id=2 -H "Content-Type: application/json" -d '{"status": "inactive"}' DELETE (Delete):** curl -X DELETE YOUR_N8N_WEBHOOK_URL/items?id=2
For more detailed instructions, including building the workflow in n8n, check out the full blog post: Build a Simple REST API in 10 Minutes with n8n & Google Sheets
Related Templates
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
Bulk Automated Google Drive Files Sharing and Direct Download Link Generation
This N8N workflow automates the process of sharing files from Google Drive. It includes OAuth2 authentication, batch pro...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments