# Forward X Search Results to Mattermost

Source: https://openflow.run/ja/templates/forward-x-search-to-mattermost/
Content language: en
Template revision: 9018120e802d4de0a097610157c565df858c0871

コミュニケーション

Monitor a recent X search and post new results to a Mattermost channel.

[Open Flow で使用](https://console.openflow.run/flows?importUrl=https%3A%2F%2Fraw.githubusercontent.com%2Foomol-lab%2Fawesome-workflow-templates%2F9018120e802d4de0a097610157c565df858c0871%2Fworkflows%2Fforward-x-search-to-mattermost%2Ftemplates%2Fforward-x-search-to-mattermost.openflow.json)

*   [Open Flow JSON](https://raw.githubusercontent.com/oomol-lab/awesome-workflow-templates/9018120e802d4de0a097610157c565df858c0871/workflows/forward-x-search-to-mattermost/templates/forward-x-search-to-mattermost.openflow.json)
*   [n8n JSON](https://raw.githubusercontent.com/oomol-lab/awesome-workflow-templates/9018120e802d4de0a097610157c565df858c0871/workflows/forward-x-search-to-mattermost/templates/forward-x-search-to-mattermost.n8n.json)

![Open Flow の Forward X Search Results to Mattermost ワークフロー](https://openflow.run/_astro/preview-light.BdxQQv76_kIO0F.webp)

Monitor a recent X search and post new results to a Mattermost channel.

## Setup

Connect X with access to recent search and Mattermost with permission to post. Set the query in **Search recent X posts** and channel ID in **Post to Mattermost**. Enable persistent workflow State. n8n static data persists in active scheduled runs. In n8n connect X OAuth2 to **Search recent X posts**, Mattermost to **Post to Mattermost**, and set the query and channel. Activate one format.

## Behavior

Each minute the workflow reads up to 50 recent search results, compares them with the previous nonempty result set and sends the new results in search order until it encounters an already seen ID. Each notification links to the post and includes its text and author. The first run sends the returned results. It remembers only the latest result set; older or delayed results can be missed or repeated. X recent search covers a limited time window and requires an eligible account.

The workflow advances its saved IDs only after a successful run. If a later notification fails, earlier posts remain and a retry can repeat them. An uncertain post may already have been created; inspect Mattermost before retrying. Avoid overlapping runs, which can race on saved State. The source inherited its n8n instance timezone; the schedule uses UTC.

Inspiration & credits

## Changes to the source

*   Use the current X recent-search API and expanded authors, and remove the private channel ID. The former profile link color is not returned by the current API.
*   Keep X IDs as strings and preserve the association between each post and author.

Adapted from [Twitter notifications to Mattermost](https://github.com/Zie619/n8n-workflows/blob/ae8cf6dc5b873cbb4f74587aa9180ed3a9f70682/workflows/Mattermost/0357_Mattermost_Twitter_Automation_Scheduled.json) in [Zie619/n8n-workflows](https://github.com/Zie619/n8n-workflows). The source export does not identify a separate template author or license.

The collection’s [MIT notice](https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/LICENSE) is pinned at a later revision. This is the collection notice at that revision; it does not establish a separate original template author’s license. Our changes are listed above; see [repository licensing](https://github.com/oomol-lab/awesome-workflow-templates/blob/9018120e802d4de0a097610157c565df858c0871/README.md#licensing).

> MIT License
> 
> Copyright (c) 2025 Zie619
> 
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
> 
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
> 
> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## 使用するアプリ

*   [**Mattermost**`mattermost`](https://console.openflow.run/connections/mattermost)
*   [**X (Twitter)**`twitter`](https://console.openflow.run/connections/twitter)

## 必要な設定

*   X connection with recent search access
*   Mattermost connection and channel ID
*   Persistent workflow State

*   x
*   mattermost
*   monitoring

[GitHub で見る](https://github.com/oomol-lab/awesome-workflow-templates/blob/9018120e802d4de0a097610157c565df858c0871/workflows/forward-x-search-to-mattermost/README.md)
