3 tools to enhance your email workflow
Tags: email, marketing, gulp, productivity
Published: 2018-08-06 15:54:02

---
title: 3 tools to enhance your email workflow
published: true
description: 3 tools that'll enhance your email development workflow
tags: email, marketing, gulp, productivity, 
---
![Alt text of image](https://image.ibb.co/fN8tMK/programmer.jpg)
<h3><b>#1 Use a task runner</b></h3>
Gulp's a great tool that allows you to automate any of the development work you find yourself working on each time you build a campaign. For example if you find yourself copy-and-pasting HTML code from a previous email into your next campaign, hitting ⌘+F to replace all of the previous copy with the new version, oh and you want to update the headline font-size - that's another ⌘+F. Aside from being time consuming, this workflow presents ample opportunity for human error - unclosed table cells anyone? Another pain-point in building emails this way is that code errors tend to compound over time; unlike those nice mutual funds these types of gains do not have a positive return. 

So how does a task runner help? At its core a task runner will ... automatically run tasks for you; It's as simple as that. What took hours (days for some) will only take minutes, all thanks to a task runner. When setup correctly, these automated workflows also allow you to quickly troubleshoot any errors - e.g. get notified if you're code is missing a closed table cell tags. 

<a href="https://github.com/gulpjs/gulp/blob/v3.9.1/docs/getting-started.md">See how to setup your Gulp task runner</a>

<h3><b>#2 Leverage templates</b></h3>
So you're already using a task runner? Great, the next step I'd recommend is to incorporate the use of templates. If you truly want to maximize the use of a task runner I highly recommend finding a template language that suits your development needs; I currently use <a href="https://mozilla.github.io/nunjucks/">Nunjucks</a>.

These templating languages aren't difficult to use and for the most part are easy to learn. The real power in these templating languages is in their customization. Rather than using some other person's template you can build templates for your needs and easily replicate them. Below is sample for what a basic template can look like:
```
{% extends "base.html" %}

{% block header %}
<h1>{{ title }}</h1>
{% endblock %}

{% block content %}
<ul>
  {% for name, item in items %}
  <li>{{ name }}: {{ item }}</li>
  {% endfor %}
</ul>
{% endblock %}
```
Did you see that embedded loop!? Your template can include all six rows OR you could simply use one line of code that looks up how many items your .json file is referencing and build the required rows from that - this is clutch when working on multiple projects.

<a href="https://mozilla.github.io/nunjucks/getting-started.html">Learn more on how to get started with Nunjucks</a>


<h3><b>#3 Think modules</b></h3>
Remember playing with Legos? <i>Emails are built much like those Lego kits; comprised of multiple pieces each fitting into one another.</i> Take a look at the last email you built - do you see the main areas where your content is housed? A basic email template that includes the following can be broken down into three sections - two if you want to really compress your template.

- headline
- hero image 
- body
- CTA button

 Here's how I'd break them down: 

```
- sectionBlock01 (contains headline)
- sectionBlock02 (contains hero image)
- sectionBlock03 (contains body and CTA button)
```
Using these three `sectionBlock`s I can build any email in a matter of seconds - regardless of how many rows my `sectionBlock03` contains - the loop will take care of the work. 

There you have it, 3 tools to enhance your email workflow and get you going on the right track towards becoming an efficient developer.