Overview
This n8n node integrates with Google Dialogflow (specifically, Dialogflow Messenger Bot) to process user input text and return intent detection results. It is useful for automating conversational AI workflows, such as chatbots or virtual assistants, where you want to send a user's message to Dialogflow and receive structured responses including detected intents, actions, and parameters.
Common scenarios:
- Building chatbots that need to understand user queries.
- Routing customer support requests based on detected intent.
- Automating FAQ responses using Dialogflow's NLP capabilities.
Practical example:
A user sends a question like "What's the weather today?" through your chatbot. This node sends the question to Dialogflow, which detects the intent (e.g., "get_weather") and returns relevant information for further processing in your workflow.
Properties
Name | Meaning |
---|---|
User ID | Identification for the User. Used to maintain session context per user. |
Input Text | The text to be processed. This is the user's message sent to Dialogflow. |
Contexts | List of contexts to include in the request. Each context has: - Name: Name of the context. - Lifespan: Number of conversational turns the context remains active. |
Output
The node outputs an array of objects, each containing:
{
"text": "Response from Dialogflow",
"intent": "DetectedIntentName",
"action": "ActionNameIfAny",
"parameters": { /* Key-value pairs extracted by Dialogflow */ }
}
- text: The fulfillment message returned by Dialogflow.
- intent: The name of the detected intent.
- action: The action associated with the intent, if any.
- parameters: Any parameters extracted from the user's input.
Dependencies
- External Service: Google Dialogflow API.
- Credentials: Requires n8n credentials of type
dialogflowCredentialsApi
, which must include:credentials_json
: JSON string of Google service account credentials.project_id
: Your Google Cloud project ID.
- n8n Configuration: Ensure the credentials are set up in n8n under the appropriate credential type.
Troubleshooting
Common issues:
- Invalid Credentials: If the provided credentials are incorrect or lack necessary permissions, authentication will fail.
- Missing Required Fields: Not providing required properties (User ID, Input Text) will result in errors.
- Dialogflow API Errors: Issues such as invalid project ID, misconfigured agent, or exceeding quota may cause errors.
Error messages and resolutions:
- "Could not load the credentials" – Check that your service account JSON is correct and has Dialogflow access.
- "Resource not found" – Verify the project ID and that the Dialogflow agent exists.
- "Missing required parameter" – Ensure all required fields are filled in the node configuration.