n8n Practical Guide: How to Fetch Latest X Tweets

10 months ago

If you want to scrape the latest tweets from certain bloggers, this guide can help you.

https://appstore.lazycat.cloud/#/shop/detail/cloud.lazycat.app.n8n

First, you can download this file and import it into your n8n.

image.png

If you click run directly, it will throw an error. We need to see which nodes have errors and then troubleshoot them one by one.

image.png

You can see this step has an error. Double-click to open the node directly.

image.png

This step requires us to configure Twitter permissions.

image.png

Visit the page: https://twitterapi.io/dashboard After creating an account, you will receive an API KEY.

image.png

Create a new credential in Header Auth.

image.png

Fill in the Name as: x-api-key, and the Value is the apikey you just obtained.

image.png

Next, handle this error:

image.png

Click to create a new credential.

image.png

For the method to create Google credentials, you can refer to this guide I wrote previously: n8n Hands-on Guide 2: How to Add Google Drive Configuration

image.png

Click 'Sign in with Google' – it must log in successfully (check for Peppa Pig).

image.png

Create a Google Sheet (no need to write content). Google Cloud Docs: https://drive.google.com/drive/home

image.png

If the previous steps were done correctly, at this step, it should automatically fetch the sheet I just created:

image.png

If it errors and fails to fetch, you need to check if your Google API is enabled.

image.png

Click to execute the workflow.

image.png

Return to the Google Sheet, and you can see the data has been written in.

image.png

This workflow allows you to scrape tweets from your favorite bloggers and filter out ads and automated recommendations, which is quite practical.

Author
天天
n8n Practical Guide: How to Fetch Latest X Tweets