Make flow function with autorun