Skip to main content
Beta
This action is part of Loops, which are in beta and require the Developer Toolkit. To join the beta, email [email protected].

Save File to Loop

The Save File to Loop action copies files from the current run onto a loop. The files stay with the loop after this run's history is deleted, so later runs of the loop can load them again with Load Loop Files.

When to Use This Action​

Use this action when:

  • You want to keep an attachment from a customer's email, such as a signed quote or a bill, with the loop it belongs to
  • You want to keep a file a workflow generated, such as a PDF, for a later stage

If you only need the file within this run, use it directly. To store a value rather than a file, use Update Loop Data.

Configuration​

FieldDescription
LoopThe ID of the loop. Optional in a loop stage or event: leave it empty to use the loop this run belongs to. Required everywhere else, including in a macro or AI action called from a loop run, because those do not see the calling loop. Supports text expressions.
FilesThe files to save. Select one or more file properties, or select All Files. The action selects no files by default. Each file keeps its name (its label in the run), its file name (such as bill.pdf), and its content type.

Returned Variables​

The action returns a list with one entry per saved file. If no file was selected, the list is empty.

VariableDescription
idThe ID of the file on the loop
nameThe name of the file
filenameThe file name, for example bill.pdf
content_typeThe content type, for example application/pdf
size_bytesThe size of the file in bytes
sha256The SHA-256 checksum of the file's content

Notes​

  • The loop must belong to your account. An unknown loop ID fails the action.
  • You can save files to a closed loop.
  • Running the action again saves the files again, so the loop then holds two copies.
  • If a selected file is no longer available, the action fails. Any files the action saved before that point stay on the loop. Before retrying, make sure the missing file is available and select only the files you still need to save.
  • The run history shows which files the action saved.