Integrations

Testing the New Integrations

Six channels are built but never tested against a real account: Microsoft Teams, LINE, Slack, Discord, SMS and WeChat. They show as Coming soon in Integrations and cannot be connected until someone works through them. This page explains how to unlock one for testing, and what "it works" actually means.

Read this first. Every other integration guide assumes you have done the unlock step below. Without it, the Connect button is not reachable and the API refuses with "This channel is coming soon."

Why they are gated

Each of these channels has a client, a handler, a webhook and a signature check, and all of that is unit-tested — signatures, encryption, message splitting, storage. What none of them has done is carry a real message from a real workspace, number or bot.

A customer who connects a channel and finds it silent has been sold something that does not work, which is worse than not offering it. So they are visibly listed, clearly marked, and refused at the API — not hidden.

Step 1 — Unlock one channel for testing

1. Open the channel list. Edit shared/helpers/channel_integrations.php and find:

const CHANNEL_COMING_SOON = ['teams', 'line', 'slack', 'discord', 'sms', 'wechat'];

2. Remove the one you are testing. To test LINE, for example:

const CHANNEL_COMING_SOON = ['teams', 'slack', 'discord', 'sms', 'wechat'];

3. That is the whole change. There is no cache to clear and no second file to edit. The catalog card becomes clickable and the handler accepts connect in the same moment, because both read this one list.

4. Test one at a time. Unlock a single channel, finish it, then decide whether to leave it out of the list permanently or put it back.

Removing a channel from this list makes it connectable for every Pro company, not just yours. If you are testing on production, put it back until you are satisfied.

What you need for every channel

  • A chatbot with documents. Create one under Chatbots and upload at least one document, or every answer will be "I don't have that information" and you will not be able to tell a working channel from a broken one.
  • A Pro or Internal plan. Channel integrations are Pro-gated. Company 69 (Data Atlas) is on the Internal plan and has everything.
  • A publicly reachable server. Every channel below calls a webhook on aimy.com.my. None of this can be tested from localhost.

What "it works" means

For every channel, the test is the same three things in order. A channel is only done when all three pass:

  • Connect succeeds. The credentials are accepted and stored. This proves the handler and the credential check work — nothing more.
  • The platform accepts the callback URL. Most of these verify the URL when you save it on their side. This proves your signature check works.
  • A real message gets a real answer. Send a question you know your documents can answer, and get that answer back in the app. This is the only step that proves the whole path.

Connecting successfully is not the finish line. Four of these channels — Slack, Discord, SMS and WeChat — reply through a background worker rather than in the webhook response, so a connection can look perfect while replies never arrive.

When something does not work

Check the error log first. Every webhook logs its refusals with a prefix you can grep:

tail -f /var/log/httpd/error_log | grep -E "line_webhook|slack_webhook|discord_webhook|sms_webhook|wechat_webhook|channel_reply_worker"

The common failures, and what they mean:

  • "bad signature" — the secret in Aimy does not match the one on the platform. Re-copy it; a trailing space is the usual cause.
  • "unknown or inactive integration N" — the callback URL points at an integration that was disconnected. Reconnect and use the new URL.
  • "has no credentials (decrypt failure…)" — the stored config could not be decrypted. Almost always means BYOK_ENC_KEY changed. Reconnect the channel.
  • Nothing in the log at all — the platform never called you. The URL is wrong, or it was never saved on their side.

If connect works but no answer arrives, the problem is in the background worker, not the webhook. Look for channel_reply_worker lines. Jobs are written to /tmp/aimy_channel_jobs/ and deleted as they are picked up — if files pile up there, the worker is not starting.

Step 2 — When a channel passes

Leave it out of CHANNEL_COMING_SOON and commit that one-line change. Nothing else keys off the list, so there is no other switch to flip and no migration to run.

Suggested order, easiest first: Telegram (already live, use it to confirm your setup is sane) → LINESlackDiscordSMSTeamsWeChat. The last two need the most from outside parties.