When to use each path
| Goal | Recommended path |
|---|---|
| Move input rows only | Export the sheet as CSV, then upload into a new Table in the destination workspace. |
| Recreate a full Table with computed columns | Use the API workflow below. Migrate dependencies first, then recreate sheets, columns, and rows. |
| Copy a legacy Evaluation or Dataset | Use Migrate from Evaluations and Datasets when the source is still a legacy object. |
Prerequisites
Before you recreate a Table in the destination workspace, make sure the resources it depends on already exist there.- Prompt templates referenced by
Prompt Templatecolumns. - Workflows referenced by
Workflowcolumns. - Tools referenced by prompt tool-calling or
MCPcolumns. - Workspace environment variables and provider API keys required for prompt, code, and tool execution.
- Folder paths if you want the new Table in the same registry location. Use Resolve Folder ID by Path in the destination workspace.
Step-by-step: prod to local or cross-workspace
1. Export the source Table
In the source workspace, read the Table structure and row data. In the UI- Open the Table and review each sheet’s columns, source mappings, and score configuration.
- Click Download to export text-column values as CSV. See Download a sheet.
- Get Table and List Sheets.
- List Columns for each sheet. Save each column’s
type,config, anddependencies. - List Rows for text-column values.
- Get Score and score-history settings if you need to recreate scoring.
2. Migrate dependencies
Copy or publish the resources referenced inside columnconfig values before you recreate columns.
| Dependency | How to resolve in the destination workspace |
|---|---|
| Prompt template | Publish the template with the same name, or use Upsert Prompt Template by External ID so agents and scripts can resolve it by a stable {source, external_id} pair. |
| Workflow | Create Workflow in the destination workspace, or match by name with List Workflows. |
| Tool registry entry | Create Tool Registry in the destination workspace. |
| Registry folder | Resolve Folder ID by Path with the destination workspace API key. Folder IDs from the source workspace are not valid in another workspace. |
| Composition source | Recreate the source sheet in the destination Table first, or update composition config to point at the new sheet and column IDs. |
3. Create the destination Table
Switch to the destination workspace API key, then recreate the Table shell.- Create Table. Pass
folder_idwhen you resolved a destination folder. - For each sheet, either keep the default sheet or Create Sheet.
- Import text-column data with Import File, Import Request Logs, or Add Rows.
4. Remap IDs and recreate computed columns
Every workspace-specific ID in the exported column definitions must be replaced with the destination workspace IDs. Build two lookup maps while you recreate the sheet:| Map | Purpose |
|---|---|
column_id_map | Maps each source column_id to the new column ID in the destination sheet. |
resource_id_map | Maps source prompt template, workflow, tool, sheet, and table IDs to their destination equivalents. |
- Copy the source column
config, then replace workspace-scoped resource IDs usingresource_id_map. - Rewrite each
dependencies[].column_idusingcolumn_id_map. - For composition columns, update the source table, sheet, and column references to the recreated resources in the destination workspace.
Example: remap column dependencies
Source sheet in workspace A:config must also point at the template that exists in workspace B, not the source prompt_template_id.
Example: resolve a prompt template with External IDs
If the source template is attached to{ "source": "acme_cms", "external_id": "qa_template" }, publish or upsert the same mapping in the destination workspace before creating the column:
config when you create the column in the destination sheet.
5. Recreate scoring and run the sheet
- Configure Score to match the source sheet.
- Create Operation to recalculate computed columns. New computed cells start as
staleuntil recalculation completes. - Poll Get Operation until work finishes. Large sheets may return
requires_confirmationwith aconfirmation_token— pass that token in a follow-up request to proceed. - Compare destination outputs and scores against the source Table before switching automation.
Known limitations and mitigations
| Limitation | Impact | Mitigation |
|---|---|---|
| Workspace-scoped IDs | Table, sheet, column, and cell IDs cannot be copied directly. | Build column_id_map and resource_id_map while recreating the Table. |
| Computed cell values are not importable | Update Cell only edits text columns. You cannot paste completed computed outputs into the destination sheet through the API today. | Recalculate computed columns in the destination workspace, or keep source exports for offline comparison until computed-cell import is available. |
| Recalculation cost | Rebuilding a large Table reruns every prompt, workflow, code, and LLM eval column. | Recalculate in stages with column_ids and row_ids. Start with a small row sample to validate remapping before running the full sheet. |
| Provider keys required | Prompt, workflow, MCP, and code columns need working provider and env-var configuration in the destination workspace. | Copy workspace env vars and confirm provider keys before recalculation. |
| Composition across workspaces | Composition columns point at table, sheet, and column IDs in one workspace. | Recreate source sheets in the destination Table first, then update composition config. |
| MCP agent coverage | The PromptLayer MCP server does not yet expose Table create, update, or delete tools. Agents cannot fully automate cross-workspace migration through MCP alone. | Use the Tables REST API for migration scripts. Use resolve-folder-id and External ID tools for dependency lookup. |
| Partial delete support | The REST API supports Delete Table, Delete Sheet, and Delete Column, but iterative agent workflows may still lack matching MCP delete tools. | Use the REST API to clean up mistaken migration attempts. |
Recommended order
Migrate one sheet at a time.- Export and review the source Table.
- Migrate prompt templates, workflows, tools, folders, and env vars.
- Recreate text columns and import row data.
- Recreate computed columns with remapped
configanddependencies. - Recalculate a small row sample and compare outputs.
- Recreate scoring, run the full sheet, and validate score history.
- Point automation at the destination Table.
API references
Create Table
Create the destination Table.
Create Column
Recreate computed columns with remapped dependencies.
External IDs
Resolve prompt templates, workflows, and tools across workspaces.
Create Operation
Recalculate computed cells after migration.

