← Twitter Developer App + RSS integrations

Merge RSS Feeds with RSS API on New Tweet Metrics from Twitter Developer App API

Pipedream makes it easy to connect APIs for RSS, Twitter Developer App and 1000+ other apps remarkably fast.

Trigger workflow on
New Tweet Metrics from the Twitter Developer App API
Next, do this
Merge RSS Feeds with the RSS API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Twitter Developer App trigger and RSS action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Tweet Metrics trigger
    1. Configure timer
    2. Configure id
    3. Connect your Twitter Developer App account
  3. Configure the Merge RSS Feeds action
    1. Connect your RSS account
    2. Configure Feed URLs
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:
Version:0.0.1
Key:twitter_labs-new-tweet-metrics

Trigger Code

const twitterlabs = require('../../twitter_labs.app.js')

const axios = require('axios')

module.exports = {
  key: "twitter_labs-new-tweet-metrics",
  name: "New Tweet Metrics",
  version: "0.0.1",
  props: {
    db: "$.service.db",
    timer: {
      type: "$.interface.timer",
      default: {
        intervalSeconds: 900,
      },
    },
    id: "string",
    twitterlabs,
  },

  async run(event) {
    const Twit = require('twit')
    const { api_key, api_secret_key, access_token, access_token_secret } = this.twitterlabs.$auth
    const T = new Twit({
      consumer_key: api_key,
      consumer_secret: api_secret_key,
      access_token,
      access_token_secret,
      timeout_ms: 60 * 1000,
      strictSSL: true,
    })

    const _isEqual = require("lodash.isequal")

    const metrics = (await T.get('https://api.twitter.com/labs/1/tweets/metrics/private', { ids: this.id })).data.data[0]
    const lastmetrics = this.db.get("lastmetrics")
    if (lastmetrics && _isEqual(lastmetrics, metrics)) return
    this.$emit(metrics,{       
      id: metrics.tweet_id,
      summary: JSON.stringify(metrics.tweet),
    }) 
    this.db.set("lastmetrics", metrics)

  }
}

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
timer$.interface.timer
idstring
Twitter Developer ApptwitterlabsappThis component uses the Twitter Developer App app.

Trigger Authentication

Twitter Developer App uses API keys for authentication. When you connect your Twitter Developer App account, Pipedream securely stores the keys so you can easily authenticate to Twitter Developer App APIs in both code and no-code steps.

Video Tutorial on how to create and connect a Twitter Developer App to Pipedream

First, you'll need to sign up for a Twitter developer account and create a new application in the Twitter app dashboard.

  1. Register a new app on https://developers.twitter.com
  2. Apply for a new Twitter app, be detailed about your use
  3. After approval, create a new Standalone App
  4. Copy the api_key and api_secret_key into a Twitter Developer App Account on Pipedream
  5. Generate a new set of keys for your specific Twitter account
  6. Paste the access_token and access_token_secret in the Twitter Developer App Account on Pipedream

Once you've created an app, visit the Keys and tokens section of the app's settings, and add the API key, API secret key, Access token, and Access token secret below.

About Twitter Developer App

Use a Twitter developer app you've created to send API requests

Action

Description:Retrieve multiple RSS feeds and return a merged array of items sorted by date [See docs](https://www.rssboard.org/rss-specification)
Version:1.2.0
Key:rss-merge-rss-feeds

RSS Overview

With the RSS API you have the power to create powerful tools and applications.
RSS is a great way to reliably subscribe to, track and build around your
favorite content sources. Here are some examples of things you can create
using the RSS API:

  • A personal news website to syndicate articles from multiple sources.
  • A custom feed reader to deliver timely notifications of updates and news.
  • A live editorial dashboard to track news, trends and public sentiment.
  • An automated “report bot” to aggregate and report on news topics.
  • A competitor tracking tool to stay on top of industry news.
  • A custom RSS-based search engine or RSS-supported deep learning engine.
  • A live events feed to notify users and followers of new developments.

Action Code

import rss from "../../app/rss.app.mjs";
import { defineAction } from "@pipedream/types";
export default defineAction({
    name: "Merge RSS Feeds",
    description: "Retrieve multiple RSS feeds and return a merged array of items sorted by date [See docs](https://www.rssboard.org/rss-specification)",
    key: "rss-merge-rss-feeds",
    version: "1.2.0",
    type: "action",
    props: {
        rss,
        urls: {
            propDefinition: [
                rss,
                "urls",
            ],
        },
    },
    async run({ $ }) {
        const items = [];
        for (const url of this.urls) {
            const feedItems = await this.rss.fetchAndParseFeed(url);
            items.push(...feedItems);
        }
        $.export("$summary", "Successfully merged feeds");
        return this.rss.sortItemsForActions(items);
    },
});

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
RSSrssappThis component uses the RSS app.
Feed URLsurlsstring[]

Enter either one or multiple URLs from any public RSS feed

Action Authentication

The RSS API does not require authentication.

About RSS

Real Simple Syndication

More Ways to Connect RSS + Twitter Developer App

Merge RSS Feeds with RSS API on New Message from Twitter Developer App API
Twitter Developer App + RSS
 
Try it
Merge RSS Feeds with RSS API on New Tweet Metrics from Twitter Developer App API
Twitter Developer App + RSS
 
Try it
Merge RSS Feeds with RSS API on New Message from Twitter Developer App API
Twitter Developer App + RSS
 
Try it
Send Direct Message (DM) with Twitter Developer App API on New Item in Feed from RSS API
RSS + Twitter Developer App
 
Try it
Send Direct Message (DM) with Twitter Developer App API on New item from multiple RSS feeds from RSS API
RSS + Twitter Developer App
 
Try it
New Tweet Metrics from the Twitter Developer App API
 
Try it
New Message from the Twitter Developer App API

Emit an event each time the authenticated user receives a Direct Message

 
Try it
New Message from the Twitter Developer App API

Emit new event each time the authenticated user receives a Direct Message

 
Try it
New Tweet Metrics from the Twitter Developer App API

Emit new event on each new twitter metric

 
Try it
New Item in Feed from the RSS API

Emit new items from an RSS feed

 
Try it
Send Direct Message (DM) with the Twitter Developer App API

Send a DM to a user.

 
Try it
Merge RSS Feeds with the RSS API

Retrieve multiple RSS feeds and return a merged array of items sorted by date See docs

 
Try it