Skip to content

Copy All Sheets into One Spreadsheet (Google Sheets) v1.0.0 Help

Copies all sheets from the root or specified folder into one spreadsheet.

How can I use the Step?

Use the Step to merge multiple sheets into one spreadsheet. It helps manage projects with multiple teams using separate sheets to track progress. The Step makes it easier to create a high-level overview, track project milestones, and ensure all stakeholders are on the same page. Sales managers can use the Step to combine sheets where they track leads and sales data. So, the Step can help with gain insights into overall performance and market trends. Teachers and educators can also use sheets as gradebooks for their classes, which can be combined into one spreadsheet using the Step. This enables the administration to generate comprehensive reports, analyze student performance, and ensure consistent grading standards.

How does the Step work?

You authorize the Step with the option connected to the Google Sheets/drive account. You select the location of the sheets you want to copy and specify the ID of the spreadsheet where to save the copies. As a result, the Step creates sheet copies (from the selected folder) and saves them within the specified spreadsheet.

Prerequisites

To enable the use of any Step from the Google Sheets toolkit, complete the Prerequisites.

Authorization

First, you must select the Authorization type. The Google Sheets, Google Drive, and Google Calendar toolkits support two types:

  • OAuth 2.0: to authenticate as an end user and access user data in your app. It requires your app to request and receive consent from the user.
  • Service account: to authenticate as a robot service account or to access resources on behalf of Google Workspace or Cloud Identity users through domain-wide delegation. A service account is a special kind of account used by an application rather than a person. Read more in the Service accounts overview.

You can authorize the Step in two ways:

  • Inherit from the previous step: use the already configured authorization with the same type from the last executed Step of the Google Sheets/Drive/Calendar toolkits in the Flow. If you previously configured authorization in another Step from the toolkits and its authorization type matches the current Step, the Inherit from the previous step option is the default. If this option is selected, but there is no Step with the matching authorization type in the Flow, the Step results in an error.
  • Select authorization in the current step: choose authorization from the list of existing ones or create a new one. The gear button contains options to add a new authorization, delete an existing one, or refresh the list of added authorizations. Click Edit to update the fields of a service account authorization. An OAuth 2.0 authorization can be reauthorized.

Warning

If the user created an external app in their OAuth Consent Screen, the created authorization needs to be reauthorized in any Flow once approximately every 7 days.

If you need to create a new authorization, complete the following steps:

  1. Select the Authorization type in the corresponding dropdown.
  2. Click the Select authorization in current step.
  3. Click the Gear button, then Add. Alternatively, select Create new authorization in the dropdown.
  4. A modal window for creating a new authorization pops up. Follow the instructions in the modal's collapsible. When finished, the created Authorization name will be added to the list in the dropdown.
  5. Select the corresponding Authorization name in the Select authorization in current step dropdown.

Sheet copying settings

Select Location of sheets you want to copy. The default location is the Root folder, which is the main page of your Google Drive account. To add the spreadsheet to a specific folder, select this option and provide the Folder ID value. Folder ID is a unique identifier of an existing folder in a Google Drive account. You can find it in the URL of your folder, after folder/. Alternatively, you can extract the ID as a Merge field value using the List Items in Folder (Google Drive) or Find Items (Google Drive) steps.

Warning

We do not recommend copying more than 150 sheets in total.

Destination settings

You must enter a Spreadsheet ID (a unique identifier) of a spreadsheet where to save copies. Alternatively, you can provide the ID via a Merge field.

Note

Use the List Spreadsheets in Folder (Google Sheets) Step to get the Spreadsheet ID, or see Google Sheets API Overview for info.

Merge field settings

The Step returns the result as a JSON object and stores it under the provided Merge field name. The output includes the following properties:

KeyTypeDescription
folderIdstringId of a folder where sheets that must be copied are located.
filesarrayAnd array containing Id and name of sheets that are copied.
destinationSpreadsheetIdstringId of a spreadsheet where sheets copies are located.

To learn more about Merge fields and how to work with them, see our Merge fields guide.

Output example

The output has the following structure:

json
{
    "folderId": "1jDKRnMVlqlEfQHfxKZV460h15si",
    "files": [
        {
            "id": "1dDjPL3P3rI5vpl8ceNL4hK3onu1-AjFEz1LRZ",
            "name": "Test2"
        },
        {
            "id": "1ODo6wbbinfBslcTijwoi_8WxVf85J7HIAnrTyzD3E",
            "name": "Test1"
        }
    ],
    "destinationSpreadsheetId": "1KxbpXrpaGGzrzZoFShvq9LSGhKRb0JBvIQp"
}
{
    "folderId": "1jDKRnMVlqlEfQHfxKZV460h15si",
    "files": [
        {
            "id": "1dDjPL3P3rI5vpl8ceNL4hK3onu1-AjFEz1LRZ",
            "name": "Test2"
        },
        {
            "id": "1ODo6wbbinfBslcTijwoi_8WxVf85J7HIAnrTyzD3E",
            "name": "Test1"
        }
    ],
    "destinationSpreadsheetId": "1KxbpXrpaGGzrzZoFShvq9LSGhKRb0JBvIQp"
}

Error handling

By default, the Step handles errors using a separate exit. If any error occurs during the Step execution, the Flow proceeds down the error exit. For more information, see Error and timeout handling.

Note

If you disable the Handle error toggle, the Step does not handle errors. With this setup, if any error occurs during the Step execution, the Flow fails immediately after exceeding the Flow's timeout. To prevent the Flow from being suspended while continuing to handle errors in the Flow, place the Flow Error Handling Step before the main Flow logic.

Reporting

The Step automatically generates Reporting events during its execution, allowing for real-time tracking and analysis of its performance and user interactions. To learn more, see Reporting events.

Log level

By default, the Step inherits its log level from Flow's log level. You can change the Step's log level by selecting an appropriate option from the Log level list.

Tags

You can specify tags to organize the collected dat and filter session information when generating reports.

Service dependencies

  • flow builder v3.49.1
  • event-manager v2.0.1
  • deployer v2.18.0

Release notes

v1.0.0

  • Initial release