My first Custom Slack App - Part 1  
Tags: node, slack, googlespreadsheet, javascript
Published: 2019-05-20 05:36:03

---
title: My first Custom Slack App - Part 1  
published: true
description: Creating your free Custom Polling Slack app using google spreadsheet as database and some server as our host for NodeJS Application.
tags: #NodeJS,#Slack,#GoogleSpreadSheet,#Javascript
---
# Blogs in the Series
| Part 	| Description                                                   	|
|------	|---------------------------------------------------------------	|
| 1    	| [Setting the backend](https://dev.to/nabheet/my-first-custom-slack-app-part-1-4o6j)                                           	|
| 2    	| [Setting the API server to talk to Backend as well as frontend](https://dev.to/nabheet/my-first-custom-slack-app-part-2-28p5) 	|
| 3    	| [Setting the Frontend to talk to API server ](https://dev.to/nabheet/my-first-custom-slack-app-part-3-4ahh) 	|
| 4    	| Deploying the app to something permanent	|
| 5    	| Research on deploying to slack app store	|
|
# Background 
This is my first blog post here, but i have been silently learning a lot from this great community. So finally i thought its is the time to give back to the community which has given us so much. Off late i have been using [slack](https://slack.com/intl/en-in/) to work closely. Recently there was a need to get some group members opinion on some questions came up. 
![](https://thepracticaldev.s3.amazonaws.com/i/qxec8n0nqicsjmxmcieu.png)
As always i tried with few of the already existing slack applications such as [simple poll](https://technologylearners.slack.com/apps/A0HFW7MR6-simple-poll) but sadly none of it is free as can be seen below.
![](https://thepracticaldev.s3.amazonaws.com/i/rqi2r8rpc1kkkg0mijqy.png)

So i thought of we are the developers why can't we make a custom free poll [app](https://api.slack.com/slack-apps). This will have two benefits one  So this and next set of blogs will be about sharing my experience while doing the same, with a hope it might help someone like me. I will share the code also so that anyone can adapt as per his/her own needs. So lets begin:)

# How we are planning to built?
Since we want our app to be mostly running free, I thought of doing as below.
* A backend using [google spread sheet](https://www.google.com/sheets/about/) to store the results.
* Our custom [NodeJS](https://nodejs.org/en/) app hosted somewhere free which talks to both [google spread sheet](https://www.google.com/sheets/about/) as well the [slack](https://slack.com/intl/en-in/) app.
* Custom [slack](https://slack.com/intl/en-in/) app to talk to our [NodeJS](https://nodejs.org/en/)  api.
![](https://thepracticaldev.s3.amazonaws.com/i/to7rxcovn0wcukcayoks.png)

# Setting up the backend

So in this first part we will be setting up our Google Spreadsheet set up and API's which can be consumed by the [NodeJS](https://nodejs.org/en/) app in upcoming blogs.

[Google cloud platform](https://cloud.google.com/) provides us with free 300$ credit which are sufficient enough to run things for a year. So lets keep the ball rolling and get our [google spread sheet](https://www.google.com/sheets/about/) backend up and running
1. Create your free [GCP](https://cloud.google.com/free/) account
![](https://thepracticaldev.s3.amazonaws.com/i/x4s0nvhbgw31us0pjxqk.png)
2. Login to the [console](https://console.cloud.google.com)-> Choose API and Services-> Dashboard -> Click on Enable API & Services-> Search for Google Spreadsheet -> Enable the Google Spreadsheet API
![](https://thepracticaldev.s3.amazonaws.com/i/twca74233tlljqz4u8iu.png)
3. Save the private key file which is generated after you have enabled the API. This will be used by our NodeJS app to talk to the the backend.
![](https://thepracticaldev.s3.amazonaws.com/i/uea8iff8sizt1e0t12nv.png)
4. Create a [spreadsheet](https://docs.google.com) with columns as you need.Note down the spreadsheet id which you will need to refer in NodeJS 
backend in coming blogs.
![](https://thepracticaldev.s3.amazonaws.com/i/0gl9ernigwvdwxtctb42.png)


# What is next?

So now our backend is ready, the next step is to get our NodeJS app i[ and running which will be interacting with both frontend as well backend. In next blog we will be discussing about the same. Please feel free to provide your feedback.