The emerging Internet of Things opens endless possibilities to the contemporary notion of smart offices, where employees can benefit for automations so that the workplace can maximize employees productivity and enterprise performance. However, usually the integration of new components in smart environments is not straightforward. In this article we propose the use of a semantic vocabulary to define this automation, and an architecture consisting of a web task automation server and mobile task automation components that enable contextual services. One the one hand, the architecture exhibits flexibility to interconnect internet services and devices. On the other side, the use of semantic technologies provides semantic interoperability and expressivity for the automation definition.