Building an AI-powered automation bot

The AI agents API provides a comprehensive set of tools for building AI-powered automation bots. With these APIs, you can automate text-based conversations by sending and receiving messages to your bot and subscribing to bot events using webhooks.

You can build your integration in any programming language or framework. The tutorial is located in Custom CRM automation template in GitHub. To help you get started, the tutorial includes a ready-to-use Node.js service template and instructions for connecting your CRM to AI agents.

The tutorial assumes your bot is already configured. You’ll need your API key and botId. For more information, see Creating a custom CRM integration.

About the Node.js service template

Applications can be built using any programming language or technology stack.

The template project uses a ready-made template project built with Node.js and Express. The tempate provides a simple server that:

  • Handles events received from the bot
  • Sends visitor messages to the bot

The template includes a middleware service that acts as an intermediary between your application and the Ultimate Chat API.

Your CRM integration is typically responsible for the following actions:

Quick start

To launch the template project:

  1. Install the dependencies:
    npm install
  2. Create your environment file by copying ".env.example" to ".env" and entering your API key, bot ID, and any other necessary configuration.
  3. Build and test the service:
    npm run build && npm run test
  4. Start the application:
    npm run dev
  5. Test your webhook endpoints using the provided Postman collection CustomCrmWebhook.postman_collection.json to send sample requests and verify integration.