Esp8266 Alexa and stepper motor

Hello, I’m fairly new to arduino and I’m in need of some help. For my intro to engineering class, my group is creating a device to close a door with the help of an echo dot (Alexa), an esp8266 and a stepper motor. I have programmed the stepper motor with an arduino mega 2560 which loops through the code to close the door and return to “zero” but have changed my mind and wanted to be a little more refined. I want to use Alexa to trigger the esp8266 run the stepper motor to turn 180 degrees and then -180 degrees. Any help would be appreciated. Thank you.