Email > RSS feed

I’m trying to create a RSS feed from emails. I was looking at this example: https://pipedream.com/@dylburger/generate-an-rss-feed-from-email-p_RRCdGw/edit but the trigger seems to be a HTTP request, so I can’t figure out how to make it from an email! Switching the trigger means the variables in the node.js cells stops working.

Thanks!

Hi @habbox , thanks for reaching out. Can you tell me how you’d like to retrieve the feed, once you’ve added an item to it via the email?

For example, would you like to host the feed at an HTTP endpoint so that you can point an RSS reader to a URL? Or are you looking to consume the feed in another manner?

Hi @dylburger, thanks for your reply! Was hoping for the first - host at an endpoint and consume it via an RSS reader I already have in place. Thanks :slight_smile:

Great, thanks. I believe I may have started to create the example workflow you linked to, and never finished it! I’ll show you a generic example that you should be able to adapt to your use case. Let me know if this works for you.

We’ll use two workflows in combination here:

  1. This workflow accepts HTTP POST requests to add items to an RSS feed, and allows you to retrieve the feed via a GET request (similar to the workflow you linked to).
  1. This workflow accepts incoming emails and forwards them to the HTTP endpoint of workflow #1.

Copy workflow #1 first, setting a Secret as the README notes. Then copy workflow #2, adding the HTTP endpoint and secret from workflow #1 to the forward_email_to_http_endpoint step:

Workflow #2 is written to forward the subject of the email as the title of a new feed item, and assumes the text of the email is the link. You can modify this logic by editing the code in the forward_email_to_http_endpoint step, parsing the email and forwarding whatever data you’d like. The data you send in the HTTP POST request should match the format of the object that the feed npm package uses, so you can add a description, image, and more:

{
  title: "Feed Title",
  description: "This is my personal feed!",
  id: "http://example.com/",
  link: "http://example.com/",
  language: "en", // optional, used only in RSS 2.0, possible values: http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
  image: "http://example.com/image.png",
  ...
}

Once you add items to the feed, you can make an HTTP GET request to the endpoint for workflow #1 to retrieve your RSS feed.

In the future, a workflow will be able to support multiple triggers, so that you can combine all of this logic into one workflow. For now, this is the workaround we suggest in situations like this.

Let me know if you have any questions about this flow.

Perfect! All working exactly as expected, thanks so much for your help and doing 95% of the work there! Such a great platform!!

One thing I’ve noticed is that the email triggers don’t seem to work if the pipedream email isn’t first in the list of recipients. It’s not been a problem as I just moved them around but just thought I would flag.

Thanks again :slight_smile:

Great I’m glad the worked. Which mail client are you delivering these emails from? I just tested in Gmail and adding the Pipedream email address last in the To: field, or in the CC: field, both worked for me.

They’re automated emails from my Wordpress site, via the server’s own SMTP. Can confirm, to: and CC: do both work - what wasn’t working was when the emails were going to “example @test.com, example2@test.com, email@pipedream.com”. Changing so the Pipedream endpoint was first worked (and the other 2 still receive as well).

1 Like