Email customers when created, with Mechanic.

Mechanic is a development and ecommerce automation platform for Shopify. :)

Email customers when created

Use this task to send a quick welcome email to customers, when they sign up or are otherwise created in your shop. Optionally, filter by customer tag to only send welcome emails to certain customers.

Runs Occurs whenever a customer is created. Configuration includes required customer tag, email subject, and email body.

15-day free trial – unlimited tasks

Documentation

Use this task to send a quick welcome email to customers, when they sign up or are otherwise created in your shop. Optionally, filter by customer tag to only send welcome emails to certain customers.

This task will send out your email to any customer when their account is created. This can happen when a customer signs themselves up, when you create their customer record within the store, when a new customer places an order, or for any other reason that a customer record is created.

Developer details

Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Shopifolks, everybody.

That’s why we make it easy to configure automation without code, why we make it easy to tweak the underlying code once tasks are installed, and why we publish it all here for everyone to learn from.

(By the way, have you seen our documentation? Have you joined the Slack community?)

Open source
View on GitHub to contribute to this task
Subscriptions
shopify/customers/create
Tasks use subscriptions to sign up for specific kinds of events. Learn more
Options
required customer tag, email subject (required), email body (multiline, required)
Code
{% assign customer_qualifies = false %}

{% if options.required_customer_tag == blank %}
  {% assign customer_qualifies = true %}
{% else %}
  {% assign customer_tags = customer.tags | split: ", " %}
  {% if customer_tags contains options.required_customer_tag %}
    {% assign customer_qualifies = true %}
  {% endif %}
{% endif %}

{% if customer.email == blank %}
  {% assign customer_qualifies = false %}
{% endif %}

{% if event.preview or customer_qualifies %}
  {
    "action": {
      "type": "email",
      "options": {
        "to": {{ customer.email | default: "customer@example.com" | json }},
        "reply_to": {{ shop.customer_email | json }},
        "from_display_name": {{ shop.name | json }},
        "subject": {{ options.email_subject__required | json }},
        "body": {{ options.email_body__multiline_required | strip | newline_to_br | json }}
      }
    }
  }
{% endif %}
Task code is written in Mechanic Liquid, an extension of open-source Liquid enhanced for automation. Learn more