# Manually trigger campaign (RSS to email, when new blog post is available)

**URL:** <https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576>\
**Category:** General Discussion\
**Created:** [August 24, 2021, 4:07pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576 "2021-08-24T16:07:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 24, 2021, 4:07pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/1 "2021-08-24T16:07:28Z")

</div>

I am switching from MailChimp to mautic. One of the features I use in MailChimp is RSS to email for my blog. There its automatic… each day at 9am, if there is a new blog item in the RSS feed, its sent to the people subscribing via email.

For mautic, I have configured [rss-to-email-bundle](https://github.com/ChrisRAoW/mautic-rss-to-email-bundle), this is working properly.

I have created a category ‘blog’. I have attached it to a couple of test users.

I have created a campaign, which selects an email template w/ the RSS to email, and a segment based on this category.

When I manually run it, it works.

Now, the question… How do I trigger it? apologies if this is a basic question, but mautic:campaigns:execute does not, and mautic:campaigns:trigger does not.

Can i make some external condition (e.g. i can run a cron-job to look for new posts or something) that the campaign will see as ‘ready’ so mautic:campaigns:execute will then send?

Suggestions on how to achieve this?

---

<div class="post-metadata">

**Author:** ![nextafter-dan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nextafter-dan/32/5176_2.png) [@nextafter-dan](https://forum.mautic.org/u/nextafter-dan)\
**Post date:** [August 25, 2021, 9:33pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/2 "2021-08-25T21:33:27Z")

</div>

I’m setting up something similar, but haven’t enabled it yet to know if it will work correctly. I was going to set up a campaign that just repeats itself everyday.

At the end of the campaign it just does a “Change campaign” action to start it over again with the daily check. I’m not sure what happens if there is no new content, though.

 ![Screen Shot 2021-08-25 at 4.30.41 PM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a9fe727839eccc6c4647e67fab2574b3c19086c9.png)

Let me know if you figure it out as well. 😉

---

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 25, 2021, 10:01pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/3 "2021-08-25T22:01:06Z")

</div>

not to be a downer, but that doesn’t work.  
the user will get the same stale post over and over.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 26, 2021, 6:09am UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/4 "2021-08-26T06:09:49Z")

</div>

Hey, are you trying to personalise each email with RSS or all contacts supposed to get the same?  
Both are different methods, and I think I can point you in the right direction.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 26, 2021, 6:29am UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/5 "2021-08-26T06:29:49Z")

</div>

If the RSS feed contains the right information, why would Mautic send out the same post?  
There are WP plugins, that manage your RSS feed, and you can even filter for 1 day in the past (yesterday).

The HTML is created in batches. In this particular case every day email will be batch-created for all who supposed to receive it, and the content will be whatever the RSS plugin can pull at 8:00 am.

If there would be no time set in the campaign, and the email creation is happening in multiple batches, then every batch would produce an email based on the actual RSS content.

For example if you have a news website, and you are in the morning batch, you would get the news from the morning, but contacts, that get the email later will also get additional events that happened that day.

---

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 26, 2021, 11:51am UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/6 "2021-08-26T11:51:51Z")

</div>

I already use RSS with MailChimp.  
Each am at 9am it sees if there was a new post. If so, an email is sent.

In Mautic, if I schedule the campaign for 9am, it will resend the same body email if there has been no change.

At least that is what I experienced.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 26, 2021, 12:49pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/7 "2021-08-26T12:49:02Z")

</div>

Hello Don, This is interesting.  
I would like to know more as I created a course on this, and would like to know more how it can be expanded.

So Mailchimp checks if the RSS contains new posts and only uses the new ones?  
How do you generate the RSS? Shows posts from last 7 days or last X posts?

Thx,  
Joey

---

<div class="post-metadata">

**Author:** ![nextafter-dan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nextafter-dan/32/5176_2.png) [@nextafter-dan](https://forum.mautic.org/u/nextafter-dan)\
**Post date:** [August 26, 2021, 2:24pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/8 "2021-08-26T14:24:26Z")

</div>

@donbowman you’re right, that makes sense. I had assumed it would work like mailchimp does and several other similar email platforms.

@joeyk Most of my experience with RSS emails is that they just sort of sit in a “wait-and-see mode” until a new post is made, and only send if you have it set to a specific time schedule. For example, we’ll set the email to something like “show the last 5 posts”. But if only 1 new post was made, since the last send, then the email only shows the 1 new post, so it’s not constantly sending old content.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 26, 2021, 2:29pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/9 "2021-08-26T14:29:25Z")

</div>

Possible solutions:

1. Weekly email  
Generate a link, that contains posts from last 7 days  
RSS plugin picks it up, email sent every 7 days  
You make it with a recurring campaign

- Disadvantage: you need blog post at least every 7 days

1. Email about blog post when you wrote a new post  
Create a post, copy the RSS email as segment email  
set the RSS feed to generate only the last blogpost  
time it and send

- Disadvantage: you have to spend like 5 min with this after you wrote the post

