Get Started
Screenshot of n8n workflow
FREE TEMPLATE
Automate Twitter to Slack Sentiment Alerts
1
Views
0
Downloads
9
Nodes
Download Template
Free
Preview Template
Utility Rating
6 / 10
Business Function
Marketing
Automation Orchestrator
n8n
Integrations
Twitter
Slack
PostgreSQL
MongoDB
Google Cloud Natural Language
Trigger Type
Schedule
Approx setup time ≈ 65 min
Need help setting up this template?
Ask in our free Futurise community
About
Community
Courses
Events
Members
Templates

How to Automate Twitter to Slack Sentiment Alerts?

Leon Petrou
FREE TEMPLATE
Automate Twitter to Slack Sentiment Alerts
1
Views
0
Downloads
9
Nodes
Download Template
Free
Preview Template
Utility Rating
6 / 10
Business Function
Marketing
Automation Orchestrator
n8n
Integrations
Twitter
Slack
PostgreSQL
MongoDB
Google Cloud Natural Language
Trigger Type
Schedule
Approximate setup time ≈ 65 minutes
Need help setting up this template?
Ask in our free Futurise community

Description

Start your day with a quick look at what people say on social media. Every morning, the system finds new tweets for a chosen hashtag and highlights the positive ones for your team. It helps marketing teams spot ideas and plan posts fast.

At 6 each day, a schedule runs a Twitter search for #OnThisDay and pulls up to three results. The tweet text is saved in MongoDB, then scored by Google Cloud Natural Language for sentiment and magnitude. The results are mapped and stored in a PostgreSQL table so you can track history and build reports. An IF check looks at the score and posts only positive items to a Slack channel, while neutral or negative items are skipped.

You need access to Twitter, MongoDB, PostgreSQL, Slack, and Google Cloud Natural Language. After connecting each account, set your keyword, channel, and database details. Expect less manual scanning and fewer errors, plus a clean dataset you can use for weekly insights and content planning. You can change the schedule, the search term, and the message format to fit your team workflow.

Copy link

Tools Required

Twitter
Sign up
Free tier: $0 / mo, 500 posts / mo and 100 reads / mo (X API v2)
Slack
Sign up
Free plan: $0 / mo; limited to 10 apps (third-party or custom) and usable via Slack API
PostgreSQL
Sign up
Free: $0 (open-source PostgreSQL License; self-hosted)
n8n
Sign up
$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.
MongoDB
Sign up
Atlas Free (M0): $0 / mo (free forever)
Google Cloud Natural Language
Sign up
Free: first 5,000 units / mo for Entity Analysis; then $0.001 per 1,000 characters

What this workflow does?

  • Daily schedule runs at 6 using a Cron trigger to keep timing consistent.
  • Twitter search pulls up to three tweets for the #OnThisDay keyword.
  • MongoDB stores raw tweet text so you keep an unmodified record.
  • Google Cloud Natural Language scores sentiment and magnitude for each tweet.
  • Mapped fields prepare clean text, score, and magnitude for storage.
  • PostgreSQL saves structured results for reporting and trend analysis.
  • IF filter posts only positive tweets to a Slack channel for quick team review.
  • NoOp branch safely ignores neutral or negative items without stopping the run.

What are the benefits?

  • Reduce daily social scanning from 20 minutes to 2 minutes
  • Automate 80 percent of monitoring work with scheduled search and alerts
  • Improve data quality by reducing copy and paste errors by 90 percent
  • Connect five systems in one flow for a clear view of results
  • Scale to more keywords and higher volume without extra manual effort

