Getting started with External feeds

Here you can get to know about the working and handling the external feeds. Below are some methods to include an external feed in your emails.

Working with External feeds

You can create an external feed using the API endpoint in the public API reference.

There are two ways to connect the external feeds with the email templates which are:


Html editor

To add in html code, use this code below, before the html body.

<!--feed.myvariable : {{feed.get("feedname")}}-->

where myvariable is variable name used to access feed data and feedname is the name of the feed you have setup via the API endpoint.


Drag and drop editor

For the drag and drop editor, you should be in developer mode. Add the code mentioned below, at the start of the template in the developer mode.

feeds:
  -
    name: myvariable
    source: feedname

where myvariable is variable name used to access feed data and feedname is the name of the feed you have setup via the API endpoint.

Accessing external feeds in email

To access the data from the external feeds, you have to utilize the code below:

{{ feed.myvariable.field }}
{{ feed.myvariable.field.0.item }}

field is any field in the JSON and to access any item we suffix a number which starts from 0.

Errors in external feeds

Errors may occur at various steps when using an external feed. If an error is encountered for a particular contact, that contact will be skipped from receiving the email campaign. If there is a general error that applies to all contacts, then all recipients will be skipped, and the reasons can be viewed in the email report.

Some common errors that can be encountered include:

  • The external feed either does not exist or its definition is incorrect in the template.
  • External feed placeholders are defined incorrectly in the template.
  • An API issue prevents access to the external feed.