Export and import entities

You can export and import entities to simplify creation or movement of large amounts of entity data.

Where to find this data

When building an agent, it is most common to use the Dialogflow ES Console (visit documentation, open console). The instructions below focus on using the console. To access entity options data:

  1. Go to the Dialogflow ES Console.
  2. Select an agent.
  3. Select Entities in the left sidebar menu.
  4. Select the Custom tab for custom entities defined for your agent or the System tab for system entities used by your agent.

Format

The hand-editable import/export format is either JSON or CSV.

JSON format

See the EntityType REST reference.

CSV format

The CSV content should have the following format:

  • Each entity entry is on one line and ends with a newline.
  • Each value should be enclosed in double quotes.
  • Each value should be separated by commas.
  • For a map entity:
    • The reference value should be at the beginning of the line, followed by synonyms.
    • Include the reference value twice if you want it to be matched by the entity.
  • For a list entity:
    • Each line contains a single value.

For example, the following are two map entity entries:

"New York City", "New York City", "NYC", "New York City, USA"
"Philadelphia", "Philadelphia", "Philly", "Philadelphia, USA"

Export

To export an entity:

  1. Hover your mouse over an entity and click the cloud download icon.
  2. Choose JSON or CSV for the format.
  3. Choose a location on your system to save the file.

Import

To import an entity:

  1. Click the more icon.
  2. Click Upload entity and choose the file.