Adding data to Google Sheets Using CodelessAPI.io: A Code-Free Solution

Published on June 15, 2023

Introduction

In today's fast-paced world, data is the key to success for many businesses. However, managing and creating complex APIs can be very complicated and time consuming. That's where CodelessAPI.io comes to the rescue. With its drag-and-drop interface and powerful features, CodelessAPI.io allows you to easily build APIs without writing a single line of code. In this tutorial, we will explore how to create a POST API with Google Sheets, enabling you to create data seamlessly.

Building your Google Sheets API

  1. Signing up: Start by signing up for an account on the CodelessAPI website. Once registered, you'll gain access to a user-friendly drag-and-drop API builder.
  2. Create a new API: After logging in, navigate to your dashboard and click on 'Create new Workflowlow'. Choose a name and description that reflects the purpose of your API.
    Add new API
  3. Connecting Google Sheets as a Data Source:
    • Select your data source: Click and expand the 'Data' section on the left side bar. Expand the 'Read' section and select the 'Google Sheets' option.
      Google Sheets create data left side bar
    • Add it to the canvas: To start creating your API, drag and drop the 'Google Sheets' module from the left panel into the main canvas. This module serves as the starting point for your API, allowing you to define the data source.
      Add Google Sheets create module to canvas
    • Connect Your Google Sheets Account: Click on the 'New Google Sheets account' button and follow the authentication process to grant CodelessAPI.io access to your Google Sheets. This connection enables the API builder to retrieve and create data from your spreadsheets.
    • Add a Google Sheets Link: Once the account connection is established, click on your newly added account and then click on the 'Add new Google Sheets' button. Paste your google sheets link, along with a name and description of the Google Sheet.
      Add new API
    • Select the Spreadsheet and Worksheet: Once the spreadsheet connection is established, select the desired Google Sheets spreadsheet and worksheet from which you want to extract data.
      Add new API

Customize your data creation

You can either pass hardcoded data to your API or use data passed in your API call to create new entries in your Google Sheets.
  1. Hardcoded values:
    • Data input: Select 'Create data ' and select manual for the columns you would like to hardcode. Then enter the values within the input box provided.
      Add new API
  2. Dynamic values:
    • Start Module: To add parameters to take in via post requests to your API, click the 'Start' module on your canvas then click 'Configure'. Select 'Create data ' and select manual for the columns you would like to hardcode. Then enter the values within the input box provided.
    • Update API Post Values: Click the 'POST' option and add the values your API should accept in the body of it's POST request.
      Add new API
    • Update API Post Mappings: Go back to your Source module's configuration and select 'Create data '. Select 'map' for the columns which are will accept values from your the body of your post request. These will be the values that you just added in your Start module. From the drop down, select which post call fields you'd like to map.
      Add new API

Test and deploy your API

  1. Test your API: On the left side bar, fill out the post values and click the 'Run' button. This will trigger the built-in testing feature to validate your API endpoint and verify the API response.
  2. Deploy and utilize your API: With your newly created API, you can access your API endpoint by clicking on the 'Start' module and then clicking on the 'Configuration' option. Make sure to test your POST API using the curl command, Postman or any other tool and to pass in the body as JSON as shown in the video example.

Conclusion

With CodelessAPI.io, creating a POST API with Google Sheets has never been easier. The drag-and-drop interface, combined with the power of Google Sheets, enables you to add data seamlessly without writing any code. Whether you're a non-technical founder, a business analyst, or a developer looking to speed up your workflow, CodelessAPI.io provides a user-friendly solution to build powerful APIs. Start leveraging the potential of your data today by giving CodelessAPI.io a try.

Feel free to reach out to hello@codelessapi.io for any questions or feedback! We love hearing from you!