Re: Get RSS Feed through Velocity

Gally_Articola
Level 3

Get RSS Feed through Velocity

How can we display the 5 most recent items in our RSS feed in email via a Velocity email script token?

We'd prefer to utilize Velocity if possible since we're just starting to dip our toes into building content with an RSS feed and don't want to commit to a paid integration quite yet. 

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Get RSS Feed through Velocity

You can't fetch the feed using VTL (nor would you want to, since the feed would be the same for all leads -- horribly inefficient).

You can create a Resource Lead (a "worker lead" dedicated to certain tasks) and have that lead run a webhook once per day that fetches the RSS feed and writes it into a single, shared Velocity data token using the REST API.  You'd want to transform the feed XML into a regular Velocity List/Map layout  (which looks like JSON, though technically it isn't) when writing it out.

Then you can use another Velocity token to parse, filter, and output the feed contents into emails.

Gally_Articola
Level 3

Re: Get RSS Feed through Velocity

Ah, got it. Do you have a tutorial for how to set up the webhook and Velocity tokens?

I'm curious if this is a huge API resource cost too, but I'm interested in maybe experimenting a bit with this.

SanfordWhiteman
Level 10 - Community Moderator

Re: Get RSS Feed through Velocity

Ah, got it. Do you have a tutorial for how to set up the webhook and Velocity tokens?

Nothing out there that's formally dedicated to this as yet. Have meant to for a long time, but other work is in the way...

I'm curious if this is a huge API resource cost too, but I'm interested in maybe experimenting a bit with this.

It's not at all heavy on your API calls! It's just 1 call per day, total. About as efficient as you can get.

Gally_Articola
Level 3

Re: Get RSS Feed through Velocity

Looking forward to that (eventual) tutorial

In the meantime, we'll explore other avenues. Thanks!