> For the complete documentation index, see [llms.txt](https://docs-embed.anyflow.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-embed.anyflow.jp/solution-editor/actions/api-call/custom.md).

# カスタムアクション

## **概要**

カスタムアクションとは、Anyflow Embed に備わっていないアクションを HTTP リクエストを経由することによって利用可能にするアクションです。

カスタムアクションを使用することにより、ゼロから何かを構築するのではなく、既存コネクタのフレームワークを使って新しいアクションを構築することが可能です。

各コネクタの API ドキュメントからアクションのリクエストとレスポンスを取得し、それがどのようなものかを Anyflow Embed に伝えることで、簡単にアクションを構築することが可能です。

***

## **コネクタサポート**

Anyflow Embed のほとんどのコネクタはカスタムアクションをサポートしています。（各コネクタ随時開発中です）\
カスタムアクションは、コネクタのアクション選択リストから選択可能です。

<figure><img src="https://files.readme.io/afff7e7-CustomAction1.png" alt="574"><figcaption><p>例: SlackBot アクションのカスタムアクション選択画面</p></figcaption></figure>

また、カスタムアクションで使用可能なスコープを表示しています。\
通常、スコープが必要な API のみ操作可能です。\
例えば、 SlackBot のカスタムアクションを選択すると、以下のスコープのみ使用可能です。

<figure><img src="https://files.readme.io/9a039d6-CustomAction2.png" alt="575"><figcaption><p>カスタムアクションで使用できるコネクタのスコープ一覧</p></figcaption></figure>

> ### 📘スコープとは？
>
> API をコールするために必要な権限です。\
> Anyflow Embed の操作画面（Help）に明記されているスコープを使用可能です。
>
> スコープを変更したい場合はOAuth画面をカスタムするの方法を参考にしてください。

{% hint style="success" %}

### スコープとは？

API をコールするために必要な権限です。\
Anyflow Embed の操作画面（Help）に明記されているスコープを使用可能です。

スコープを変更したい場合は[OAuth画面をカスタムする](/connectors/custom-oauth-client.md)の方法を参考にしてください。
{% endhint %}

***

## **カスタムアクションの入力フィールド**

カスタムアクションの設定入力フィールドの詳細について説明します。

<table><thead><tr><th width="167.91796875"></th><th></th></tr></thead><tbody><tr><td><strong>入力フィールド</strong></td><td><strong>説明</strong></td></tr><tr><td>カスタムアクション名</td><td>作成するカスタムアクションに名前を付けます。</td></tr><tr><td>HTTPメソッド</td><td>呼び出す API エンドポイントの HTTP メソッドです。</td></tr><tr><td>リクエストパス</td><td>入力したURLは、ベースURLの末尾に追加されます。<br>例:SlackアクションのベースURLは、<a href="https://slack.com/api">https://slack.com/api</a> なので、ここで <code>/conversations.members</code> という値を使用すると、リクエストは <a href="https://slack.com/api/conversations.members">https://slack.com/api/conversations.members</a> に送信されます。</td></tr><tr><td>リクエストURLパラメーター</td><td>URL パラメーターを渡すことが可能です。</td></tr><tr><td>リクエストタイプ</td><td>JSON リクエストを渡すことが可能です。</td></tr><tr><td>レスポンスタイプ</td><td>API が返すと期待される出力スキーマを Anyflow Embed に説明します。これは、出力値のデータツリーを生成するために使用します。</td></tr></tbody></table>

## GraphQLの場合のリクエスト方法

カスタムアクションを利用してGraphQLのリクエストも可能です。

名前「query」でString型のスキーマを作成し、値としてクエリ内容を入力してください。

<figure><img src="/files/amEXKDgANtFZR0GKu1NS" alt="" width="563"><figcaption></figcaption></figure>

***

## **利用例**

* [レシピ | Slack チャンネルのメンバー情報一覧を取得する](/recipe/communication/slackbot-custom-get-member.md)
* [レシピ | Slack チャンネルにファイルをアップロードする](/recipe/communication/slackbot-custom-upload-file.md)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-embed.anyflow.jp/solution-editor/actions/api-call/custom.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
