Giter VIP home page Giter VIP logo

foster-plea's Introduction

Foster Plea

A Google Apps Script to build draft plea emails from a spreadsheet.

Input (Google Sheets spreadsheet):

spreadsheet

Output (draft email in Gmail):

email

Usage

This is still in development, so the steps are a bit manual and some values need to change for the final spreadsheet.

Right now, a test spreadsheet has to have the following columns, in order:

  • Type of Animal
  • Status
  • Name
  • Age
  • Physical Description
  • Plea Notes
  • Photo
  • Feeding Notes

Push the code. You can't copy and paste because the code in this repo is in TypeScript and running clasp push transpiles it to Google Apps Script. You will likely need to allow permission for the spreadsheet and Gmail.

Then, from the spreadsheet, go to Tools -> Script Editor. Click the "Select function" dropdown and select "createNeoNatalSGDraftPleaEmail". Click the play button to the left of the function dropdown to run it.

Check your email drafts. If you had it up and don't see anything, click "Drafts" to refresh the view. You should see a new draft generated by the script.

Development

Setup

Install clasp, a cli for managing Apps Script projects locally.

npm install @google/clasp -g

Actions

Login to your Google account to create a credentials file:

clasp login

Update the remote project:

clasp push

Watch the logs:

clasp logs --simplified --watch

Links

Apps Script

Spreadsheet Service

GmailApp class

Templated HTML with HtmlService

class HtmlOutput

Clasp

Clasp guide

Clasp docs

Clasp TypeScript guide

foster-plea's People

Contributors

glenwinters avatar

Watchers

 avatar  avatar

foster-plea's Issues

Loop over several feeding notes

Right now, the script filters for "SG" feeding notes. That goal was only for a POC. The email needs to have three sections based on the feeding notes.

"Independent Gruel Kittens (4-8 weeks old)"
"Syringe Gruelies (3-6 weeks old)"
"Bottle Babies (0-4 weeks old)"

Expected feeding notes for each TBD. Ask @celenawinters.

Each section will follow the same format:

<heading>
<intro>
<each kitten description>

The intro for each section is the same for every email. The first sentence is red and bold.

Add formatting to email template

  • Name and age should be larger text.
  • Name should be bold
  • Physical Description should be in a 2 cell table where the name is first and description is second.
  • Attention text should be bold and green

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.