Create automation in js