Gateway automation