LogoLogo
HomepageDocumentationGet FeedOtter
  • Welcome to FeedOtter
  • Automated Newsletters
    • Getting Started
      • Marketo Sending
      • Pardot Sending
      • Eloqua Sending
      • SFMC Sending
      • HubSpot Sending
      • MailChimp Sending
      • Active Campaign Sending
    • Scheduling Your Send
      • Require New Content to Send
      • Intervals
    • Features
      • Last Send Date
      • Send Now
      • Sending History
      • UTM Parameters
      • Custom Subject Lines
      • Notifications
      • Multiple Feeds
        • Merging Feeds
        • Pulling in External JSON/XML Data
  • Curated Newsletters
    • Getting Started
      • Newsletter Defaults
      • Adding Content Sources
      • Create your first curated issue
      • Test, Review, and Publish your curated email newsletter
    • Publishing
      • Publishing to Marketo
        • Create a New Email Program and Email
        • Create a New Email in Marketo
        • Schedule an Email Program Send From the FeedOtter Interface
      • Publishing to Pardot
      • Publishing to Eloqua
        • Create a New Email and Schedule a Send
        • Create a New Email
        • Update an Existing Email
        • Issue Naming
      • Publishing to HubSpot
      • Publishing to MailChimp
      • Publishing to HTML
    • Tags
    • Bookmarking Content
    • Content Sources
      • Google Sheets
      • YouTube
      • Algolia
      • WordPress API
      • UberFlip
      • JSON / XML API
        • Custom Data Fields
    • Troubleshooting
      • Marketo Duplicate Object Naming
      • Marketo Emoji Support
      • MailChimp From Address
      • Pardot emails are missing a required Unsubscribe or Preference Center tag
  • Integrations
    • Getting Started
    • Marketo
      • How to Set Up Your Marketo Integration
      • FAQ
        • Email Reporting
        • Sending in Recipient Time Zone
        • Marketo Data Access
        • Custom Marketo Program Naming
        • Branded Domain and IP Settings
      • Troubleshooting
        • How do I reset my Marketo Automated Campaign
        • Marketo Error: Program with the same name exists
        • Marketo error: Daily quota '50000'
        • Marketo Error: Invalid request. Please check and try again.
        • Curated Issue Fails to Publish
          • FeedOtter Can Not Approve Marketo Template
          • Marketo rejects Duplicate Name
      • Exporting a FeedOtter email into Marketo
    • Pardot / Account Engagement
      • How to Set Up Your Pardot Integration
      • FAQ
        • Salesforce IP Whitelisting
        • Where Can I Find My Pardot Business Unit ID?
        • Pardot Data Access
        • Advanced Settings
          • Set Up a User for Integration
      • Troubleshooting
    • Eloqua
      • How to Set Up Your Eloqua Integration
      • FAQ
        • Custom Email and Campaign Naming
        • Custom Field Setup
        • Updating Eloqua Canvas Email
        • Eloqua Data Access
        • VMTA and BBE
    • Salesforce Marketing Cloud
      • How to Set Up Your SFMC Integration
      • FAQ
        • SFMC Tracking Code
        • SFMC Resources and Links
      • Troubleshooting
    • HubSpot
      • How to Set Up Your HubSpot Integration
      • FAQ
      • Manually publish an email to HubSpot
    • MailChimp
      • How to Set Up Your MailChimp Integration
    • ActiveCampaign
      • How to Set Up Your ActiveCampaign Integration
    • Microsoft Dynamics Marketing
      • How to Set Up Your MS Dynamics Integration
  • Email Templates
    • Getting Started
      • Custom Template
        • HTML Email Guidelines
          • In-Depth HTML Email Guidelines
        • Custom Template Resources
          • ESP Template Use
            • Export a Marketo Template for Use in FeedOtter
            • Export a Pardot Template for Use in FeedOtter
            • Export a HubSpot Template for Use in FeedOtter
            • Export an ActiveCampaign Template for Use in FeedOtter
        • Where to Access Template Code
        • Getting Started with FeedOtter Templates
          • Creating a Basic Email Template
          • Advanced Email Templates
            • Slicing loops
            • Multiple Feed Emails
            • Email With Columns
            • Conditionals
            • Filters
              • Image Resize Filter
              • Date Formatting Filter
              • Text Manipulation Filters
              • Other Handy Filters
            • Non-RSS XML values
            • Custom fields
            • Display a Full Article in Your Email
          • Curated Email Setup Best Practices
            • Curated Newsletter Sections
      • Element Customization
        • About Email Images
    • FeedOtter Tokens
    • ESP-Specific Tokens
      • Marketo Tokens
        • Using Marketo Tokens in the From and Reply-To
      • Pardot Tokens
        • Pardot Merge Token Reference
      • Eloqua Tokens
      • SFMC Tokens
      • HubSpot Tokens
      • MailChimp Tokens
      • ActiveCampaign Tokens
  • Account Management
    • Account Information
    • Company Details
    • Manage Users
      • Adding Users
      • User Roles
      • Campaign Permissions
      • Transfer Ownership
      • Disabling Users
    • Security
      • Enable SSO in Your Account
        • Enable SSO With Okta as the Identity Provider
        • Enable SSO with a Generic Identity Provider
        • Enable SSO with Azure AD as the Identity Provider
        • Enable SSO with OneLogin as the Identity Provider
      • Account Level 2FA
    • Billing
      • Update Your Payment Card
      • View Account Usage
      • View Receipts
      • Change Your Subscription Plan
  • FAQ
    • How to manually publish a curated newsletter
    • WordPress RSS Feed Reference
    • How to find your RSS feed
    • Help with HTML encoding
    • My automated email did not send as expected
    • How do I hard refresh my browser?
    • How to Remove "This Post First Appeared" from Your Blog's RSS Feed in WordPress
    • Whitelisting FeedOtter
    • Whitelist FeedOtter on CloudFlare
    • How do I contact support?
    • Red Dot: Campaign Status
      • Confirm your RSS Feed is valid
      • Confirm your integration is still connected
