Building an Automated Excel Report Generation Workflow with Make and Gemini API

Building an Automated Excel Report Generation Workflow with Make and Gemini API: From Data Analysis to Visualization Automation

Tired of manual Excel report creation? Combine Make (formerly Integromat) and Gemini API to automate your Excel report generation workflow, from data analysis to visualization. This innovative approach saves time, reduces errors, and allows you to focus on data-driven decision-making.

1. The Challenge / Context

Weekly or monthly recurring Excel report generation is a time-consuming and labor-intensive task. Manually performing data collection, organization, analysis, and visualization processes is inefficient and prone to errors. Especially when various data sources need to be integrated, the complexity of the work further increases. To solve these problems and accelerate data-driven decision-making processes, an automated Excel report generation workflow is essential.

2. Deep Dive: Make (formerly Integromat)

Make is a powerful no-code platform that allows you to automate workflows by connecting various apps and services. Its intuitive visual interface enables you to build complex logic without coding. Key features of Make include:

  • Modules: Make is composed of modules, each representing an app or service. Examples include the Google Sheets module, Gmail module, and the Gemini API module, which we will discuss now.
  • Connections: Modules connect to apps or services via connections. Connections store authentication information, allowing modules to send and receive data.
  • Scenarios: Scenarios define the connections between modules to build a workflow. A scenario starts with a trigger module and executes a series of action modules.
  • Data Mapping: Make provides powerful functionality for mapping data between modules. Data mapping allows you to use the output of one module as the input for another.

3. Step-by-Step Guide / Implementation

Now, let's look at how to build an automated Excel report generation workflow step-by-step using Make and Gemini API. In this example, we will build a workflow that retrieves data from Google Sheets, analyzes it with the Gemini API, saves the analysis results back to Google Sheets, and finally generates an Excel report based on this data.

Step 1: Add and Connect Google Sheets Module

Create a new scenario in Make and add a Google Sheets module. Select the "Search Rows" action to read data from a specific range. Connect to your Google Sheets account and select the spreadsheet and sheet. Set the necessary filter and sorting options.


// Google Sheets module configuration example (JSON format)
{
  "action": "Search Rows",
  "connection": "your_google_sheets_connection",
  "spreadsheetId": "your_spreadsheet_id",
  "sheetName": "Sheet1",
  "range": "A1:C100",
  "filter": {
    "column": "Date",
    "condition": "greater_than",
    "value": "2023-01-01"
  }
}
        

Step 2: Add and Connect Gemini API Module

Add a Gemini API module and select the "Create Content" action. Connect to your Gemini API account and enter your API key. Write a prompt to instruct it to analyze the data retrieved from Google Sheets. For example, you can use a prompt like: "Analyze the following data to identify key trends and generate a summary report: {{rows}}". {{rows}} is the data retrieved from the Google Sheets module.


// Gemini API module configuration example (JSON format)
{
  "action": "Create Content",
  "connection": "your_gemini_api_connection",
  "prompt": "Analyze the following data to identify key trends and generate a summary report: {{rows}}",
  "model": "gemini-1.5-pro", // or desired model
  "temperature": 0.7
}
        

Step 3: Add Google Sheets Module (Update Results)

To save the Gemini API analysis results back to Google Sheets, add another Google Sheets module. This time, select the "Add a Row" or "Update a Row" action. Specify the columns where the analysis results will be stored and map the data retrieved from the Gemini API module.


// Google Sheets module configuration example (JSON format)
{
  "action": "Add a Row",
  "connection": "your_google_sheets_connection",
  "spreadsheetId": "your_spreadsheet_id",
  "sheetName": "Sheet1",
  "values": [
    "{{gemini_analysis}}", // Gemini API analysis result
    "{{current_date}}" // Current date
  ]
}
        

Step 4: Automate Excel Report Generation (e.g., using CloudConvert)

Finally, add a step to generate an Excel report based on the updated Google Sheets data. You can connect services like CloudConvert to Make to convert Google Sheets into an Excel file, and then send this file via email or save it to cloud storage. Add a CloudConvert module and select the "Convert File" action. Specify the Google Sheets file as the input file and set the output format to "xlsx". Afterwards, you can configure an email module to send the generated Excel file to a specified address.


// CloudConvert module configuration example (JSON format)
{
  "action": "Convert File",
  "connection": "your_cloudconvert_connection",
  "input": {
    "file": "{{google_sheets_file_url}}", // Google Sheets file URL
    "format": "ods" // Input file format (Google Sheets is processed after converting to ODS)
  },
  "outputformat": "xlsx"
}

// Email module configuration example (JSON format, after CloudConvert)
{
 "action": "Send Email",
 "connection": "your_email_connection",
 "to": "recipient@example.com",
 "subject": "Automatically Generated Excel Report",
 "body": "Please check the attached file.",
 "attachments": [
   {
     "name": "report.xlsx",
     "data": "{{cloudconvert_output_data}}" // CloudConvert output data
   }
 ]
}
        

Important: Directly converting Google Sheets to Excel might not be fully supported in Make. Therefore, you should use a method that first converts it to ODS (OpenDocument Spreadsheet) format via a service like CloudConvert, and then converts that to Excel (XLSX). While there is also a method to generate Excel files directly using the Google Sheets API, it requires coding knowledge and is somewhat distant from Make's no-code philosophy.

4. Real-world Use Case / Example

A marketing agency used this workflow to reduce the time spent on weekly campaign performance report generation from 8 hours to 1 hour. It automatically collected data from Google Ads, Facebook Ads, Google Analytics, and more, used the Gemini API to analyze key metrics, and automatically generated Excel reports to provide to clients. By reducing manual work time, the agency was able to invest more time in improving customer service and developing new business.

5. Pros & Cons / Critical Analysis

  • Pros:
    • Time Saving: Significantly reduced manual data processing and report generation time
    • Improved Accuracy: Reduced likelihood of errors with automated processes
    • Accelerated Data-Driven Decision Making: Quickly obtain up-to-date data-driven reports
    • Scalability: Ability to connect various data sources and services
  • Cons:
    • Initial Setup Complexity: Learning curve exists for first-time users of Make and Gemini API
    • API Usage Limits: Potential costs depending on Gemini API usage
    • Maintenance Required: Workflow updates needed when API or data sources change
    • Reliance on Gemini API's Answer Quality: Prompt engineering is crucial. Tuning may be required depending on data type.

6. FAQ

  • Q: What technical skill level is required to use Make?
    A: Make is a no-code platform, so you can use it without coding experience. However, a basic understanding of API connections and data mapping is necessary.
  • Q: What are the costs for using the Gemini API?
    A: Gemini API incurs costs based on usage. Please refer to the Google Cloud Platform Pricing Calculator for details.
  • Q: What are the advantages of this workflow compared to other Excel automation tools?
    A: Make offers the flexibility to connect various apps and services, and the advantage of automating data analysis and summarization features through the Gemini API. While methods using Python scripts also exist, Make allows you to build all of this in a no-code environment, shortening development time.
  • Q: What should I be careful about when writing Gemini API prompts?
    A: Prompts should be clear and specific. Explicitly state the analysis goal, desired output format, and any information to exclude. Additionally, you should experiment with various prompts to achieve optimal results.

7. Conclusion

The automated Excel report generation workflow using Make and Gemini API is a powerful solution that can revolutionize data analysis and reporting processes. It helps save time, reduce errors, and allows you to focus on data-driven decision-making. Create a Make account and get your Gemini API key now to build your automated Excel report generation workflow!