---
title: "Daily tweets scored for sentiment and sent to Slack"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/50b66c38-df0a-4e63-9bf2-85d146b9b813"
updated: "2026-11-12"
---

# Daily tweets scored for sentiment and sent to Slack

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that searches X every morning for posts with a hashtag, saves them in MongoDB and scores their sentiment with Google. The scores go into Postgres, and a positive post is sent to a Slack channel.

Daily tweets scored for sentiment and sent to Slack is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow checks X once a day for posts that use a hashtag. A schedule starts it at 6 am. It searches for `#OnThisDay`, takes up to ten posts and saves each post’s text in MongoDB. Google Cloud Natural Language scores the sentiment of each post. The text and the two scores go into Postgres. If the score is above zero, a Slack message shows the post. Nine nodes do the work.

### Who it suits

Small teams who want a daily look at how people talk about a topic, plus a table of scores to study later. Skip it if you need every post on a topic. The search covers only the last seven days, in small batches.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Marketing | Social media managers | Watch the mood around a hashtag each morning | A manager follows a campaign tag and sees the cheerful posts in Slack. |
| Media | Newsroom editors | Spot the tone of public posts on a topic | An editor tracks a history hashtag and keeps the scores in a database. |
| Research | Students | Collect a small sample of posts with sentiment scores | A student saves a week of posts and scores to chart the mood. |
| Brand | Community managers | Find posts worth thanking | A manager reads the positive posts in a Slack channel and replies to the best ones. |

You need some n8n skills and five accounts: X, MongoDB, Google Cloud, Postgres and Slack.

### Where to use it

Any n8n that can reach X, Google Cloud, Slack and your two databases will run it.

- n8n Cloud: import the file into a new workflow there, with databases that n8n can reach from the internet
- Your own n8n server: the same file and steps, next to your own databases
- Another hashtag: change the search text in \`Twitter\`
- Another channel: change the channel name in \`Slack\`

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Five accounts are involved.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| X | A developer app with credit for reading posts, saved in an X OAuth2 credential |
| MongoDB | A database, and a MongoDB credential for it |
| Google Cloud | A project with the Natural Language API turned on, and a Google Cloud Natural Language credential |
| Postgres | A database with a table named \`tweets\` that has the columns \`text\`, \`score\` and \`magnitude\`, and a Postgres credential |
| Slack | A Slack app that can post in the channel, and a Slack credential |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add an X OAuth2 credential and select it in `Twitter`. Change the search text if you do not want `#OnThisDay`.
3. Add a MongoDB credential and select it in `MongoDB`. The collection is called `tweets`.
4. Add a Google Cloud Natural Language credential and select it in `Google Cloud Natural Language`.
5. Create the table `tweets` in Postgres, add a Postgres credential and select it in `Postgres`.
6. Add a Slack credential and select it in `Slack`. Change the channel name if you do not use `tweets`.
7. Run the workflow once by hand, then activate it.

### How to use it

Activate the workflow and it runs every morning at 6. Each run searches X, stores the posts, scores them and posts the positive ones in Slack. You can also run it by hand while you test.

What to change for a different result

| To change | Where |
| --- | --- |
| The search | \`searchText\` in \`Twitter\` |
| How many posts per run | \`limit\` in \`Twitter\`, which X accepts from 10 to 100 |
| The time of day | The hour in \`Schedule Trigger\` |
| What counts as positive | The comparison and value in \`IF\` |
| The Slack message | The text in \`Slack\` |

### Example

A community manager sets the search text to the name of a product and activates the workflow.

Each morning the latest posts about the product land in MongoDB and Postgres with a score and a magnitude. Posts with a score above zero show up in the Slack channel with both numbers.

### For newcomers and experts

**If you are new.** Sentiment analysis rates how positive or negative a text is. Google returns a score from -1 (negative) to 1 (positive). It also returns a magnitude that grows with the amount of emotion in the text. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job.

**For experts.** The `Twitter` node is version 2 and calls X’s recent search endpoint. The `Set` node reads the post text from `Twitter` by node name, so a renamed node breaks it. The remaining nodes are version 1.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Twitter\` | Searches X for recent posts with the hashtag | Recent search covers the last seven days and returns 10 to 100 posts per request |
| \`MongoDB\` | Inserts the text of each post into the collection \`tweets\` | It saves only the text, with no author or date |
| \`Google Cloud Natural Language\` | Scores the sentiment of each saved post | The score runs from -1 to 1 and the magnitude from 0 upward |
| \`Set\` | Collects \`text\`, \`score\` and \`magnitude\` in one item | It reads the post text from \`Twitter\` by name |
| \`Postgres\` | Inserts the row into the table \`tweets\` | The table must exist first |
| \`IF\` | Checks whether the score is above 0 | The false route ends in an empty \`NoOp\` node |

### Good to know

The search node and the trigger were replaced because the old ones no longer fit. Mindket did not run this workflow.

- Search node: the file used the version 1 Twitter node, which calls X’s older search address with an OAuth1 credential. X’s docs, read on 12 November 2026, map that address to recent search. n8n’s current node, version 2, calls it with an OAuth2 credential, and Mindket’s copy uses it
- Cost: X’s pricing page, read on 12 November 2026, lists post reads at 0.005 US dollars each on pay per usage, so ten posts a day cost about five cents. Recent search needs at least 10 results per request, so the limit went from 3 to 10
- Trigger: the file used the Cron node, which n8n hides in its node list. Mindket’s copy uses a Schedule Trigger at 6 am
- Repeats: recent search reaches back seven days, so the same post can come back on a later day and land in both databases again
- Older nodes: the Slack, Postgres, MongoDB and Google Cloud Natural Language nodes are still in n8n’s source as version 1, so Mindket kept them
- Your data: the post texts go to MongoDB, Google, Postgres and Slack. The file holds no credential

## README

```markdown
# Daily tweets scored for sentiment and sent to Slack