How to set this up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Twitter, MongoDB, PostgreSQL, Slack and Google Cloud Natural Language. See the Tools Required section above for links to create accounts with these services.
  3. Open the Cron node and set the schedule to your local time. For quick testing, switch to Every Minute, then change it back to your daily time.
  4. Double click the Twitter node, choose the search operation, and confirm the search term is #OnThisDay with a limit of 3. In the Credential dropdown, click Create new credential and follow the on screen steps to connect your Twitter developer app.
  5. Double click the MongoDB node. In the Credential dropdown, click Create new credential and enter your connection string, database, and authentication details. Set the collection to tweets.
  6. Open the Google Cloud Natural Language node. In the Credential dropdown, click Create new credential and follow the on screen steps. Use your Google Cloud project with the Natural Language API enabled. Service account JSON or OAuth works.
  7. Open the Set node and confirm it maps documentSentiment.score to score and documentSentiment.magnitude to magnitude, and passes the text field.
  8. Double click the PostgreSQL node. Create a new credential with your host, port, database, user, and password. Make sure the table name is tweets and the columns are text, score, and magnitude.
  9. In your PostgreSQL database, create the table if it does not exist: CREATE TABLE tweets (id SERIAL PRIMARY KEY, text TEXT, score NUMERIC, magnitude NUMERIC, created_at TIMESTAMP DEFAULT NOW());
  10. Open the IF node and confirm it checks that the score is larger than 0. Adjust the threshold if your team wants only strongly positive posts.
  11. Double click the Slack node. Create a new credential by clicking Create new credential and follow the on screen steps to authorize Slack. Set the channel to tweets and review the message template.
  12. Run a test by setting Cron to Every Minute and clicking Execute Workflow. Confirm new documents in MongoDB, new rows in PostgreSQL, and Slack messages for positive tweets.
  13. If no messages appear, widen the search term or increase the Twitter limit. If database writes fail, check firewall or network access and verify table and column names.

Need help or want to customize this?

Similar Templates

n8n
Marketing
Generate Twitter Threads for Brand Engagement
Turn chat ideas into Twitter threads. A marketer types a short prompt in chat. The system writes and posts the first tweet and then continues the thread with replies. A chat event starts the flow and hands the message to an AI agent. The agent uses an OpenAI chat model with simple memory to keep context from the conversation. It calls two Twitter actions. One posts the first tweet. The other replies to the last tweet by using the tweet ID, so every follow up lands in the same thread. The agent is guided to write friendly, clear, and informative tweets, which helps keep a steady brand voice. You need OpenAI and Twitter accounts connected in n8n Cloud. Add your credentials, review the agent instructions, and test with a private or test Twitter account first. Expect faster content production, fewer mistakes, and more consistent threads. Great for product updates, live event notes, and short tip series. Once working, enable the workflow and let your team start threads by sending a chat message.
4 views
view
n8n
Marketing
Automate Twitter Mentions to Slack Alerts
Keep your team on top of brand chatter without constant checking. Every ten minutes it looks for new Twitter mentions and posts the text and a direct link in Slack. Ideal for marketing and community teams that need quick visibility. A schedule kicks off the run on a fixed timer. A simple setup holds your Slack channel and the search value, like your handle or brand term. The flow subtracts ten minutes from the current time, pulls up to 50 recent tweets from Twitter, then keeps only items created in that window. It trims each item to just the tweet text and a tweet URL so messages stay tidy, and sends the alert to the chosen Slack channel. Connect Twitter and Slack credentials in n8n Cloud, pick the channel, and set your search term. Expect faster replies, fewer missed tags, and a clearer view of what needs action. Great for brand monitoring, campaign tracking, and quick triage during product launches or live events.
14 views
view
n8n
Marketing
Automate Twitter Strapi Content Curation
Turn social posts and form messages into ready to publish content with smart filtering. Marketing teams and community managers can collect positive mentions and user stories without manual review. Every 30 minutes the flow searches Twitter for set keywords using extended mode, cleans the text, and skips retweets or old posts. Google Cloud Natural Language scores the tone. Only tweets with a score above 0.3 move forward. A webhook also accepts form submissions. It extracts the author, message, time, and url, runs sentiment with a 0.4 threshold, and merges results with the original data. Approved items are saved as new entries in Strapi with content, author, created date, and source link. This keeps your CMS fresh with high quality signals. You will need Twitter, Strapi, and Google Cloud accounts plus any form tool that can send data to a webhook. Expect faster content sourcing and less moderation time. Use it for brand monitoring, testimonials, product feedback, and community updates. Adjust the search query and sentiment thresholds to fit your voice and risk level.
4 views
view
See More Templates

These templates were sourced from publicly available materials across the web, including n8n’s official website, YouTube and public GitHub repositories. We have consolidated and categorized them for easy search and filtering, and supplemented them with links to integrations, step-by-step setup instructions, and personalized support in the Futurise community. Content in this library is provided for education, evaluation and internal use. Users are responsible for checking and complying with the license terms with the author of the templates before commercial use or redistribution.Where an original author was identified, attribution has been provided. Some templates did not include author information. If you know who created this template, please let us know so we can add the appropriate credit and reference link. If you are the author and would like this template removed from the library, email us at info@futurise.com and we will remove it promptly.