RSS to Twitter
@dylan
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.
trigger
inactive
last updated:-last event:-
steps.
format_tweet
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
this.tweet = `${event.title} ${event.link}`
steps.
post_tweet
Post a tweet.
auth
(auths.twitter)
params
Status
{{steps.format_tweet.tweet}}
string ·params.status
In reply_to_status_id
 
string ·params.in_reply_to_status_id
Optional
code
async (params, auths) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
}
19
const axios = require('axios')
const oauthSignerUri = auths.twitter.oauth_signer_uri
const {status, in_reply_to_status_id, auto_populate_reply_metadata, exclude_reply_user_ids, attachment_url, media_ids, possibly_sensitive, lat, long, place_id, display_coordinates, trim_user, enable_dmcommands, fail_dmcommands, card_uri} = params
const config = {
    url: `https://api.twitter.com/1.1/statuses/update.json`,
    method: 'POST',
    params,
}
const token = {
    key: auths.twitter.oauth_access_token,
    secret: auths.twitter.oauth_refresh_token,
}
const signConfig = {
  token,
  oauthSignerUri
}
return await require("@pipedreamhq/platform").axios(this, config, signConfig)