Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
Required. The agent to import the flow into. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.
Authorization requires the following IAM permission on the specified resource parent:
dialogflow.flows.create
Request body
The request body contains data with the following structure:
JSON representation
{"importOption": enum (ImportOption),"flowImportStrategy": {object (FlowImportStrategy)},// Union field flow can be only one of the following:"flowUri": string,"flowContent": string// End of list of possible types for union field flow.}
Optional. Specifies the import strategy used when resolving resource conflicts.
Union field flow. Required. The flow to import. flow can be only one of the following:
flowUri
string
The Google Cloud Storage URI to import flow from. The format of this URI must be gs://<bucket-name>/<object-name>.
Dialogflow performs a read operation for the Cloud Storage object on the caller's behalf, so your request authentication must have read permissions for the object. For more information, see Dialogflow access control.
Always respect settings in exported flow content. It may cause a import failure if some settings (e.g. custom NLU) are not supported in the agent to import into.
FALLBACK
Fallback to default settings if some settings are not supported in the agent to import into. E.g. Standard NLU will be used if custom NLU is not available.
FlowImportStrategy
The flow import strategy used for resource conflict resolution associated with an ImportFlowRequest.
Optional. Global flow import strategy for resource conflict resolution. The import Import strategy for resource conflict resolution, applied globally throughout the flow. It will be applied for all display name conflicts in the imported content. If not specified, 'CREATE_NEW' is assumed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis document outlines how to import a flow into a Dialogflow CX agent from a binary file using a long-running operation.\u003c/p\u003e\n"],["\u003cp\u003eThe import process requires a POST request to a specified endpoint, including the agent's details in the \u003ccode\u003eparent\u003c/code\u003e path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain the flow data, specified as either a Google Cloud Storage URI (\u003ccode\u003eflowUri\u003c/code\u003e) or raw, uncompressed byte content (\u003ccode\u003eflowContent\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the flow import behavior by selecting an \u003ccode\u003eimportOption\u003c/code\u003e to manage settings, and a \u003ccode\u003eflowImportStrategy\u003c/code\u003e to handle resource conflicts.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires either \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e authorization scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.agents.flows.import\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [ImportOption](#ImportOption)\n- [FlowImportStrategy](#FlowImportStrategy)\n - [JSON representation](#FlowImportStrategy.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nImports the specified flow to the specified agent from a binary file.\n\nThis method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields:\n\n- `metadata`: An empty [Struct message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)\n- `response`: [ImportFlowResponse](/dialogflow/cx/docs/reference/rest/v3beta1/ImportFlowResponse)\n\nNote: You should always train a flow prior to sending it queries. See the [training documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).\n\n### HTTP request\n\n`POST https://{endpoint}/v3beta1/{parent=projects/*/locations/*/agents/*}/flows:import`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/cx/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\nImportOption\n------------\n\nImport option.\n\nFlowImportStrategy\n------------------\n\nThe flow import strategy used for resource conflict resolution associated with an `ImportFlowRequest`."]]