Getting Started: Writing a New Automation

Walk through the process of creating a new Mesa Automation that will take all orders with an employee email account with the "staff" tag.

Mesa Script code used in this example

Input script:

Mesa.output.send('out-tag-shopify-order', payload);

Output script:

if (payload.email.includes('@theshoppad.com')) {
  Mesa.output.done({
    tags: 'staff'
  }, {
    order_id: payload.id
  });
}

Automation configuration