An n8n workflow that searches X every morning for posts with a hashtag, saves them in MongoDB and scores their sentiment with Google. The scores go into Postgres, and a positive post is sent to a Slack channel.

## What is inside

- `workflow.json`: the workflow as n8n exports it, nine nodes. It holds no credential and no sticky notes.
- `README.md`: these notes.

## What we changed from the original copy

- The search step was the version 1 Twitter node, which calls X’s older search address with an OAuth1 credential. X’s migration guide, read on 12 November 2026, maps that address to recent search. Mindket’s copy uses n8n’s version 2 node, which calls recent search with an OAuth2 credential.
- The search asked for 3 posts. X’s recent search takes at least 10 results per request, so it now asks for 10. At 0.005 US dollars a post read, that is about five cents a day.
- The Cron node, which n8n hides in its node list, became a Schedule Trigger that runs every day at 6 am.
- The `IF` node compared the score with an empty second value. The value is now an explicit 0.
- Several nodes were linked to credentials in the author’s n8n. The links are gone, so select your own.
- Nothing else. The MongoDB, Natural Language, Set, Postgres and Slack steps are the file’s own.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- An X developer app with credit for reading posts.
- A MongoDB database and a Postgres database with a table `tweets` that has the columns `text`, `score` and `magnitude`.
- A Google Cloud project with the Natural Language API turned on.
- A Slack app that can post in your channel.

## Set it up

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add an X OAuth2 credential and select it in `Twitter`. Change the search text if you do not want `#OnThisDay`.
3. Add a MongoDB credential and select it in `MongoDB`. The collection is called `tweets`.
4. Add a Google Cloud Natural Language credential and select it in `Google Cloud Natural Language`.
5. Create the table `tweets` in Postgres, add a Postgres credential and select it in `Postgres`.
6. Add a Slack credential and select it in `Slack`. Change the channel name if you do not use `tweets`.
7. Run the workflow once by hand, then activate it.

## How a run goes

1. `Schedule Trigger` starts the run every day at 6 am.
2. `Twitter` searches X for recent posts with `#OnThisDay` and returns ten.
3. `MongoDB` inserts the text of each post into the collection `tweets`.
4. `Google Cloud Natural Language` analyzes the sentiment of each text. `Set` keeps the text, the score and the magnitude.
5. `Postgres` inserts each row into the table `tweets`.
6. `IF` sends a post with a score above 0 to `Slack`, which posts it in the channel `tweets`. The others go to an empty `NoOp` node.

## Change the result

- The search: `searchText` in `Twitter`.
- How many posts per run: `limit` in `Twitter`, which X accepts from 10 to 100.
- The time of day: The hour in `Schedule Trigger`.
- What counts as positive: The comparison and value in `IF`.
- The Slack message: The text in `Slack`.

## Good to know

- Mindket did not run this workflow. X, MongoDB, Google, Postgres and Slack were not called. The node settings come from n8n’s source and the vendors’ documentation, read on 12 November 2026.
- Google’s documentation says the score runs from -1.0 (negative) to 1.0 (positive). The magnitude is not normalized, so a longer text can have a bigger one.
- X’s recent search reaches back seven days, and the same post can come back on a later day. The workflow does not check for repeats.
- The workflow does not create the Postgres table, so create it first.
- The MongoDB step stores only the post’s text, with no author, date or link.
- The post texts go to MongoDB, Google, Postgres and Slack.
- The file holds no credential and no key.
```

## What is in it

3 files, 10 KB, downloaded as a zip.

```text
NOTICE.md  582 B
README.md  4 KB
workflow.json  5 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 9 steps, starting on a schedule
- AI: No step calls an AI model
- Sign-ins: Signs in to: X, Google Cloud Natural Language and Slack
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads 7 of its 9 step types. It does not read: Mongo Db and Postgres

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/50b66c38-df0a-4e63-9bf2-85d146b9b813)
- [Its page on Mindket](https://mindket.com/p/50b66c38-df0a-4e63-9bf2-85d146b9b813)
