I did this with a Particle Internet Button and IFTTT. Depending on how handy you are, you can do this with just a Particle Photon and a switch, which would bring the cost down to a little over $19, but the Particle Internet Button is prebuilt and has lights and a plastic case.
You need to load the code on using a web page–it doesn’t come pre-loaded.