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. 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 documentation describes how to import a flow into an agent from a binary file using an HTTP POST request.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eparent\u003c/code\u003e path parameter specifying the agent, and the request body must contain either a Cloud Storage URI (\u003ccode\u003eflowUri\u003c/code\u003e) or raw byte content (\u003ccode\u003eflowContent\u003c/code\u003e) of the flow to be imported.\u003c/p\u003e\n"],["\u003cp\u003eThe flow import process supports different conflict resolution strategies (\u003ccode\u003eFlowImportStrategy\u003c/code\u003e) like creating new resources, replacing existing ones, keeping, merging or throwing an error.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eimportOption\u003c/code\u003e parameter determines how to handle flow settings, with \u003ccode\u003eKEEP\u003c/code\u003e respecting the exported content and \u003ccode\u003eFALLBACK\u003c/code\u003e reverting to default settings if needed.\u003c/p\u003e\n"],["\u003cp\u003eThe successful response of the request is in an instance of an \u003ccode\u003eOperation\u003c/code\u003e, and prior to sending queries, the user should always train the imported flow.\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/v3/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}/v3/{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/v3/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`."]]