Powered by GitBook
On this page
  • Original HTML Email Template
  • Content Loop Placement
  • Adding Post Tokens
  • Loop and Tokens in Place
  • Full Code
  1. Email Templates
  2. Getting Started
  3. Custom Template
  4. Getting Started with FeedOtter Templates

Creating a Basic Email Template

Learn how to create a custom FeedOtter email template with LOOP code, post tokens, and testing for optimal performance.

Last updated 4 months ago

Before getting started, please make sure to review the detailed HTML email guidelines:

Once you understand the fundamentals of a and its requirements, we’ll build on that knowledge by inserting our LOOP code into an existing email and adding common tokens to display post data in the desired location.

Original HTML Email Template

Here is a plain HTML email template. Our logo and footer text are coded in place and our email team created some fake placeholder content.

Content Loop Placement

View the HTML code of your template and look for a suitable <table> or <tr> that wraps around the first row of content. This will vary by email but it is very important to look up and down the HTML tree to find the most-outward row or table that encloses the region of content you wish to repeat.

Place the loop start code above the repeating area's opening HTML tag:

<!--## [% for post in feedotter.posts %] ##-->

and the end loop code after the related closing tag.

<!--## [% endfor %] ##-->

This is a technical job and requires knowledge of basic HTML structure, opening and closing tags. If the loop code is placed in the wrong place your template will never work correctly or compatibility may suffer. If you are unsure where to place this code please ask for help from your HTML email coder.

Once you have placed the FeedOtter loop around a row of content you can delete all other rows. Since we are looping through the content only 1 article row, wrapped in the loop code is needed.

Now our email looks like this:

Adding Post Tokens

Adding Post Tokens inside our loop will allow FeedOtter to display your articles content. Here are the common tokens used.

Paste the appropriate token into your HTML email code in-place of the placeholder data.

The Most Common Post Loop Tokens

Merge code
Description and Usage

[[post.post_title]]

The title of an article.

[[post.post_excerpt_text]]

The description text or slug for an article. This value is automatically created by using the best option between the Description text and Content. All incoming HTML is stripped.

[[post.post_url]]

The website URL of the article.

[[post.image_url]]

The best featured image that represents the article as chosen by our algorithm. Learn more about how FeedOtter selects campaign

images here.

The [[post.image_url]] token is not relevant to the example template we are displaying but it is very common to use this to display a great looking featured image with each article.

Loop and Tokens in Place

With the loop and tokens in place our HTML email look like this:

...and if we preview it in FeedOtter's interface we can see our loop and tokens successfully merging with real content.

Full Code