I mean it’s possible to create a script, that checks if the RSS is empty, but it sounds like an overkill to me. What do you think?

---

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 26, 2021, 10:59pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/10 "2021-08-26T22:59:10Z")

</div>

mailchimp ‘just works’.  
each blog post becomes an email.  
if no new, no email.

seeking to replicate in mautic.

i don’t want a ‘here’s a list of 7 links’ email, so i won’t go down that approach (also, if there is no changes in those 7 days… i think it would always generate the last 7 days of things, even w/ duplicates etc)

i was planning on a script that checked and called ‘trigger’, but the trigger mechanisms don’t work the way i expected.

So i will have to mull this over. I think it would be useful to have an externally triggered campaign.

i considered using an SQL condition and then inserting to db.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 27, 2021, 6:42am UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/11 "2021-08-27T06:42:01Z")

</div>

Would that be a solution if a script would check if there is a blogpost EVERY DAY? And if yes then send the email? If no then no email.

Im actually creating a similar script now. But it won’t just work, you would need to call it with a cronjob.

---

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 27, 2021, 11:52am UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/12 "2021-08-27T11:52:13Z")

</div>

yes it would work.

but unless i miss something, i cannot trigger the campaign.

finding that there is/isnot an updated blog post is not complex, i just don’t know how to tell mautic “this campaign has received an external trigger”

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 27, 2021, 11:58am UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/13 "2021-08-27T11:58:59Z")

</div>

Actually the best way to do it is not a campaign. Because then you initiate the same campaign over and over again. You will be only able to see the cumulative results for all email sends.

I think it’s better to create a script, that copies a previously created segment email with the RSS content. The script runs every day, and checks for new entry in the blog. If there is one, then copies the previously assigned segment email into a new one, sets timing, segment to send to and set’s up the sendig via the usual process (queue or not queue depending on settings.)

---

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 27, 2021, 12:02pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/14 "2021-08-27T12:02:24Z")

</div>

i would be comfortable (and prefer) the cumulative results.

i use a category for the blog, which allows users to opt-in/out individually to that category on preference page.

the email is fixed in body (all blog posts have the same email template) since the rss feed plugin takes care of filling in the body dynamically.

---

<div class="post-metadata">

**Author:** ![chrisraow](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chrisraow/32/271_2.png) [@chrisraow](https://forum.mautic.org/u/chrisraow)\
**Post date:** [August 31, 2021, 12:10pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/15 "2021-08-31T12:10:09Z")

</div>

@donbowman I developed the rss to e-mail plugin for mautic. I’m currently investigating (after some requests) if i’m able to make an campaigntrigger for something like this.

> **[GitHub - ChrisRAoW/mautic-rss-to-email-bundle: Mautic plugin to send emails...](https://github.com/ChrisRAoW/mautic-rss-to-email-bundle)**
>
> Mautic plugin to send emails from RSS. Contribute to ChrisRAoW/mautic-rss-to-email-bundle development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 31, 2021, 1:03pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/16 "2021-08-31T13:03:07Z")

</div>

Great!

Let me know how I can help.

i was wondering if i could call it on a schedule, and it could return ‘false’ indicating there was no email.  
or if it could be a condition.

the option i was currently considering is using the sql plugin, and then making a table most-recent-blog-post-date, and selecting from the table so that i could have a condition in the front end.

another option i considered was a ‘rest condition’, whereby mautic would do an outbound rest call, and make some api.

lmk how i can assist.

---

<div class="post-metadata">

**Author:** ![chrisraow](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chrisraow/32/271_2.png) [@chrisraow](https://forum.mautic.org/u/chrisraow)\
**Post date:** [August 31, 2021, 1:32pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/17 "2021-08-31T13:32:10Z")

</div>

I’m still considering / investigating the best way the implement this. The (development) documenation of mautic for this area is really limited. If I have a better understanding how to hook into mautic for this of can thank of the best solutions.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 31, 2021, 1:42pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/18 "2021-08-31T13:42:11Z")

</div>

You could check if the most recent date in the feed is today. If yes, then launch the next campaign step.

---

<div class="post-metadata">

**Author:** ![chrisraow](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chrisraow/32/271_2.png) [@chrisraow](https://forum.mautic.org/u/chrisraow)\
**Post date:** [August 31, 2021, 3:13pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/19 "2021-08-31T15:13:41Z")

</div>

@joeyk ideally I want to check if there was something new posted since the last time the action was triggered. Within the action I want to configure an interval like every day, once a week, bi-weekly, once a month, etc.

---

<div class="post-metadata">

**Author:** ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)\
**Post date:** [August 31, 2021, 3:15pm UTC](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576/20 "2021-08-31T15:15:34Z")

</div>

it might be better to have the plugin expose a condition:

feed.lastDate

and then in my campaign i can put ‘condition: feed.lastDate \> 1 day’

and let the campaign builder logic flow.

[Next page](https://forum.mautic.org/t/manually-trigger-campaign-rss-to-email-when-new-blog-post-is-available/20576.md?page=2)
