Extracting X (Twitter) Saved Posts with N8N - Best Methods

Hi there! I’m pretty new to N8N and trying to build some useful automations for myself. I want to grab all my saved tweets from X and put them in a Google Sheet so I can look through them later and do some analysis. I’m running N8N on my own server if that makes any difference. The official X API costs way too much for just a personal project like this. I tried setting up a headless browser approach but couldn’t get it working properly. What’s the best way to handle this without breaking the bank? Any ideas or workarounds that have worked for you?

Been dealing with this too. Since Twitter’s API got crazy expensive, I switched to Playwright in N8N’s code node to automate browser stuff. The trick is getting your wait conditions right and handling X’s lazy loading properly. You gotta scroll through saved tweets slowly and grab data as it loads. Throw in random delays so you don’t get flagged. I dump everything into Airtable instead of Google Sheets - handles the data better, but Sheets works fine. Takes patience to set up but runs solid once you get it dialed in.

Had the same problem a few months ago. Ditched browser automation completely and went with a Python script using tweepy on Twitter’s free API tier. You get 1500 tweets monthly - might work depending on how many saved tweets you’ve got. Set it up with N8N’s cron trigger to run monthly and pull what it can. Not perfect but runs steady without browser detection headaches. For tweets that don’t fit the free limit, I just manually download Twitter’s data export every few months and merge it. Less pretty than full automation but way more reliable than fighting their anti-bot stuff.

totally with ya on the pricing! i used the twitter-scraper npm package too. it’s been really solid for my needs! just keep an eye on those rate limits, but n8n’s code node manages them pretty nicely.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.