Create

Creates a context

5 variables
4 variables

Creates a context.

If the specified context already exists, overrides the context

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • View and manage your data across Google Cloud Platform services
  • View, manage and query your Dialogflow agents

Input

This building block consumes 5 input parameters

  = Parameter name
  = Format

parent STRING Required

Required. The session to create a context for. Format: projects/<Project ID>/agent/sessions/<Session ID>

lifespanCount INTEGER

Optional. The number of conversational query requests after which the context expires. If set to 0 (the default) the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries

name STRING

Required. The unique identifier of the context. Format: projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>.

The Context ID is always converted to lowercase, may only contain characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long

parameters OBJECT

Optional. The collection of parameters associated with this context. Refer to this doc for syntax

parameters.customKey.value ANY Required

Optional. The collection of parameters associated with this context. Refer to this doc for syntax

Output

This building block provides 4 output parameters

  = Parameter name
  = Format

lifespanCount INTEGER

Optional. The number of conversational query requests after which the context expires. If set to 0 (the default) the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries

name STRING

Required. The unique identifier of the context. Format: projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>.

The Context ID is always converted to lowercase, may only contain characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long

parameters OBJECT

Optional. The collection of parameters associated with this context. Refer to this doc for syntax

parameters.customKey.value ANY

Optional. The collection of parameters associated with this context. Refer to this doc for syntax