This repo contains the code needed to detect a letterbox activation and log it in a shared Google Sheet. The same Google Sheet is being monitored by an applet in IFTTT which sends a push notification to your phone with the IFTTT app installed whenever a new row is added to the spreadsheet.
The magnetic switch is connected between GPIO pin 18 and any ground pin. A full tutorial is coming in an upcoming edition of HackSpace magazine.