Name: sendMessage
type Mutation {
sendMessage(chat_id: uuid!, message: String!): SendMessageOutput
}type SendMessageOutput {
success: Boolean!
message: String!
response: String
}Your n8n webhook URL: https://your-n8n-instance.com/webhook/chatbot
{
"Content-Type": "application/json"
}- authorization
- x-hasura-user-id
- x-hasura-role
Role: user
No additional permissions needed (will inherit from session variables)
The action will send this payload to n8n:
{
"input": {
"chat_id": "{{$body.input.chat_id}}",
"message": "{{$body.input.message}}"
},
"session_variables": {
"x-hasura-user-id": "{{$body.session_variables['x-hasura-user-id']}}",
"x-hasura-role": "{{$body.session_variables['x-hasura-role']}}"
}
}