Copy an existing pipe report into the same pipe
Before You Begin
🔗 Use the GraphQL Playground to execute the mutations in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: Ensure your token has the necessary permissions to create reports in the pipe that owns the report you are copying.
- Report ID: Identify the report you want to duplicate.
When To Use This
Use duplicatePipeReport when you want a variant of a report that already exists: the
same filter with an extra column, the same columns over a different date range, or a
colleague's report as a starting point for your own. The copy is created with the
source's full configuration, so you only have to change what actually differs.
Step 1: Find The Report ID
Use the Get pipe reports query to list the reports in a pipe and
read the id of the one you want to copy.
query {
pipeReports(pipeUuid: "01234567-89ab-cdef-0123-456789abcdef") {
edges {
node {
id
name
}
}
}
}
Step 2: Duplicate The Report
Execute the duplicatePipeReport mutation:
mutation {
duplicatePipeReport(input: { id: "456789123" }) {
pipeReport {
id
name
cardCount
color
createdAt
fields
filter
featuredField
sortBy {
field
direction
}
selectedFormulaFields {
indexName
selectedFormula
}
}
}
}
Response Example
{
"data": {
"duplicatePipeReport": {
"pipeReport": {
"id": "456789124",
"name": "Sales Pipeline Overview (copy)",
"cardCount": 1250,
"color": "blue",
"createdAt": "2024-03-13T15:30:00Z",
"fields": ["title", "status", "assignee", "due_date", "priority"],
"filter": "{\"operator\":\"and\",\"queries\":[{\"field\":\"status\",\"operator\":\"contains\",\"value\":[\"in_progress\"]}]}",
"featuredField": "field_1_number",
"sortBy": {
"field": "card_id",
"direction": "asc"
},
"selectedFormulaFields": [
{
"indexName": "field_1_number",
"selectedFormula": "sum"
}
]
}
}
}
}
Arguments Explained
Required Arguments
id: The ID of the report to duplicate. The copy is always created in the same pipe
as the source; there is no argument to copy a report into a different pipe.
The mutation takes no other arguments. The copy's name is generated for you (see
below); to give it a different name, follow up with
Update pipe report.
What Gets Copied
The copy carries the source report's configuration:
fields: the column selectionfilter: the filter criteriaformulasandfeaturedField: the formula aggregations and the highlighted onesortBy: the sort field and direction
The copy differs from its source in four ways:
id: a new report, independent of the source. Editing or deleting either one
leaves the other untouched.name: the source name with a copy suffix, in the language of your request:
Sales Pipeline Overview (copy). If that name is taken, the suffix is numbered:
(copy 2),(copy 3), and so on.color: a new color is picked at random, so the copy is easy to tell apart from
its source in the reports list.- owner: the copy belongs to whoever calls the mutation, not to the source's
author. You can duplicate a report created by a colleague, and the resulting copy is
yours to edit.
Past exports of the source report are not copied. The new report starts with no export
history.
Key Fields Explained
Report Information
id: Unique identifier for the new reportname: Display name of the copy, including its copy suffixcardCount: Total number of cards included in the report (calculated in real time)color: The report's color name, for exampleblueorgreencreatedAt: Timestamp when the copy was created, not when the source was
Report Configuration
fields: Array of field names shown as report columnsfilter: The filter criteria, returned as a JSON-encoded string. Parse it before
reading its contents.featuredField: The formula field highlighted as the report's summarysortBy: How the report's cards are orderedfield: The sort fielddirection:ascordesc
selectedFormulaFields: Formula fields included in the reportindexName: The formula field identifierselectedFormula: The aggregation applied, for examplesum
Errors
| Error code | When it happens |
|---|---|
RESOURCE_NOT_FOUND | No report matches the given id, or the report has been deleted |
PERMISSION_DENIED | Your token cannot create reports in the pipe that owns the report |

