π Send tweets every minute to Mattermost
β‘ 1,111 views Β· π Market Research & Insights
π‘ Pro Tip β Twitterβs API is paid now, which makes simple data pulls expensive. ScraperNode is a community node that scrapes Twitter profiles and posts without needing API access.
Description
This workflow executes every minute and fetches the recent tweets from Twitter with the search query n8n_io. The workflow is built on the concept of polling.
workflow-screenshot
Cron node: The Cron node triggers the workflow every minute. Based on your use-case you can configure the time. You can even use the Interval node to trigger the workflow at a certain time interval.
Twitter node: The Twitter node searches for the tweets that contain n8n_io and returns the most recent tweets. You can specify a different search query based on your use-case.
Set node: The Set node sets the data that we pass on to the next nodes in the workflow. You can set only the values that you require in your workflow.
Function node: All the magic happens in this node. The Twitter node returns all the recent tweets, including the ones which were returned earlier. The Function node, using the getWorkflowStaticData() method, only returns the tweets that are new, i.e., the tweets that were not returned in the previous workflow.
Mattermost node: The Mattermost node sends the tweets from the Function node to the Twitter notifications channel. If you donβt use Mattermost and want to share this data on a different platform, replace this node with the appropriate node.
π Nodes Used
Cron, Function, Start, Mattermost, X (Formerly Twitter)
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File