Here is the full code example of the finished email. Paste this example below into your FeedOtter account(see Moving your email template to FeedOtter to learn how) to see how our loop and tokens appear when used with FeedOtter.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<title>[[feedotter.company_name]]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0 " />
<meta name="format-detection" content="telephone=no"/>
<style type="text/css">
body {
    margin: 0 auto;
    padding: 0;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    -webkit-font-smoothing: antialiased !important;
}
img {
    border: 0 !important;
    outline: none !important;
}
p {
    Margin: 0px !important;
    Padding: 0px !important;
}
table {
    border-collapse: collapse;
    mso-table-lspace: 0px;
    mso-table-rspace: 0px;
}
td, a, span {
    border-collapse: collapse;
    mso-line-height-rule: exactly;
}
.ExternalClass * {
    line-height: 100%;
}
.em_defaultlink a {
    color: inherit;
    text-decoration: none;
}
.em_defaultlinku a {
    color: inherit;
    text-decoration: underline;
}
.em_g_img + div {
    display: none;
}
a[x-apple-data-detectors], u + .em_body a, #MessageViewBody a {
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    line-height: inherit;
}

@media screen and (max-width: 649px) {
.em_main_table {
    width: 100% !important;
}
.em_wrapper {
    width: 100% !important;
}
.em_hide {
    display: none !important;
}
.em_full_img {
    width: 100% !important;
    height: auto !important;
}
.em_full_img img {
    width: 100% !important;
    height: auto !important;
}
.em_center {
    text-align: center !important;
}
.em_left {
    text-align: left !important;
}
.em_side10 {
    width: 10px !important;
}
.em_aside10 {
    padding: 0px 10px !important;
}
.em_side15 {
    width: 15px !important;
}
.em_aside15 {
    padding: 0px 15px !important;
}
.em_ptop {
    padding-top: 20px !important;
}
.em_pbottom {
    padding-bottom: 20px !important;
}
.em_p10 {
    padding: 10px !important;
}
.em_p15 {
    padding: 15px !important;
}
.em_plrb15 {
    padding: 0px 15px 15px 15px !important;
} /* Padding Left Right Bottom */
.em_h20 {
    height: 20px !important;
    font-size: 1px!important;
    line-height: 1px!important;
}
.em_h30 {
    height: 30px !important;
}
.em_bg_none {
    background-image: none !important;
}
.em_mob_block {
    display: block !important;
}
.em_hauto {
    height: auto !important;
}
.em_clear {
    clear: both !important;
    width: 100% !important;
    display: block !important;
}
u+.em_body .em_full_wrap {
    width: 100%!important;
    width: 100vw!important;
}
.em_ptop30 {
    padding-top: 30px !important;
}
.em_pbottom30 {
    padding-bottom: 30px !important;
}
}
</style>
</head>
<body class="em_body" style="margin:0px auto; padding:0px; background-color:#ffffff;" bgcolor="#ffffff">
	<div class="preheader " id="Preheader"
     style="mso-hide:all;visibility:hidden;opacity:0;color:transparent;mso-line-height-rule:exactly;line-height:0;font-size:0;overflow:hidden;border-width:0;display:none !important;">
    <p style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;">Prehader Text Goes Here... FeedOtter has a token you can use for this as well!</p>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="em_full_wrap" bgcolor="#ffffff" style="background-color:#ffffff; table-layout:fixed;">
  <tr>
    <td align="center" valign="top"><table align="center" width="650" border="0" cellspacing="0" cellpadding="0" class="em_main_table" style="width:650px; table-layout:fixed;" bgcolor="#ffffff">
        <!-- == Logo_Image Section == -->
        <tr>
          <td valign="top" align="center"><table width="650" border="0" cellspacing="0" cellpadding="0" align="center" style="width: 650px;" class="em_wrapper">
              <tbody>
                <tr>
                  <td width="25" style="width: 25px;" class="em_side15">&nbsp;</td>
                  <td valign="top" align="center" style="padding-top: 30px; padding-bottom: 52px;" class="em_pbottom30"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tbody>
                        <tr>
                          <td valign="top" align="left"><a href="https://www.feedotter.com" target="_blank" style="text-decoration: none;"><img src="https://fodevuc.sfo2.cdn.digitaloceanspaces.com/ee6f25117bf6/5eaa66a2-4e3f-11ed-8c71-ee6f25117bf6.png" width="220" alt="FeedOtter newsletter" style="display: block; border: 0px; max-width: 220px; font-family: Arial, sans-serif; color: #000000;" class="em_g_img" /></a></td>
                        </tr>
                      </tbody>
                    </table></td>
                  <td width="25" style="width: 25px;" class="em_side15">&nbsp;</td>
                </tr>
              </tbody>
            </table></td>
        </tr>
      
		
