Files and output

Save File Block

Save File converts a variable or file reference into a saved file artifact.

At a glance

Best for
Saving variables as files
Input
Variable or file reference
Output
Saved file reference
Error handle
Yes

What it does

Save File turns text, objects, lists, or existing file variables into saved output.

Strings save as text, objects save as JSON, and arrays can be saved as JSON or CSV depending on settings.

Use it when

  • Save extracted rows as JSON.
  • Copy or rename a file created by another Block.
  • Create a file for upload or email attachment.

Do not use it when

  • You need spreadsheet formatting; use Create Spreadsheet.
  • You want to write directly to Google Sheets.
  • Cloud Run is configured with a local-only destination.

Settings

Save File needs a source variable, filename, destination, overwrite behavior, and output variable.

Source variable

Required: Yes
Variables
Variable name
Description
Variable or file reference to save.

Filename

Required: Yes
Variables
Yes
Description
Output file name.

File extension

Required: No
Variables
No
Description
Extension used when saving raw data.

Destination

Required: No
Variables
No
Description
Local or cloud destination depending on runtime.

Output variable

Required: Recommended
Variables
Variable name
Description
Stores the saved file reference.

Outputs

Save File outputs a file reference.

{{outputVariableName}}file

Saved file or cloud artifact reference.

Example Flow

Use Save File after creating a variable that should become a file.

  1. Extract, collect, or render data.
  2. Save the variable as a file.
  3. Upload or email the file if needed.

Errors and fixes

Start with symptoms visible in the editor or Inspector, then check the earliest Block that produced the wrong page state, variable, or output.

The source variable is missing.

Check
Check the variable name and execution order.
Fix
Create the source variable before Save File runs.

Cloud Run rejects local saving.

Check
Check destination.
Fix
Use cloud storage or a cloud artifact destination in Cloud Run.

Local and cloud runs

Cloud runs reject local destinations. Use cloud-compatible output when the Flow runs in the cloud.