In my career I’ve been tasked with building landing pages to capture user interest in a product or application. We’d want details from potential users, such as their name, and email address and phone number to contact them when the app was ready.

You could choose to use a Google Form but you’re left with a page that looks like a Google Form then. As I showed in my last post, using the Google Spreadsheet API with Ruby is nice and straightforward. So here’s how you can build your own landing page using the Google Spreadsheet API and Ruby.

Getting started

First up you’re going to need a new spreadsheet to save your data in. Create one in your Google Drive. You’ll also need a service account that you can authorise to edit your sheet on your application’s behalf. Follow the instructions from the previous post to setup your service account. Hold on to the JSON file with your credentials for now.

If you followed the previous post, do not forget to give edit access to the service account for your new spreadsheet. Open the spreadsheet, click share in the top right and paste the email address from your client_secret.json file.

I’ve created a template project with some view files to get us going for this post. Clone or download the template now.