# データ連携ノードでSlackと連携する

[**データ連携ノード**](/alli-llm-app-market/app-management/node/integrate-node-basic.md)を活用してAlliからSlackチャネルにメッセージ（通知）を送信することができます。\
たとえば、顧客がAlliのDEMOリクエストを行った場合、該当のSlackチャネルに通知が送信され、メンバーは顧客とすぐに会話を始めることが可能となります。

## 準備 <a href="#preparation" id="preparation"></a>

初めにAlli – Slack連携‌‌AlliアカウントとSlackの統合設定を行います。‌‌ Alliダッシュボードから\[設定]⁣>\[外部サービス連携]＞\[連携ノード]⁣＞Slackに移動して設定を行います。 ‌‌設定の詳細については、[Slack連携ガイド](https://docs.allganize.ai/alli-userguide/settings/third-party-integration/slack-integration)を参照してください。

<figure><img src="/files/QV6KwHdAyK7MomQWSRwH" alt=""><figcaption></figcaption></figure>

次にメッセージを送信したいSlackチャンネルのwebhooks URLを取得します。URLを取得する方法は、Slackガイドを参照してください[**https://api.slack.com/messaging/webhooks**](https://api.slack.com/messaging/webhooks)

Incoming Webhooks設定ページではメッセージの送信者アイコンなど、さまざまな設定を変更することができます。 ここでは、まずwebhooks URLをコピーします。

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-2-1.png?resize=595%2C142&#x26;ssl=1" alt=""><figcaption></figcaption></figure>

## Alli – キャンペーンの設定 <a href="#setting-up-the-alli-campaign" id="setting-up-the-alli-campaign"></a>

Alliダッシュボードでチャットフローを設計します。 キャンペーンを作成したあと、Slackにメッセージを送りたいポイントに外部データ連動ノードを追加します。下のチャットフロー例を参照してください。

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-3-1.png?resize=695%2C363&#x26;ssl=1" alt=""><figcaption></figcaption></figure>

上記のチャットフロー例では、顧客が「Alli DEMOの依頼」を選択すると、顧客とメンバーを有人チャットで連結するよう設定しています。 顧客からのリクエストが発生したときにSlackチャネルのメンバーにメッセージ通知を行う必要があるため、外部データ連携ノードを活用します。

（注：Slack Webhooksは何の値も返さないので、外部データ連携ノードの「失敗」は必ず次のノードと接続する必要があります）

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-4-1.png?w=800&#x26;ssl=1" alt=""><figcaption></figcaption></figure>

データ連携ノードを設定する方法は以下の通りです。

1. メソッドとして、「POST」を選択します。
2. Slackから取得したWebhook URLをここに貼り付けます。
3. 「ADVANCED」タブを選択します。
4. 「送信する変数」フィールドに次のJSON形式を利用してメッセージを入力します。{“text”:”***送信メッセージ***“}

送信するメッセージとして、以下の様に単純なテキストメッセージ、変数の値、リンクが含まれているテキストメッセージが可能です。

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-5a.png?w=800&#x26;ssl=1" alt=""><figcaption><p>シンプルなテキストメッセージ</p></figcaption></figure>

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-5b.png?w=800&#x26;ssl=1" alt=""><figcaption><p>変数</p></figcaption></figure>

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-5c.png?w=800&#x26;ssl=1" alt=""><figcaption><p>リンク付きのテキストメッセージ</p></figcaption></figure>

設定は以上で完了です。最後にチャット・フローをテストし、Slackにて正常にメッセージを受信できる事を確認ください。

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-6-1.png?w=800&#x26;ssl=1" alt=""><figcaption><p>Alliにてリクエストを受付</p></figcaption></figure>

<figure><img src="https://i0.wp.com/guide.allganize.ai/wp-content/uploads/2022/01/Connect-Slack-7-1.png?w=800&#x26;ssl=1" alt=""><figcaption><p>該当チャネルで通知を受け取る</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.allganize.ai/alli-llm-app-market/app-management/advanced-flow-example/connect-to-slack-using-integration-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
