Skip to content

Deploy your bot to different platforms

To link a channel to your bot:

Note

Not all channels require a provider.

  • Choose a provider for your channel.
  • Configure a messaging provider. You will need to get the required credentials from your chosen provider.
  • Once the provider is set up, navigate to your bot on OCS and click the plus icon in the "Channels" section.
  • Choose your channel and complete the form. Follow the guide below to get the required information for each channel.

Web and API

The web channel uses the web interface and is enabled by default for all bots. Likewise, all bots can be accessed via the APIs.

Telegram

  • Follow this guide to create a Telegram bot.
  • Copy the bot token and paste it into the form on OCS. It will look something like this: 4839574812:AAFD39kkdpWt3ywyRZergyOLMaJhac60qc.

Note

Depending on your usecase, you probably want to disable group joins for your bot on Telegram. Since your telegram bot is public, anyone can add it to a group, which could end up costing you a lot. To achieve this, use the setjoingroups setting in BotFather.

WhatsApp

Setting Up Your WhatsApp Channel

  1. Add your WhatsApp number to the form in the Open Chat Studio channels section.

  2. Configure the webhook URL in your provider:

The webhook URL is always: https://chatbots.dimagi.com/channels/whatsapp/incoming_message

This URL is the same for all WhatsApp chatbots and channels on Open Chat Studio.

Provider-Specific Configuration

For New WhatsApp Numbers

If you're setting up a brand new WhatsApp number, you'll need: - Admin access to your Twilio/Turn.io account - To register the number with Meta/WhatsApp - To configure the webhook URL in your provider settings

For Existing WhatsApp Numbers

If you're reusing an existing WhatsApp number that was previously configured for Open Chat Studio: - No additional webhook configuration needed - the number is already set up to forward messages to Open Chat Studio - Simply add the number to your bot's channels in Open Chat Studio

Provider Instructions

  • For Twilio: See this page to configure the webhook URL in your messaging service
  • For Turn.io: Go to Settings → API & Webhooks → Add a webhook and paste the OCS webhook URL

Facebook Messenger

Note

It is assumed that you already have a Facebook page and a Twilio account with the Facebook page linked. Follow this guide if this is not the case.

  • Add the ID of your Facebook page.
  • After you submit the form, you will be provided with a webhook URL. Copy this URL and navigate back to your provider's settings to configure it with this URL.
    • For Twilio, edit your Facebook page settings and paste the URL into the "Webhook URL for incoming messages" field.

Slack

  • Choose the channel mode.
  • If you chose to link a specific channel, enter the name of the Slack channel you want your bot to be available on.
  • Once the channel is linked, you will be able to chat with it using the @Dimagi Bots reference.

SureAdhere

  • Enter the Tenant ID that would have been provided to you when setting up your SureAdhere account.
  • After you submit the form, you will be provided with a webhook URL. Copy this URL and navigate back to your provider's settings to configure it with this URL.