Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Patching Intents with Dialogflow ES API

Hi Everyone, I'm trying to update intents using Dialogflow Es API.

According to the Update mask, I have to specify which elements I'm going to update.

https://cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects.agent.intents/patch

The issue here comes when trying to update some parameters.

Update masks is the error.

On the left, you can see I want to change just a variable on the intent.
Update mask with the [0] with the URL encoding changes this to different characters that google can't parse.
Mizar_0-1697385948131.png

So that why I set on updating mask

parameters[0].displayName
because
the display name is inside of the index [0]

Mizar_1-1697386018533.png

Also when I use the update mask without the index, I get 200 but the variable doesn't update

Mizar_2-1697386447240.png

 

 

 

 

 

0 2 375
2 REPLIES 2

Hi @Mizar,

Appreciate you reaching out to our community.

I get that you are having challenges updating intents through the Dialogflow ES API. The error (400: INVALID_ARGUMENT) you are getting points to an issue with the data that is being supplied to the parameter/ request.

You may need to double check the following:   

  • The intent name in the request should match the actual intent ID in your agent
  • The parameter names must be valid - values, data type and format
  • Make sure that the intent object/s you are trying to update does exist and are not read-only

Alternatively, consider exploring these resources as it might be helpful.

Hi All, I checked both and the only way I made it work, was by removing the update mask and then taking a copy of the actual intent, plus the parameter change, then after updating in that way it worked.