We love two write utilities but not always. When we can it’s a little faster to use tools like Zapier to transport and transform data from one place to another.
Most of our customers use Zapier too so it’s a great way to sharpen our skills. You can do pretty much anything you want with Zapier – it’s just about how much time you’re willing to put in to figure it out.
We needed a way to move data from an RSS feed into JSON. The RSS feed was already being polled by Zapier so I needed to figure out how to parse it with Zapier (if possible). At first it wasn’t clear how.
What Zaps do I need?
I thought there might be a Zap called “Parser” or “JSON” and there was not. So I did a little searching. There were no articles specifically doing what I needed. There were however a few that gave me ideas.
Zapier was already parsing the RSS feed. I still wanted to add some structure so that would be easier to work with on the receiving end. The solution was starting to take shape.
RSS feeds use XML to maintain uniformity. The title, link and description elements are required you can read more about that in this w3schools.com article on RSS.
RSS, Filter and Webhook
For our particular solution we have one Zap prior to the Webhook – the “Filter” Zap. We don’t want every single notification from the RSS feed. We look for specific terms in the content and filter them out.
You can also filter content that only contains what you want.
With filtering now I can move on to creating the the JSON payload. The Zapier Webhook gives you payload choices – I needed JSON which provides two fields. Key and Value. The left smaller field you get to decide (it won’t be filled by the RSS data). I wanted to simulate what I was receiving from the RSS feed so I created three field sets – title, link and description. In the right hand fields I added their corresponding elements from the RSS feed.
The URL field that is above the data should be where you want to send the JSON Payload. For testing try using Postbin or Requestbin (a public bin is quickest to test) remember with either solution don’t send sensitive data to a publicly assessable tool.
That’s it! I ended up with a JSON Payload of very specific content from an RSS feed with just three Zaps! Thanks for reading – and see the shared Zap link below.