Trigger action to automate cleaning robot

Hi All,

I’m Alex, I’m not new with smartthings and I work in IT then i can understand code.
Let me go directly to the point.
I’m trying to automate cleaning robot in my home with Roomba; I know, or i didn’t find any app to do that then I tried with WebCore + IFTTT

I want to trigger robot to clean specific room only after someone pass a lot of time in this room and leave it.
For that I’m using smartthing motion sensor for trigger the present status, then virtual switch to trigger the robot.

I create a code in webcore like this:

if motion-sensor stay in active for 10 minutes
if motion sensor change to inactive
Virtual Switch
wait 1 minutes
turn on
wait 1 minutes
turn off

In IFTTT when virtual switch is on trigger robot to clean room

The last turn off in smartthing is to avoid the switch still on and doesn’t trigger any future actions.

The problem is it’s not working, but if i push manually virtual switch it’s works.
Some one can help me, I made some mistake?
There is another way to do that? I tried also with Amazon Alexa, but she only trigger to clean all home.

Thank you for help me

All the Best