4 min readUpdated Mar 2, 2026

writeSpreadsheet Documentation

Overview

The writeSpreadsheet function is designed to create a Google Sheet in Google Drive. This function enhances user data management by providing a structured way to export datasets into a formatted spreadsheet with proper headers and typed cells within a specified Intuidy folder. The function seamlessly integrates with cloud services, enabling efficient data storage and accessibility.

Settings

The writeSpreadsheet component has the following settings:

1. fileName

2. subfolder

How it Works

The writeSpreadsheet function operates asynchronously, using the writeFileNode function to handle the specifics of file writing. Here’s a brief outline of the workflow:

  1. Inputs: The function accepts an array of objects (datasets) through the inputs parameter. These datasets represent the data that will be written to the Google Sheet.

  2. Configuration: It merges provided config settings using the spread operator, ensuring that any provided configurations are applied while assigning default values where necessary.

  3. Context: The context parameter allows for additional metadata or context settings that might be required during the file writing process.

  4. The final execution results in creating a Google Sheet with the specified format, saved according to the configurations given.

Expected Data

The writeSpreadsheet function expects the following input data:

Use Cases & Examples

Use Cases

  1. Sales Data Reporting: A sales team can use writeSpreadsheet to export weekly sales data, formatted with headers such as "Date", "Product Name", "Revenue", etc., allowing for further analysis of sales trends.

  2. Project Management Tracking: A project manager can export project status updates to a Google Sheet, capturing information such as task names, statuses, assignments, and deadlines to enhance project visibility.

  3. Customer Feedback Collection: A marketing team can utilize their feedback collection framework to directly write customer responses into a structured spreadsheet for easier analysis and reporting.

Example Configuration

Use Case: Sales Data Reporting

Assuming a business wants to export its weekly sales data for better tracking and decision-making, they can configure the writeSpreadsheet component as follows:

Sample Configuration Data:

javascript
const inputs = [
    { date: '2023-10-01', productName: 'Product A', revenue: 150 },
    { date: '2023-10-01', productName: 'Product B', revenue: 200 },
    { date: '2023-10-02', productName: 'Product A', revenue: 100 },
    { date: '2023-10-02', productName: 'Product C', revenue: 250 },
];

const config = {
    fileName: 'Weekly_Sales_Report_October_2023',
    subfolder: 'SalesReports',
};

const context = {};

In this example:

This comprehensive setup enables sales teams to efficiently log, analyze, and report on sales data, enhancing operational efficiency.