How to add Instagram posts to a Klaviyo email template
Behold Klaviyo widgets make it simple to add dynamic Instagram galleries to your Klaviyo email campaigns.
Business plan required
All users can build and preview Klaviyo widgets in the Behold admin, but a Business plan or greater is required to deploy.
How it works
Whenever your email campaign is sent, the latest Instagram posts in your feed at that moment are pulled and added to your email.
If you make changes to your widget previously sent emails will not be updated, but your changes will be included in future sends.
1. Create a Klaviyo feed in Behold
This guide assumes that you’ve already created a free account and connected a source.
- Go to the feeds page and click + Add Feed.
- Choose either User or Hashtag
- Select a source for your feed
- When asked what kind of output you want, select Klaviyo
- Pick a name for your feed, click Create feed, and you’re all set!
2. Customize your feed
Now that you’ve created a feed, there are a number of customization options.
Other than filters, these options can be applied separately to Desktop and Mobile versions of your email, or linked to show the same style on all devices.
Settings: Filter
Allowed post types
This setting lets you choose which post types to include in your feed, from among images, videos , reels and albums.
Caption must include
Only posts that contain at least one of the text snippets you add here will be included in your feed. This is case-sensitive and can include spaces.
Caption may not include
Only posts that do not contain any of the text snippets you add here will be included in your feed. This is case-sensitive and can include spaces.
Hashtag feeds can take a few minutes to preload when combined with this setting.
Tip
Since #hashtags and @mentions are part of the post caption, the caption include/exclude settings can be used to limit your feed to posts that contain or do not contain specific hashtags or mentions.
Number of Posts
The maximum number of recent posts to fetch. Set this only as high as you need. Smaller = faster.
This number is limited by your plan. See the pricing page for details.
Settings: Layout
# of columns
The number of columns your posts will be arranged into. Columns are automatically sized to fit the width of the widget.
Column gap
The space (in pixels) between columns of posts.
Row gap
The space (in pixels) between rows of posts.
Settings: Appearance
Rounded corners
Applies a percentage-based rounding to the corners of your widget posts. If you set this to 100% your posts will be cropped into circles.
Settings: Link
On click
Determines what happens when someone clicks on a post in your widget.
- Link to post: Navigate to the original post in Instagram
- Link to profile: Navigate to the user profile page in Instagram
- Custom link: Navigate to a custom link, set in the Custom link URL field
- Do nothing: No click behavior
Custom link URL
Only available when the On click option is set to “Custom link”. Sets the URL widget posts will link to.
3. Import your Instagram feed into Klaviyo
For this step you’ll need your Feed URL and Feed name handy. To get them:
- Open your Klaviyo feed from the Behold feeds page and click on Add to Klaviyo.
- Your Feed name, Feed URL and Embed code (you’ll need that in the next step) will be displayed on the left
Next, we’ll import your data as a Web feed in Klaviyo.
- Log in to Klaviyo
Navigate to Settings / Other / Web feeds: https://www.klaviyo.com/settings/other/web-feeds
Click on Add web feed
- In the Feed name field, paste in the Feed name from Behold
- In the Feed URL field, paste in the Feed URL from Behold
Request Method should be GET. Content Type should be JSON.
Click Add Data Feed. Your feed should validate and get added to Klaviyo.
Click preview. Your feed should look like the last image below.
4. Add your feed to an email template
Finally, let’s add your feed to an email template. To start go to Content / Templates in Klaviyo (https://www.klaviyo.com/templates/list), and either select an existing template or add a new one. Next, add your Behold widget:
- Add a new Table block to your template. We use a table to get around a long-standing bug in Klaviyo.
- Go to Table settings and click on the trash can icon to remove one of the columns. Make sure the column you have left contains a text block, and that Show on Desktop and Mobile is selected.
- Scroll to the bottom of Table settings and set all padding values to 0 (unless you want padding)
- Go to the Content tab of your table, enter the source code editor by clicking on the
</>
icon. Paste the Embed code you got from Behold in the previous section. - That’s it! A placeholder will appear in the editor screen, and you can see how it will look in your emails by clicking on the Preview & test button.
Reusing across emails
If you want to add the same Behold feed to multiple different email templates, you can save your email feed section as “universal content” by following the steps in this article.
That’s it! If you run into issues, send us an email: support@behold.so.
We respond quickly!