Git Product home page Git Product logo

random-spreadsheet-tweet-bot's Introduction

Random Spreadsheet Tweet Bot

  • ./index.js will pull a random cell value from a public Google Spreadsheet with tabletop and tweet it with twit
  • ./now.js exposes a /tweet route via express to do the same

This is running right now randomly tweeting my band's lyrics once a day: https://mobile.twitter.com/Forester_TN

configure

.env

CONSUMER_KEY=pTlxxxxxxxxxxxxxxxuoY
CONSUMER_SECRET=14tNNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxSJ1R
ACCESS_TOKEN=1097xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0NPk
ACCESS_TOKEN_SECRET=Y6k2GxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiJk2b
GOOGLE_SHEET_URL=https://docs.google.com/spreadsheets/d/1F9axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrdQo/edit?usp=sharing
GOOGLE_SHEET_HEADER=header

GOOGLE_SHEET_URL

https://www.npmjs.com/package/tabletop#if-your-publish-to-web-url-doesnt-work

GOOGLE_SHEET_HEADER

the content of your first cell (header cell)

run

npm start

deploy

now.json

You can deploy ./now.js to now but you have to create a ./now.json file, and add your now secrets

{
    "name": "MyTweetBot",
    "version": 2,
    "builds": [
        { "src": "now.js", "use": "@now/node" }
    ],
    "routes": [
        { "src": "/(.*)", "dest": "now.js" }
    ],
    "env": {
        "CONSUMER_KEY": "@secret-consumer-key",
        "CONSUMER_SECRET": "@secret-consumer-secret",
        "ACCESS_TOKEN": "@secret-access-token",
        "ACCESS_TOKEN_SECRET": "@secret-access-token-secret",
        "GOOGLE_SHEET_URL": "https://docs.google.com/spreadsheets/d/xxxxxxxxxxxxxxx/edit?usp=sharing",
        "GOOGLE_SHEET_HEADER": "header"
    }
}

random-spreadsheet-tweet-bot's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

lauravpf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.