<!--## [% for post in feedotter.posts %] ##-->


        <tr>
          <td valign="top" align="center"><table width="650" border="0" cellspacing="0" cellpadding="0" align="center" style="width: 650px;" class="em_wrapper">
              <tbody>
                <tr>
                  <td width="25" style="width: 25px;" class="em_side15">&nbsp;</td>
                  <td valign="top" align="center" style="padding-bottom: 50px;" class="em_pbottom30"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tbody>
                       
                        <tr>
                          <td valign="top" align="left" style="" class="em_defaultlink">
                          <a href="[[post.post_url]]" target="_blank" style="text-decoration-line: none; font-family: Helvetica, Arial, sans-serif; color: [[feedotter.button_color]]; font-size: 18px; line-height: 21px; font-weight: 700; padding-bottom: 10px;">
                          [[post.post_title]]</a></td>
                        </tr>
                        <tr>
                          <td valign="top" align="left" style="font-family: Helvetica, Arial, sans-serif; color: #000; font-size: 15px; line-height: 21px; font-weight: 400; padding-bottom: 10px;" class="em_defaultlink">[[post.post_excerpt_text]]</td>
                        </tr>
                        <tr>
                          <td valign="middle" align="left" style="font-family: Helvetica, Arial, sans-serif; color: #000; font-size: 12px; line-height: 15px; font-weight: 700;" class="em_defaultlinku"><a href="[[post.post_url]]" target="_blank" style="text-decoration: underline; color: [[feedotter.button_color]];">Read More&nbsp;&nbsp; &#10132;&nbsp;</a></td>
                        </tr>
                      </tbody>
                    </table></td>
                  <td width="25" style="width: 25px;" class="em_side15">&nbsp;</td>
                </tr>
              </tbody>
            </table></td>
        </tr>
		<!--## [% endfor %] ##-->
        <!-- == Footer Section == -->
        <tr>
          <td valign="top" align="center"><table width="650" border="0" cellspacing="0" cellpadding="0" align="center" style="width: 650px;" class="em_wrapper">
              <tbody>
                <tr>
                  <td width="25" style="width: 25px;" class="em_side15">&nbsp;</td>
                  <td valign="top" align="center" style="padding-bottom: 40px;" class="em_pbottom30"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tbody>
                        <tr>
                          <td valign="top" align="left" style="font-family: Helvetica, Arial, sans-serif; color: #666; font-size: 14px; line-height: 16px; font-weight: 700; padding-top: 30px; border-top: 2px solid #666;" class="em_defaultlink"></td>
                        </tr>
                        <tr>
                          <td valign="top" align="left" style="font-family: Helvetica, Arial, sans-serif; color: #000; font-size: 14px; line-height: 21px; font-weight: 400; padding-top: 18px;" class="em_defaultlink">
								
<span style="color:#000;"><strong>FeedOtter</strong><br>1334 West Elm St.<br>Boulder, CO 66503<br><br>Copyright © 2022<br><a href="{{unsubscribe}}" style="color:[[feedotter.footer_text_color]];" target="_blank">Unsubscribe</a></span>
							</td>
                        </tr>
                      </tbody>
                    </table></td>
                  <td width="25" style="width: 25px;" class="em_side15">&nbsp;</td>
                </tr>
              </tbody>
            </table></td>
        </tr>
        <!-- == //Footer Section == -->
      </table></td>
  </tr>
</table>
</body>
</html>

Don't forget to read this important information if you are building a custom template for a curated newsletter:

Testing

We recommend testing your FeedOtter campaigns with a test subscriber list of contacts before sending to your real audience.

When we test internally, we set our ESP settings to target a test/internal list of subscribers:

  • Marketo - Done in Marketo on the ### - Email Setup program

  • All other ESPs - Done in the FeedOtter Integration settings

Then use FeedOtter's feature to trigger an instant send from your ESP. This will allow you to verify the full email send process and delivered email code.

Curated Email Setup Best Practices
Curated Newsletter Sections
Send Now
In-Depth HTML Email Guidelines
FeedOtter template