RSS to Slack
@dylburger
code:
data:privatelast updated:4 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 1,000,000+ developers using the Pipedream platform
steps.
rss_trigger
inactive
last updated:-last event:-
steps.
format
auth
to use OAuth tokens and API keys in code via theauths object
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) => {
1
2
3
}
4
const { link, title } = event
this.message = `New post from RSS feed: <${link}|${title}>`
steps.
send_a_message
Send a message to a channel, group or user
auth
(auths.slack)
params
Text

Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead. Provide no more than 40,000 characters or risk truncation.

{{steps.format.message}}
string ·params.text
Channel

Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.

 
C1234567890
string ·params.channel
Optional
code
async (params, auths) => {
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
26
}
27
const { WebClient } = require('@slack/web-api')

try {
  const web = new WebClient(auths.slack.oauth_access_token)
  this.response = await web.chat.postMessage({
    attachments: params.attachments,
    unfurl_links: params.unfurl_links,
    text: params.text,
    unfurl_media: params.unfurl_media,
    parse: params.parse || 'none',
    as_user: params.as_user || false,
    mrkdwn: params.mrkdwn || true,
    channel: params.channel,
    username: params.username,
    blocks: params.blocks,
    icon_emoji: params.icon_emoji,
    link_names: params.link_names,
    reply_broadcast: params.reply_broadcast || false,
    thread_ts: params.thread_ts,
    icon_url: params.icon_url,
  })
} catch (err) {
  this.error = err
  throw err
}