User Manual

Google Drive Create File

2/10/25
Google Drive Create File

The Google Drive Create File action is used to create a new file on Google Drive. This action allows your application to dynamically generate files and save them to a specified folder. It is particularly preferred in scenarios such as report generation, document automation, and file-based workflows.

Technical Specifications

  • File Creation: Creates a new file on Google Drive with the specified content, file name, and type (mimeType).
  • Parameter Compatibility:
    • settings (Object – required): Configuration information required for Google Drive integration.
    • fileName (String – required): The name of the file to be created.
    • content (String – required): File content.
    • folderId (String – optional): ID of the folder where the file will be saved. If left blank, it will be saved to the root directory.
    • mimeType (String – optional): File type (e.g., text/plain, application/pdf, application/vnd.google-apps.document).
  • Result: Returns a single response (One) → The ID and details of the created file.
  • Value Binding: Fixed values can be assigned to parameters, or dynamic values can be bound using the Symbol Picker tool.
  • Web & Mobile Support: Can be used in both web and mobile applications.

Google Drive Create File Action Application Steps

1. Defining the Action in UI Design

  • Open your project on the Kuika platform.
  • In the UI Design module, select the screen where you want to perform the file creation process.
  • Add a button (e.g., “Create File”).
  • Select the button and add the OnClick → Google → Google Drive Create File action from the + ADD ACTION menu.

2. Configuring Parameters

  • settings (required): Select the defined settings for Google Drive integration.
  • fileName (required): E.g.: “Report-2025.pdf”.
  • content (required): File content (e.g., text or base64-encoded data).
  • folderId (optional): The folder ID where the file will be saved.
  • mimeType (optional): E.g.: application/pdf → Creates a PDF file.

Use Case: Automatic Report Creation in Google Drive

In a reporting application, when a user clicks a button, the daily report content can be automatically converted into a file in Google Drive.

Steps:

  1. Add a Text Area element in UI Design → User enters content.
  2. When the “Create File” button is clicked, the Google Drive Create File action is triggered.
  3. Parameters →
    • fileName: “DailyReport.txt”
    • content: Textarea content
    • mimeType: text/plain
  4. The file is saved to Google Drive.

Google Drive Create File Advanced Customizations

  • Dynamic Naming: The file name can be automatically generated based on the date or user (e.g., “Report-2025-09-17.pdf”).
  • Folder-Based Saving: Files can be automatically added to a specific project folder.
  • Chain Usage: After the file is created, the file ID can be transferred to other actions (e.g., sharing, sending via email).

Technical Risks and Controls

  • If fileName and content are left blank, the file cannot be created.
  • If mimeType is entered incorrectly, the file may not open.
  • The user's Google Drive access permissions must be configured correctly.
No items found.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar