Google Drive Writer
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai. Please migrate to the recommended alternative components.
The Google Drive Writer lets you take data that’s already in your workflow and save it as a file in a folder on your Google Drive. It’s useful when you want to archive results, share reports, or feed files into other tools that read from Drive.
How it Works
When you run the component, it uses the Google Drive API to create a new file in the folder you specify. The file’s name comes from the File Name input, and the content comes from the File content input. The component first looks up the Google Drive credential you selected, obtains an access token, and then calls the Drive API to upload the file. Once the upload finishes, the component returns the full path (URL) to the newly created file so you can use it later in your workflow.
Inputs
Before you can use the component, you must set up a Google Drive credential in Nappai’s Credentials section. After that, select that credential in the component’s Credential field.
Input Fields
- File content: The data you want to write to the file. This can be a list of text blocks, CSV rows, or any other data that can be turned into a file.
- Select folder to upload: The ID of the Google Drive folder where the file will be stored. You can choose a folder from a directory selector that shows your Drive folders.
- File Name: The name you want to give the new file (e.g.,
report.csv
ornotes.txt
). This field is required.
Outputs
- Path to File: After the file is uploaded, the component returns the full URL or path to the file in Google Drive. You can use this output to link to the file, share it, or pass it to other components that need the file’s location.
Usage Example
-
Create a Google Drive credential
Go to Credentials → External Providers → Google Drive and add a new credential. Enter your Client ID, Client Secret, and select the “Google drive access” scope. -
Add the Google Drive Writer to your workflow
Drag the component onto the canvas and connect the output of the component that generates the data you want to save (e.g., a CSV generator) to the File content input. -
Configure the inputs
- Credential: Pick the credential you created.
- Select folder to upload: Choose the folder where the file should go.
- File Name: Type the desired file name, such as
sales_report.csv
.
-
Run the workflow
The component uploads the file and outputs the file’s path. You can then use that path to share the file or feed it into another component.
Related Components
- Google Drive Reader – Reads files from a Google Drive folder into your workflow.
- Google Drive Folder List – Lists all folders in your Drive so you can pick one.
- Google Drive File List – Lists files in a folder, useful for selecting existing files.
Tips and Best Practices
- Use descriptive file names so you can easily find the file later.
- Check folder permissions: The folder you upload to must allow the account used by the credential to write files.
- Keep the file content small when possible; large uploads may take longer and could hit API limits.
- Validate the output path before using it downstream to avoid broken links.
Security Considerations
- Store your Google Drive credentials securely in Nappai’s credential store; never hard‑code them in your workflow.
- The component uses OAuth tokens that expire; Nappai handles token refresh automatically, but ensure your credential has the correct scopes.
- If you share the workflow with others, they will need access to the same Google Drive credential or a credential with similar permissions.