You can export conversation messages to a Cloud Storage bucket. Each conversation is exported as a separate JSON file in the standard conversation data format. A maximum of 10,000 conversations can be exported at a time, and each conversation can have at most 1000 messages.
Authentication and access control
When you send a request to export conversations, use your end-user credentials for authentication. Your user account must be granted at least a read role for the Dialogflow API and an edit role (with the ability to overwrite objects) for the Cloud Storage bucket you want to export data to. For more details on user account roles see the Cloud Storage access control and Dialogflow access control documentation.
When executing REST requests at the command-line:
- Use
gcloud auth login
to authenticategcloud
with your user account. - Use
gcloud auth print-access-token
to create a token for request authentication.
Conversations available for export
Only conversations that have been completed are available for export. Old conversations are deleted by the system periodically, so if you try to reference an older conversation it may no longer be available.
Request export
To request export, call the
exportMessages
method. This method is a
long-running operation, so you
need to check the status for completion.