vanessa / hiring-assistant

📨 E-mail sending automation system using Django and Trello.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hiring Assistant

A simple Django project to send automatic e-mails whenever its index URL is called.

On this example board, there are three columns:

  • Interview phase: Ignored by the script, cards needs to be moved manually to the second column
  • To send-email: The column used to run the script, defined by env var DEFAULT_PENDING_LIST_TITLE
  • Done: The column which the script sends the cards that were processed (to avoid e-mails to be sent twice), defined by env var DEFAULT_DONE_LIST_TITLE

The assistant basically:

  1. Checks what's the value of DEFAULT_PENDING_LIST_TITLE env var, in our case it's To send e-mail
  2. Looks for the column in the board
  3. When it finds the correct column, reads all the cards and checks what have the Approved/Not approved label
  4. Parses the e-mail from the card description
  5. Sends the approval/disapproval e-mail (below) and finally...
  1. ...moves the card to DEFAULT_DONE_LIST_TITLE env var column, in our case it's Done

Running

  1. Clone the project and set up a virtual environment
  2. Install dependencies with pip install -r requirements.txt
  3. Create a .env file with the following required variables:
# SendGrid settings
SENDGRID_USERNAME='sendgrid_username'
SENDGRID_PASSWORD='sendgrid_password'

# Trello settings
TRELLO_KEY='key'
TRELLO_TOKEN='token'
DEFAULT_BOARD_ID='board_id'
DEFAULT_PENDING_LIST_TITLE='To send e-mail'
DEFAULT_DONE_LIST_TITLE='Done'
  1. Run with python manage.py runserver

Creating the IFTTT applet

It's not really useful right now because of the app isn't configured to be deployed yet. However, you can use ngrok to simulate the request.

  1. Go to New Applet
  2. As the trigger (this), select Button widget or anything you want
  3. As the action (that), select Webhooks
  4. Run ngrok (remember to point it to the Django server port, which is 8000 by default) and copy its url
  5. Set the ngrok URL provided to you as the Webhook URL
  6. Click on Create action

TODO

  • Tests
  • Disapproved flow
  • Deploy to Heroku

About

📨 E-mail sending automation system using Django and Trello.


Languages

Language:Python 100.0%