Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
É possível exportar mensagens de conversa para um bucket do Cloud Storage. Cada conversa é exportada como um arquivo JSON separado no formato padrão de dados de conversa.
É possível exportar no máximo 10.000 conversas por vez, e cada uma pode ter até 1.000 mensagens.
Autenticação e controle de acesso
Ao enviar uma solicitação para exportar conversas, use suas credenciais de usuário final para autenticação.
Sua conta de usuário precisa ter pelo menos um papel de leitura para a API Dialogflow e um papel de edição (com a capacidade de substituir objetos) para o bucket do Cloud Storage em que você quer exportar os dados. Para mais detalhes sobre as funções das contas de usuário, consulte a documentação de controle de acesso do Cloud Storage e controle de acesso do Dialogflow.
Ao executar solicitações REST na linha de comando:
Use gcloud auth login
para autenticar gcloud com sua conta de usuário.
Somente conversas concluídas estão disponíveis para exportação. As conversas antigas são excluídas periodicamente pelo sistema. Por isso, se você tentar fazer referência a uma conversa mais antiga, ela pode não estar mais disponível.
Solicitar exportação
Para solicitar a exportação, chame o método
exportMessages. Esse método é uma operação de longa duração. Portanto, é necessário verificar o status para saber se ela foi concluída.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[[["\u003cp\u003eThis feature is currently in a pre-general availability (Pre-GA) stage, meaning it is provided "as is" with potentially limited support, and it is subject to the "Pre-GA Offerings Terms".\u003c/p\u003e\n"],["\u003cp\u003eYou can export conversation messages to a Cloud Storage bucket as separate JSON files, with each conversation containing at most 1000 messages, and up to 10,000 conversations can be exported in one request.\u003c/p\u003e\n"],["\u003cp\u003eExporting conversations requires user authentication with at least a read role for the Dialogflow API and an edit role for the designated Cloud Storage bucket.\u003c/p\u003e\n"],["\u003cp\u003eOnly conversations that have been marked as completed are available for export, and older conversations may be deleted over time.\u003c/p\u003e\n"],["\u003cp\u003eTo initiate the export, use the \u003ccode\u003eexportMessages\u003c/code\u003e method, which operates as a long-running operation, requiring you to monitor its status for completion.\u003c/p\u003e\n"]]],[],null,["# Export conversation data\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nYou can export conversation messages to a\n[Cloud Storage](/storage/docs) bucket. Each conversation is exported as a\nseparate JSON file in the\n[standard conversation data format](/agent-assist/docs/conversation-data-format#conversation_transcript_data).\nA maximum of 10,000 conversations can be exported at a time, and each\nconversation can have at most 1000 messages.\n\nAuthentication and access control\n---------------------------------\n\nWhen you send a request to export conversations, use your\n[end-user credentials for authentication](/docs/authentication/end-user).\nYour user account must be granted at least a **read** role for the Dialogflow\nAPI 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\nroles see the [Cloud Storage access control](/storage/docs/access-control/iam-roles)\nand [Dialogflow access control](/dialogflow/docs/access-control) documentation.\n\nWhen executing REST requests at the command-line:\n\n- Use [`gcloud auth login`](/sdk/gcloud/reference/auth/login) to authenticate `gcloud` with your user account.\n- Use [`gcloud auth print-access-token`](/sdk/gcloud/reference/auth/print-access-token) to create a token for request authentication.\n\nConversations available for export\n----------------------------------\n\nOnly conversations that have been\n[completed](/agent-assist/docs/smart-reply#complete_the_conversation) are\navailable for export. Old conversations are deleted by the system periodically,\nso if you try to reference an older conversation it may no longer be available.\n\nRequest export\n--------------\n\nTo request export, call the\n[`exportMessages`](/dialogflow/es/docs/reference/rest/v2beta1/projects/exportMessages)\nmethod. This method is a\n[long-running operation](/dialogflow/docs/how/long-running-operations), so you\nneed to check the status for completion."]]