The "email" action

Email runs everything. Mechanic sends email. So long as you're sending transactional email only, you're covered. 👌

Read more: What kind of email can I send with Mechanic?

Did you know you can receive email with Mechanic? It's true!

The email action type accepts these options:

  • The recipient (including CC and BCC)
  • The subject
  • The body
  • Reply to
  • The sender display name
  • The name of an email template to use (see our tutorial: Add an email template)
  • A set of attachments

By default, the sender email address will look like this (assuming a Shopify account domain at

To change this to an email address of your own, there are a couple quick steps to take. Learn more here.

For developers


  • "to" – required
  • "cc" – optional
  • "bcc" – optional
  • "subject" – required
  • "body" – required; allows HTML and CSS
  • "reply_to" – optional
  • "from_display_name"  – optional; will be combined with the shop's assigned sender address
  • "template" – defaults to "default"; used to specify an email template from the store's Mechanic settings
  • "attachments" – optional; an object of file names and file values


Mechanic will auto-detect file types based on file names, and attach them appropriately. For example, to attach a simple CSV, use this:

"attachments": {
  "simple.csv": "Question,Answer\nIs it simple?,Yes"

Mechanic also supports generating richer file types, like PDFs and zip files, and base64-encoded data. Read more: Generating files


  "action": {
    "type": "email",
    "options": {
      "to": "",
      "subject": "Hello world",
      "body": "It's a mighty fine day!",
      "reply_to": {{ shop.customer_email | json }},
      "from_display_name": {{ | json }}

This example hard-codes the recipient, the subject, and the body. It then uses your shop's customer service email as the "reply-to" header, and uses the shop's own name as the display name for the "from" header.

Try using Liquid filters to make using captured values easy:

{% capture email_body %}

  It's fantastic to see you!
{% endcapture %}

{% action "email" %}
    "to": "",
    "subject": "Hello world",
    "body": {{ email_body | unindent | strip | newline_to_br | json }}
{% endaction %}

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.