# Publish Storyblok Stories by Prefix

Source: https://openflow.run/zh-cn/templates/publish-storyblok-stories-by-prefix/
Content language: en
Template revision: d291811835b4d4defcd934c79186ed436e74219f

内容

Publish up to 50 matching stories from one Storyblok space and report which story IDs were confirmed.

[在 Open Flow 中使用](https://console.openflow.run/flows?importUrl=https%3A%2F%2Fraw.githubusercontent.com%2Foomol-lab%2Fawesome-workflow-templates%2Fd291811835b4d4defcd934c79186ed436e74219f%2Fworkflows%2Fpublish-storyblok-stories-by-prefix%2Ftemplates%2Fpublish-storyblok-stories-by-prefix.openflow.json)

*   [Open Flow JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/workflows/publish-storyblok-stories-by-prefix/templates/publish-storyblok-stories-by-prefix.openflow.json)
*   [n8n JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/workflows/publish-storyblok-stories-by-prefix/templates/publish-storyblok-stories-by-prefix.n8n.json)

![Publish Storyblok Stories by Prefix 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/publish-storyblok-stories-by-prefix/light.webp)

Publish up to 50 matching stories from one Storyblok space and report which story IDs were confirmed.

## Setup

1.  In **Choose the Storyblok space and prefix**, enter your Storyblok space ID and region. The default slug prefix is `release`. Use the prefix for the exact stories you intend to publish. [Storyblok Management API regions](https://www.storyblok.com/docs/api/management#base-urls)
2.  Configure a `STORYBLOK_MANAGEMENT_TOKEN` Secret Variable with a personal access token that can publish in that space. Select the same variable in **List the first 50 matching stories** and **Publish one story**. The token is sent in the Authorization header.
3.  Run the workflow manually. It publishes to the configured space during this run. Inspect **Return the publication summary** for the result.

## Behavior

The workflow makes one Storyblok Management API list request using `starts_with` and a 50-story page size. It publishes the returned IDs in that order, one at a time, with a 400 ms pause before each publish. An empty list makes no publish requests. The prefix is a slug filter within the space. [List stories](https://www.storyblok.com/docs/api/management/stories/retrieve-multiple-stories) · [Publish a story](https://www.storyblok.com/docs/api/management/stories/publish-a-story)

The summary lists planned, confirmed and unattempted IDs. If Storyblok rejects a publish or the result is indeterminate, the workflow stops at that ID and reports it in `stopped`. It makes a single publish attempt per story in a run. Check that story in Storyblok before starting another run. A fresh run can publish the same stories again. Earlier confirmed publications take effect independently. The Open Flow HTTP capability accepts response bodies up to 1 MiB.

In n8n

Enter the same space, region and prefix in **Choose the Storyblok space and prefix**. Bind the same HTTP Header Auth credential in **List the first 50 matching stories** and **Publish one story**. Use the header name Authorization and the personal access token as its value. The final **Return the publication summary** item contains planned and confirmed IDs and the point where publishing stopped. Run manually.

Inspiration & credits

Adapted from [Get all the stories starting with release and publish them](https://github.com/Zie619/n8n-workflows/blob/ae8cf6dc5b873cbb4f74587aa9180ed3a9f70682/workflows/Manual/0046_Manual_Storyblok_Import_Triggered.json) in [Zie619/n8n-workflows](https://github.com/Zie619/n8n-workflows). Attribution: Zie619 / n8n-workflows.

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/d291811835b4d4defcd934c79186ed436e74219f/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.

The source node defaults to a single page of 50 stories. This workflow preserves that effective limit.

## 配置要求

*   Storyblok Management API personal access token with publishing permission in the selected space
*   Storyblok space ID and region

*   storyblok
*   cms
*   publishing

[在 GitHub 查看](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/workflows/publish-storyblok-stories-by-prefix/README.md)
