Hi everyone! I have an issue that I can't solved. I'm trying to speak with one of my agent through n8n but I get this error all the time. And I'm sure this is the right workspace id. I'm using POST and URL https://dust.tt/api/v1/w/xxx/assistant/conversations to talk with the agent Any idea? 🙏 Thanks a lot
What does the body of your POST request look like?
{ "agentId": "xxx", "messages": [ { "role": "user", "content": "{{ $json.transcript }}" } ] }
So you're trying to create a new conversation, right? I think it should look more like:
{
"message": {
"content": "Conversation created from API",
"mentions": [
{
"configurationId": "claude-3-7-sonnet"
}
],
"context": {
"username": "yourname",
"timezone": "Europe/Paris"
}
},
"blocking": true
}And pass your agent ID in configurationId instead of claude-3-7-sonnet.
Thank you! It's better I have a result but it is not an answer from the agent : id:xxxx owner id:xx sId:xxx name:xx role:builder segmentation:[null] ssoEnforced:false whiteListedProviders:[null] defaultEmbeddingProvider:[null] metadata isBusiness:false created:xx sId:xx title:[null] visibility:unlisted content:[empty array] requestedGroupIds:[empty array]
Pauline Leroy in my initial reply, I had forgotten the "blocking": true, and added it later above. Can you try adding that?
same results
It's a little hard to make sense of what you pasted, because it doesn't have the structure/braces. Normally, the response should have a conversation property, and a message property.
Ah, yes, clearer! Normally, the interesting part should be in the content array, but yours is empty and I'm not sure why. 🤔
My best suggestion is to isolate by starting simple. Does it work if you send exactly this in the body?
{
"message": {
"content": "What day is today?",
"mentions": [
{
"configurationId": "claude-3-7-sonnet"
}
],
"context": {
"username": "yourname",
"timezone": "Europe/Paris"
}
},
"blocking": true
}Then if it does, you can add your things one by one: your agent ID, your content.
is it the right post url : https://dust.tt/api/v1/w/workspaceid/assistant/conversations
Yes, it's definitely the right one. https://docs.dust.tt/reference/post_api-v1-w-wid-assistant-conversations
No it's the same type of answer without content. Or can it be because we don't have the agent ID yet?
No, because in my simple case, you just use claude-3-7-sonnet, so you don't need your own agent ID. Sending this exact body works for me using postman. Maybe you can try postman to isolate, in case n8n is doing something funny?
