Giter Club home page Giter Club logo

elizabethsiegle / muni_call_email_representatives_chatbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 17 KB

Chatbot built with Twilio Functions and Twilio Autopilot using JavaScript to mass email all 11 members of the SF County Transportation Authority telling them to defund SFPD and redirect the funds to Muni so the city does not lose 40/68 bus lines!!

Home Page: https://t.co/jkycSPMkf2?amp=1

JavaScript 100.00%
civic-tech politics sanfrancisco javascript twilio twilio-sms-api twilio-sms sendgrid sendgrid-api nodejs

muni_call_email_representatives_chatbot's Introduction

Mass Call and Email your Representatives via SMS

header img This repo contains code to make a civic-minded chatbot to mass call and email SF County Transportation Authority representatives using

You need three things:

Test it out

Text +14153068517 something like a greeting or "don't defund muni". text sms example bot

Where does each file in this repo go to make bulk/mass calls and emails?

You need to make a Twilio Autopilot bot. Replace the code in the Greeting task with the code in greeting.json. Then make a task Call and replace that JSON with the code in call.json. That JSON task redirects to a Twilio Function that contains the JavaScript code in call.js. It is there that calls are made to a JS object containing the SFCTA members and their phone #s, passing in a TwiML bin URL that contains the XML in call.xml.

To email, make a task in your Autopilot bot console called email and replace that JSON code with the code in email.json. That redirects to a second Twilio Function that contains the JavaScript code in email.js. email.js also has the option to send an email receipt. Make a task in your Autopilot bot console called email_receipt that contains the JSON code in email_receipt_collect.json that asks if the user would like an email receipt and redirects to a third Twilio Function that contains the code in email_receipt_check.js checking if they sent "yes" or "no". If they sent "no", they are given a list of resources. Else if they sent "yes", that Function then redirects to a different Autopilot task that contains the JSON in email_receipt_send.json to ask for the user's email and redirects to a fourth and final Twilio Function that contains the code in email_receipt_send.js.

image receipt

Who is called and emailed?

The SF County Transportation Authority board. Many are also on the SF board of supervisors.

Here's to more civic-minded tech, and saving mass public transit!

muni_call_email_representatives_chatbot's People

Contributors

elizabethsiegle avatar

Watchers

 avatar  avatar

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.