Trouble programming esp8266

I am trying to replicate Adafruit mqtt example project and using Google assistant along with IFTTT app. Which works fine for switching relay. Now I want it to work like this---

When I say turn on the relay, it should turn for a specific period of time,say 10s.Then it should turns off automatically.
The problem with Adafruit io is that it can send either 0 or 1. Can the action be delayed . Or it would be more Appropriate to ask, can I perform multiple action with a single command. Please help me with the codes if that can be done.

Codes: Adafruit mqtt Esp8266 example.

can I perform multiple action with a single command.

If you mean can you perform multiple actions on the ESP8266 on receipt of a command then the answer is yes, of course.