> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/autify-university/foundation/step-groups/step-group-for-the-middleend-of-a-scenario.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# シナリオの途中/末尾のためのステップグループ

## どんな時に使うか

この種のステップグループは、シナリオの途中や末尾で行いたい一連のステップに使用することができます。例えば、シナリオの途中で繰り返したい一連の入力ステップや、複数のシナリオの最後に使用する共通のクリーンアッププロセスなどです。

## シナリオの途中/末尾のステップグループを作成する

シナリオの途中/末尾のステップグループは、その性質上ゼロからレコーディングすることはできませんが、シナリオの一部から作成することができます。以下の手順で作成しましょう。

1. ステップグループに変換したい一連のステップを含むシナリオを記録します。
2. ステップグループに変換したい一連のステップを、各ステップの左上にあるチェックボックスをクリックして選択し、**ステップグループの作成** をクリックします。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-89b5c431987a7b9f7717829f3437e1eca48ad615%2FScreen%20Shot%202022-04-09%20at%2013.02.50.png?alt=media)

3. ステップグループに名前をつけ **完了** をクリックします。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-d22390f6c6e141e607c07ba9e4930e37edbe1b1b%2FScreen%20Shot%202022-04-09%20at%2013.06.03.png?alt=media)

4. 選択したステップがステップグループに変わりました！ この新しいステップグループは、シナリオの途中や末尾で、何回でも好きな場所で使うことができます。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-c31deee89dca37ed4b7b52527daf26999f2d4ca2%2FScreen%20Shot%202022-04-09%20at%2013.08.40.png?alt=media)

ステップグループをクリックすると、その中身を見ることができます。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-7b51fb2f966bd2708494091f0e6da8c88298d1d6%2FScreen%20Shot%202022-04-09%20at%2020.56.38.png?alt=media)

## 留意点

以下の場合、選択したステップをステップグループにすることはできません。

* ステップグループを含んでいる
* 選択したステップがシナリオの他のステップに依存している場合。 具体的には、以下のようなステップが含まれる場合
  * 他の JS ステップからの戻り値を使用するステップ
  * 他のステップから参照されている値を返すJSステップ
  * ランダムメールアドレスを使用するステップ
  * データテーブルの値を使用するステップ
  * 他のステップで作成されたウィンドウを参照する「ウィンドウを切り替える」ステップ
  * クリーンアップステップに存在するステップ

## ステップグループをシナリオの途中や末尾で使用する

では、作成したステップグループをシナリオに組み込んでみましょう。ステップグループを追加したいシナリオを開きます。2つのステップの間にある \[+] ボタンをクリックすると、メニューに **ステップグループを挿入** が表示されます。リンクをクリックします。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-347e002b46b4d3142b551a0f5050e017944a696b%2FScreen%20Shot%202022-04-09%20at%2020.58.17.png?alt=media)

シナリオにステップグループが正常に追加されたことが確認できました。次に、シナリオに追加したいステップグループをドロップダウンメニューから選択します。**冒頭に「ページを表示する」ステップを持たないステップグループ** だけがリストに表示される点に注意してください。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-1fe639f76644c6c82ccbbafd39649f6116022f69%2FScreen%20Shot%202022-04-09%20at%2021.00.58.png?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/autify-university/foundation/step-groups/step-group-for-the-middleend-of-a-scenario.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
