# Creating a workflow email pulling blog posts by tag

**URL:** <https://community.hubspot.com/t/creating-a-workflow-email-pulling-blog-posts-by-tag/9934>\
**Category:** CMS Development\
**Created:** [August 22, 2018, 6:46pm UTC](https://community.hubspot.com/t/creating-a-workflow-email-pulling-blog-posts-by-tag/9934 "2018-08-22T18:46:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![egleeson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/egleeson/32/34541_2.png) [@egleeson](https://community.hubspot.com/u/egleeson)\
**Post date:** [August 22, 2018, 6:46pm UTC](https://community.hubspot.com/t/creating-a-workflow-email-pulling-blog-posts-by-tag/9934/1 "2018-08-22T18:46:40Z")

</div>

Hello! I’m at my wits end trying to create an email for a workflow pulling the newest blog posts with a specific tag. I can pull recent posts, but whenever I re-code it to pull by tag, it breaks all the formatting.

Can’t do an RSS email for the RSS feed because it can’t be saved for automation and used in workflows.

Here’s my code. The tag is “technical resources”. Any help/guidance is MUCH appreciated!

{% set rec\_posts = blog\_recent\_posts(‘4580349396’, 2, tags=“technical resources”) %}  
{% for rec\_post in rec\_posts %}  
\<div class=“post-box”\>  
\<img style=“width:100% !important; max-width:100% !important; height:auto !important " src=”{{ rec\_post.featured\_image }}" alt=“post-image”\>  
\<br\>  
\<br\>  
\<div class=“post-content” style=“padding-top:15px !important; padding-bottom:25px !important; padding:15px 20px 25px !important; font-family: ‘Trebuchet MS’, Arial, Helvetica, sans-serif”\>  
\<h2 style=“font-family:Arial, Helvetica, sans-serif !important; width:100% !important; font-weight:700 !important; color:#555555 !important; line-height:24px !important; font-size:22px !important; margin:0 !important; padding:5px 0 15px !important;” class=“post-title”\>{{ rec\_post.name }}\</h2\>  
\<div class=“post-cbyline” style=“font-family: Arial, Helvetica, sans-serif; color:#555555 !important”\>  
by \<a class=“author-link” style=“text-decoration:none; color:#555555;” href=“{{ group.absolute\_url }}/author/{{ rec\_post.blog\_post\_author.slug }}”\>{{ rec\_post.blog\_post\_author.display\_name }}\</a\>, {{ rec\_post.publish\_date|datetimeformat(‘%m/%e/%Y’) }}  
\</div\>  
\<p\> {{ rec\_post.post\_list\_content }} \</p\>  
\<div class=“post-link” style=“text-align:center”\>  
\<a class=“more-link” style=" font-family: Arial, Helvetica, sans-serif !important; background:#0066ff !important; min-width:148px !important; height:40px !important; border-radius:5px !important; line-height:40px !important; text-align:center !important; color:#fff !important; text-transform:uppercase !important; font-weight:700 !important; margin-top:20px !important; display:inline-block !important; text-decoration:none !important; float:none !important; margin-bottom:0 !important; " href=“{{rec\_post.absolute\_url }}”\>\<span style=“color:#fff !important;” \>Read More\</span\>\</a\>  
\</div\>  
\</div\>  
\</div\>  
{% endfor %}

Thank you!

---

<div class="post-metadata">

**Author:** ![roisinkirby](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@roisinkirby](https://community.hubspot.com/u/roisinkirby)\
**Post date:** [August 23, 2018, 10:53am UTC](https://community.hubspot.com/t/creating-a-workflow-email-pulling-blog-posts-by-tag/9934/2 "2018-08-23T10:53:33Z")

</div>

Hey @egleeson could you please send a link to the live preview of the email and the blog you are using? @Jsum do you have any expertise in this area and/or can you recommend anyone in the Community who can help?

---

<div class="post-metadata">

**Author:** ![egleeson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/egleeson/32/34541_2.png) [@egleeson](https://community.hubspot.com/u/egleeson)\
**Post date:** [August 23, 2018, 5:49pm UTC](https://community.hubspot.com/t/creating-a-workflow-email-pulling-blog-posts-by-tag/9934/3 "2018-08-23T17:49:36Z")

</div>

Yes @roisinkirby!

Email live preview is here: [https://app.hubspot.com/design-previewer/3996476/templates/6086093990](https://app.hubspot.com/design-previewer/3996476/templates/6086093990)

Blog (on the relevant tag) is here: [Blog | Ball Systems | Technical Resources](https://www.ballsystems.com/blog/tag/technical-resources)

Thank you!

---

<div class="post-metadata">

**Author:** ![egleeson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/egleeson/32/34541_2.png) [@egleeson](https://community.hubspot.com/u/egleeson)\
**Post date:** [August 24, 2018, 5:50pm UTC](https://community.hubspot.com/t/creating-a-workflow-email-pulling-blog-posts-by-tag/9934/4 "2018-08-24T17:50:41Z")

</div>

Thanks for the help! I got a solution to this:

`{% set rec_posts = blog_recent_topic_posts('4580349396', 'technical-resources', 2) %}`
