Twitter

From breaking news and entertainment to sports and politics, get the full story with all the live commentary. Use a Twitter developer app you've created to send API requests.

Integrate the Twitter API with the Python API

Setup the Twitter API trigger to run a workflow which integrates with the Python API. Pipedream's integration platform allows you to integrate Twitter and Python remarkably fast. Free for developers.

Run Python Code with Python API on New Follower of User from Twitter API
Twitter + Python
 
Try it
Run Python Code with Python API on New List Followed from Twitter API
Twitter + Python
 
Try it
Run Python Code with Python API on New Tweet in List from Twitter API
Twitter + Python
 
Try it
Run Python Code with Python API on New Tweet Liked by User from Twitter API
Twitter + Python
 
Try it
Run Python Code with Python API on New Tweet Posted by User from Twitter API
Twitter + Python
 
Try it
New Follower Received by User from the Twitter API

Emit new event when the specified User receives a Follower See docs here

 
Try it
New List Followed by User from the Twitter API

Emit new event when the specified User follows a List See docs here

 
Try it
New Tweet Liked by User from the Twitter API

Emit new event when a Tweet is liked by the specified User See docs here

 
Try it
New Tweet Posted by User from the Twitter API

Emit new event when the specified User posts a Tweet See docs here

 
Try it
New Tweet Posted in List from the Twitter API

Emit new event when a Tweet is posted in the specified list See docs here

 
Try it
Search Tweets with the Twitter API

Retrieve Tweets from the last seven days that match a query. See docs here

 
Try it
Run Python Code with the Python API

Write Python and use any of the 350k+ PyPi packages available. Refer to the Pipedream Python docs to learn more.

 
Try it
Add User To List with the Twitter API

Add a member to a list owned by the user. See docs here

 
Try it
Create Tweet with the Twitter API

Create a new tweet. See docs here

 
Try it
Delete Tweet with the Twitter API

Remove a posted tweet. See docs here

 
Try it

Connect Twitter

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
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    twitter: {
      type: "app",
      app: "twitter",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://api.twitter.com/2/users/me`,
      params: {
        "user.fields": `created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld`,
        expansions: `pinned_tweet_id`,
      },
    }, {
      token: {
        key: this.twitter.$auth.oauth_access_token,
        secret: this.twitter.$auth.oauth_refresh_token,
      },
      oauthSignerUri: this.twitter.$auth.oauth_signer_uri,
    })
  },
})

Overview of Python

Python API on Pipedream offers developers to build or automate a variety of
tasks from their web and cloud apps. With the Python API, users are able to
create comprehensive and flexible scripts, compose and manage environment
variables, and configure resources to perform a range of functions.

By using Pipedream, you can easily:

  • Create automated workflows that run on a specific schedule
  • Compose workflows across various apps and services
  • React to events in cloud services or form data
  • Automatically create content and notifications
  • Construct classifications and predictions
  • Analyze and react to sentiment, sentiment analysis and sentiment score
  • Connect backends to the frontend with serverless functions
  • Work with files and databases
  • Perform web requests and fetch data
  • Integrate third-party APIs into your apps
  • Orchestrate data processing tasks and pipelines
  • Create powerful application APIs with authentication and authorization
  • Design CI/CD pipelines and Continuous Delivery services
  • Connect databases like MongoDB and MySQL
  • Monitor connections and events
  • Generate alerts and notifications for corresponding events

Connect Python

1
2
3
4
5
def handler(pd: "pipedream"):
  # Reference data from previous steps
  print(pd.steps["trigger"]["context"]["id"])
  # Return data for use in future steps
  return {"foo": {"test":True}}
Using Event Sources and Workflows: Analyze Twitter Sentiment in Real-Time and Save to Google Sheets
Using Event Sources and Workflows: Analyze Twitter Sentiment in Real-Time and Save to Google Sheets
Learn how you can use Pipedream event sources and serverless workflows to listen for new Twitter mentions, analyze the sentiment of each Tweet using the npm sentiment package (https://www.npmjs.com/package/sentiment), and then save that data to Google Sheets in real-time.
Entering Data in Params Forms
Entering Data in Params Forms
Learn about the new model to enter expressions and reference previous step exports in params forms.
Managing the Concurrency and Execution Rate of Workflow Events
Managing the Concurrency and Execution Rate of Workflow Events
Managing the Concurrency and Execution Rate of Workflow Events.

Community Posts

A Look at Pipedream
A Look at Pipedream
I'm going to build a workflow that will search Twitter every hour for a keyword. It will take the results, format them nicely, and then email it.
Building a Google Sheets Twitter Bot with Pipedream
Building a Google Sheets Twitter Bot with Pipedream
This is something that's been kicking around my head for a week or so and today I thought I'd try it. It ended up taking about 20 minutes total and 10 lines of code, of which 5 are a function I copied and pasted. While what I built is kind of trivial, I'm blown away by how much was done by built-in functions with Pipedream and how little work I had to do myself. In fact, most of my time was spent in setting stuff up outside of Pipedream itself. Alright, so what did I build?
Building a Twitter Bot in Pipedream
Building a Twitter Bot in Pipedream
I did this by parsing information from the GI Joe wikipedia site and implementing it on Pipedream's platform. I'm going to share how I built it, but be aware that roughly 95% of the work was involved in getting my random character. The aspects that pertain to Pipedream were incredibly simple - which is what you want in a platform.
Using State in Pipedream Workflows
Using State in Pipedream Workflows
I did this by parsing information from the GI Joe wikipedia site and implementing it on Pipedream's platform. I'm going to share how I built it, but be aware that roughly 95% of the work was involved in getting my random character. The aspects that pertain to Pipedream were incredibly simple - which is what you want in a platform.
Building a Twitter Scheduling System with Pipedream and Google Sheets
Building a Twitter Scheduling System with Pipedream and Google Sheets
A few months ago, I blogged about how I used Pipedream and Google Sheets to create a Twitter bot. The idea was simple - read a sheet - select a random row - and use that as the source of a new Tweet. I was thinking about this recently and how useful Google Sheets can be as a "light weight CMS" and figured out another interesting use case - Twitter scheduling.
A demo of using the Twitter API, via Pipedream, to render the images from a Twitter account.