How yo create an AI chatbot with Dialogflow
Learn how to connect Dialogflow with Crisp to build a custom AI chatbot integration.
This guide is intended for teams that want to maintain their own Dialogflow-based bot and connect it to Crisp through the Crisp APIs. If you want a native Crisp AI support agent instead, start with Hugo.
Before you start
Dialogflow is a Google platform for building conversational agents. In this setup, Dialogflow handles intent detection, while Crisp receives the visitor messages and sends the bot replies back to the conversation.
You will need:
- A Crisp workspace with access to API credentials
- A Dialogflow agent with at least one intent
- A backend environment where you can run the connector code
- Basic familiarity with Node.js and environment variables
Understand the integration flow
A Dialogflow bot is organized around an agent. When a visitor sends a message, Dialogflow matches that message against an intent, extracts useful parameters if needed, then returns a response or calls your fulfillment code.

With Crisp in the middle, the flow usually looks like this:
- A visitor sends a message through the Crisp chatbox.
- Your backend receives the message through the Crisp RTM API.
- Your backend sends the message to Dialogflow.
- Dialogflow returns the matched intent response.
- Your backend sends the response back to Crisp through the REST API.
Create a Dialogflow agent and intent
Go to Dialogflow and create an agent if you do not already have one.
Create the agent
- Sign in to Dialogflow.
- Click Create new agent in the left navigation.
- Choose a name, default language, and Google Cloud project.
- Click Create.
Create a first intent
For a quick test, create a simple ping-pong intent.
- Open the Intents section.
- Click Create intent.
- Add
pingas a training phrase. - Add
pongas the response. - Click Save.

Test the intent
Use the Try it now panel in Dialogflow and send ping. Dialogflow should return pong as the response.

Get your Dialogflow API credentials
Your backend needs Google credentials to call Dialogflow.
- Follow Google's service account guide: Create service account credentials.
- Add the Dialogflow API Client role to the service account.
- Download the credentials file in JSON format.
- Store that file securely on your backend host.
Connect Dialogflow to Crisp
You can use Crisp's Dialogflow example repository as a starting point, then adapt it to your own bot logic.
- Clone the example repository: crisp-im/crisp-dialogflow.
- Install the dependencies with
npm install. - Create your Crisp API credentials from the REST API authentication guide.
- Add your Crisp credentials to the project fields: crispIdentifier and crispKey.
- Add your Dialogflow project ID in dialogflowProjectId.
- Set the Google credentials environment variable.
- Run the connector from the project root with
node lib/index.js.
Environment variable examples:
- macOS or Linux →
export GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_KEY_FILE.json - Windows PowerShell →
$env:GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH"
Once the connector is running, open your Crisp chatbox as a visitor and send ping. If everything is configured correctly, your bot should reply with pong.
Where to go next
After the ping-pong test works, replace the example intent with the intents your customers actually need. You can also add fulfillment logic if Dialogflow needs to call your own backend before replying.
Useful resources:
- Dialogflow ES tutorials
- Dialogflow ES how-to guides
- Dialogflow ES samples
- Crisp REST API quickstart
- Crisp RTM API quickstart
Updated on: 03/05/2026
Thank you!