> 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/ops/event-notification.md).

# イベント通知

Anyflow Embedで発生したイベントを通知する機能について

Anyflow Embed で特定のイベントが発生した際に、ご利用中のツールに通知することができます。

<figure><img src="https://files.readme.io/7d23b687fcee5e581dae1e5bd95645f608bb3bcb0adc2c065136fa44a4e4369d-image.png" alt="" width="563"><figcaption></figcaption></figure>

## 対応しているツール

* Slack
* Teams
* メール
* Datadog
* New Relic
* Sentry

<figure><img src="https://files.readme.io/7e09cc6034b66bd50f0edfe2e148df0ed134cc3ac41e2e0152c72446b51f9059-image.png" alt="" width="375"><figcaption></figcaption></figure>

## 対応しているイベント

<table><thead><tr><th width="88.76171875">種別</th><th width="266.66015625">イベント</th><th>通知される情報</th></tr></thead><tbody><tr><td>正常系</td><td><strong>ソリューションがデプロイされたとき</strong></td><td><strong>該当のソリューションへのリンク(ID含む)</strong><br>ソリューション名<br>バージョン番号<br>デプロイ環境</td></tr><tr><td>正常系</td><td><strong>ソリューションがインストールされたとき</strong></td><td><strong>該当のユーザーのインストール一覧へのリンク</strong><br>ソリューショイ名<br>anyflow_team_id (JWTの値)</td></tr><tr><td>エラー系</td><td><strong>ソリューションの実行に失敗したとき</strong></td><td><strong>該当の実行履歴へのリンク(ID含む)</strong><br>ソリューション名<br>デプロイ環境<br>anyflow_team_id (JWTの値)</td></tr><tr><td>エラー系</td><td><strong>ユーザーの認証が無効になったとき ※1</strong></td><td><strong>該当のユーザーのインストール一覧へのリンク</strong><br>アプリ名<br>anyflow_team_id (JWTの値)<br>無効になったソリューションへのリンク</td></tr><tr><td>エラー系</td><td><strong>ポーリングトリガーの実行に失敗したとき ※2, 3</strong></td><td><p><strong>該当のソリューションへのリンク</strong><br>エラーの理由</p><p>エラーメッセージ（任意）<br>ソリューション名<br>anyflow_team_id (JWTの値)<br>アプリ名<br>デプロイ環境<br><br>※トリガーのエラーでは実行履歴自体が作成されないため、実行履歴へのリンクは発行されません</p></td></tr></tbody></table>

{% hint style="info" %}
ポーリングトリガー以外のトリガー（My Event, Request & Response, Click 等）では、エラーはトリガーの呼び出し時に自社プロダクト側に返却されるため、イベント通知の対象外となっております。
{% endhint %}

※1　「ユーザーの認証が無効になったとき」は401/403エラーなどにより意図せぬ形で認証が無効になった場合のみ通知されます。ユーザーが自身でコネクションを削除した場合は、正常な挙動でありエラーではないため通知されません。詳細は[こちら](/ops/solution-error/auth-error.md)

※2　「ポーリングトリガーの実行に失敗した時」の「エラーの理由」は以下の3通りが発生します。

* HTTP 通信エラー(`status code`)が発生しました。ソリューションの設定が間違っているか接続先に一時的な障害が発生している可能性があります。
* ソリューションの設定値を正しく変換できませんでした。ソリューションの設定が間違っている可能性があります。
* ポーリングトリガーが正常に実行できませんでした。このエラーが頻発する場合、 Anyflow にお問い合わせください。

※3 「ポーリングトリガーの実行に失敗した時」の「エラーメッセージ」にはSaaSからのエラーレスポンスが表示されます。

<figure><img src="/files/v9mfXhqsIVbBrfWX4m3d" alt="" width="383"><figcaption></figcaption></figure>

※SaaSのエラーレスポンスの仕様によっては、レスポンスに意図せぬ形でセンシティブな情報が入る恐れがあるため、通知させたくない場合は「エラーの詳細を通知する」のチェックボックスを外してください。

<figure><img src="/files/x7Y3TbDiZTyObDmwurrI" alt="" width="383"><figcaption></figcaption></figure>

## 使用方法

Anyflow Embed の管理画面にて [設定 > イベント通知](https://embed.anyflow.jp/settings/event-notification) を開きます。

連携したいツールの「⚙️設定」ボタンを押します。

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

通知を送りたいイベントをチェックし「次へ」を押します。

<figure><img src="https://files.readme.io/25c3605dee282334d1d55ce58f466e01a8fda8dbb200b94c42ac81e5da201cba-image.png" alt="" width="563"><figcaption></figcaption></figure>

ツールの認証を行い、通知先などを設定したら完了を押します。

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

3点リーダーから「通知をテスト」を選択すると、実際のイベントが発生する前に通知をテストすることができます。

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

以下の様なテストメッセージが送信され、連携に成功していることを確認できます。

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

### デプロイ環境ごとの通知先

デプロイ環境ごとに通知先を選択することができます。

<figure><img src="https://files.readme.io/63fe59f2f1c24face39dd2fc66e476a290d63b692f5e878f813154b3beea056f-image.png" alt="" width="563"><figcaption></figcaption></figure>

左の列では**デプロイ環境のユニーク名**を入力します。ユニーク名は[デプロイ環境](https://embed.anyflow.jp/environments)の画面から確認できます。

右の列では通知先を選択します。

この設定で指定していないデプロイ環境でイベントが発生した場合は、デフォルトの通知先に通知されます。

{% hint style="warning" %}
この機能は現在Slack通知でのみ提供しています。
{% 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 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/ops/event-notification.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.
