Forward email to RSS generator workflow
@dylburger
code:
data:privatelast updated:3 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 800,000+ developers using the Pipedream platform
steps.
trigger
Email
Deploy to generate unique email address
This workflow runs on Pipedream's servers and is triggered when an email is received.
steps.
forward_email_to_http_endpoint
auth
to use OAuth tokens and API keys in code via theauths object
params
RSS Feed URL

Enter the URL of your RSS feed here

 
string ·params.url
RSS Feed secret

The secret you've set on your RSS workflow to protect HTTP POST requests, as described here.

 
string ·params.secret
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.
async (event, steps, params) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
}
25
const axios = require("axios")

// Forward the incoming email to a workflow that will accept
// data via HTTP POST requests, saving it to an RSS that you
// can retrieve via GET request later. See
// https://pipedream.com/@dylburger/generate-an-rss-feed-from-http-post-requests-retrieve-via-get-request-p_n1CrQG/edit

const { url, secret } = params

return await axios({
  url,
  method: "POST",
  headers: {
    secret,
  },
  // This workflow saves the subject of the email as the
  // title of the feed item, and the text as the link.
  // PLEASE MODIFY ACCORDING TO YOUR USE CASE
  data: {
    title: steps.trigger.event.subject,
    link: steps.trigger.event.text,
  }
})