Podcast RSS Feed to post - Podcast Import


Create a post from an podcast episode from RSS.


Check external RSS feed on pre-set day in the week and time of the day and sync frequency.

I am a podcast host and producer and for many years I was using MODX for my website. But after an podcast episode, I had to copy the content from the podcast platform and add it to MODX.
In 2023 I switched to the other CMS I will not mention the name (WP :wink: because there is this great plugin to import a podcast episode to a WP post, WP Podcast Importer.

I would really really love to have this feature in MODX. I’ve looked for an solution but can seem to find it. What I found on the form is to look at GetFeed, Spiefeed.

It seem it would need two parts:
1 xml parser to check the RSS url.
2 Have an event / cron job checking for an update in the RSS.

So what this plugin does is check for new content in the RSS item. You can set it to check it per day, per week, per month. So you can set the import interval. Import the podcast episode image.

And of course settings to determine how to post the content to a post.

Is there anyone who would like to help me create this in MODX?

Best regards,
Lucas Degen

For cron you could use the extra CronManager. This extra allows you to run a MODX snippet periodically with cron.

Do you use MODX 2.x or MODX 3?
With MODX 2.x, you could use the class modRSSParser (that is also used in the extra getFeed).
In MODX 3, modRSSParser doesn’t seem to exist anymore. You probably have to use SimplePie (that is a dependency of MODX 3) instead.

For this task you have to write a custom snippet.
How good are your programming skills?

1 Like

Thanks, I always work with the latest version. So MODX 3.x
My programming skills are limited to html css :slight_smile: and copy and paste. :slight_smile:

So I beter go ask around in my network for help or in this forum. :slight_smile:

Here is some MODX code, that uses SimplePie to download and parse an RSS feed (for the “News Feed” widget on the dashboard):

In your snippet, you could do something similar.
(Replace $this->modx with $modx in the snippet code).

To programmatically add a new resource in MODX, you can use code like this

use MODX\Revolution\modResource;

$doc = $modx->newObject(modResource::class); // create a new resource
$doc->set('parent', 1); // set the fields to their values
$doc->set('pagetitle', 'new resource');
$doc->set('template', 1);
$doc->setContent('some content');
$doc->save(); // save the resource

or alternatively call the “resource/create” processor:

$resource = [];
$resource['parent'] = 1;
$resource['pagetitle'] = 'new resource';
$resource['template'] = '1';
$resource['content'] = 'some content';
$response = $modx->runProcessor('Resource/Create', $resource);

If you have more specific questions, you probably have to provide your RSS-feed-URL.

1 Like

Thanks I will look into it soon.

This is my podcast RSS: https://anchor.fm/s/1388c80/podcast/rss be aware there are 165+ episodes recorded. So it’s a long list of items.