> 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/triggers/incoming/polling-triggers.md).

# ポーリングトリガー

トリガーの種類のうち、ポーリングについて

<figure><img src="https://files.readme.io/0972156-image.png" alt="例：カラーミーショップのポーリングトリガー"><figcaption><p>例：カラーミーショップのポーリングトリガー</p></figcaption></figure>

## **概要**

ポーリングトリガーは、新しいイベントが利用可能かどうかを定期的に連携先SaaSに問い合わせることで、新しいイベントの有無を確認します。ポーリングの頻度は最小で5分程度にすることが可能です。

ソリューションが最初に開始される際に、ポーリングトリガーは直近のイベントを取得します。\
エンドユーザーがソリューションを有効にしている間、ソリューションエディターで設定したポーリング間隔に沿って定期的にイベントを取得し、新規でイベントが存在する場合にトリガーが発火します。

<figure><img src="https://files.readme.io/b865cc1-Document_-_.jpg" alt="1912" width="600"><figcaption><p>ポーリングトリガーの動作イメージ</p></figcaption></figure>

{% hint style="warning" %}

### ポーリングの上限

一回のポーリングで取得するレコード数は`100件程度`に収めることを推奨しています。\
[ソリューション実行の上限値](/ops/step-execution-limit.md)も併せてご確認ください。
{% endhint %}

## **ポーリングトリガーの種類**

ポーリングトリガーには以下の二種類が存在します。

* 通常のポーリングトリガー
* カスタムポーリングトリガー

### **通常のポーリングトリガー** <a href="#normal-polling-triggers" id="normal-polling-triggers"></a>

通常のポーリングトリガーは、「〜された際に実行」「〜になったら実行」という形式で表記されています。

<figure><img src="https://files.readme.io/a8f3b2b-image.png" alt=""><figcaption></figcaption></figure>

この場合は、ポーリング間隔などの設定を行うだけで簡単に実行することができます。

<figure><img src="https://files.readme.io/872e664-image.png" alt=""><figcaption></figcaption></figure>

### **カスタムポーリングトリガー(β)** <a href="#custom-polling-triggers" id="custom-polling-triggers"></a>

カスタムポーリングトリガーは、上記とは異なりHTTPリクエストの内容を独自に定義して実行するトリガーです。

<figure><img src="https://files.readme.io/44199b4-image.png" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}

### 検証用途でご使用ください

カスタムポーリングトリガーは検証用途で提供しており、本番のソリューションに適用するのは推奨しておりません。

カスタムポーリングトリガーは独自の内容を設定できる反面、設定内容によっては意図せぬ形でトリガーが大量に発火したり、エラーが継続的に発生し続ける可能性があるためです。

必要であればAnyflow CSチームとも相談のうえ検討を行ってください。
{% endhint %}

{% hint style="warning" %}

### カスタムポーリングトリガー固有の上限値について

カスタムポーリングトリガーが1回のポーリングで処理できるレコード件数は`100件まで`と明示的に制限されています。
{% endhint %}


---

# 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://docs-embed.anyflow.jp/solution-editor/triggers/incoming/polling-triggers.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.
