For the complete documentation index, see llms.txt. This page is also available as Markdown.

Variables

Learn about variable use in Transfer Automations

Overview

Variables let you dynamically build filenames and folder paths in Couchdrop Automations.

Instead of entering a fixed filename or destination path, you can use variables that are replaced with values from the file, the user, the workflow event, or the current timestamp when the Automation runs.

For example, you can use variables to:

  • Keep the original filename when moving or copying a file

  • Create folders based on the current year, month, or day

  • Include the uploading user in a destination path

  • Reference information from the event that triggered the Automation

  • Extract values from filenames or file contents and reuse them in later actions

Variables can be added anywhere an Automation action supports a filename or path.

You can also create Custom Variables using the Extract Variable from Filename action. For more details, see Supported Actions.

Default variables

The following variables are available for automations

Key
Value Example
Description

{USER}

michael.lawson

The user who was uploading the file

{EXISTING_NAME}

test.txt

The current filename including the extension

{EXISTING_NAME_NOEXT}

test

The current filename without the extension

{EXISTING_NAME_EXT}

.txt

The extension only of the current filename

{YYYY}

2023

The current timestamp year

{YY}

23

The current timestamp year in shortform

{MMM}

AUG

The month in a human readable format

{MM}

03

The month in a numerical format

{DD}

02

The day of the month

{TIME_HH}

23

Hour in 24 hour time

{TIME_MM}

30

Minutes of the hour

{TIME_SS}

24

Seconds on the minute

{TIMESTAMP}

1711330141

Unix timestamp. Number of seconds since Jan 1st 1970.

{TIMESTAMP_MS}

1659992501

Timestamp with milliseconds when the workflow was triggered

{EVENT.EVENT_TYPE}

download

Event type that executed the workflow

{EVENT.SYSTEM}

webportal

Specifies the channel where the workflow was originated

{EVENT.STORAGE_ENGINE}

googledrive

Storage type name where the workflow was originated

{EVENT.STORAGE_ENGINE_ID}

4c0a140-9177-4581-98d3-4ea7215364aa

Unique identifier of the configured storage where the workflow was originated

{EVENT.TIMESTAMP}

1659442224.463902

Raw timestamp value of the event triggered in the workflow

{EVENT.EVENT_ID}

bef26414-b7c1-41de-986e-98de45abcd

Unique identifier of the event triggered every time a workflow is executed. All actions configured int he same workflow will share the same event ID.

{EVENT.additional_info.required_fields.<FIELD_NAME>}

Substitute <field_name> with the name of the Web Inbox required field to access data provided on upload.

Example

A destination path such as:

/archive/{YYYY}/{MM}/{EXISTING_NAME}

could resolve to:

/archive/2026/08/test.txt

This lets the Automation organize files dynamically without requiring a separate workflow for each date or filename.

Custom variables

Custom variables let you extract information from a filename or from the contents of a file and use the extracted value in later Automation actions.

Couchdrop provides two actions for creating custom variables:

  • Extract Variable from Filename

  • Extract Variable from File

The extraction action must run before any action that uses the custom variable.

Extract Variable from Filename

Extract Variable from Filename uses a regular expression to extract a value from the filename and make that value available to later actions.

When creating the action, configure:

Setting
Description

Variable name

Enter a unique name for the variable.

Regex pattern

Enter the regular expression Couchdrop will use to extract the value from the filename.

Description

Optionally describe what the variable represents.

Test your regex

Enter an example filename to check what value the regular expression will extract. The first match is used.

After the variable has been created, use Add Automation Variable in a supported later action to insert it.

Example

If incoming files use a naming convention such as:

customer-4821-invoice.pdf

you could use Extract Variable from Filename with a regular expression that matches 4821, save it as a custom variable, and then reference that value in later actions.

Extract Variable from File

Extract Variable from File works in the same way but applies the regular expression to the contents of the file rather than its filename.

When creating the action, configure:

Setting
Description

Variable name

Enter a unique name for the variable.

Regex pattern

Enter the regular expression Couchdrop will use to extract the value from the file.

Description

Optionally describe what the variable represents.

Test your regex

Enter example text to check what value the regular expression will extract. The first match is used.

The extracted value can then be added to supported actions later in the workflow using Add Automation Variable.

Using custom variables after extraction

Custom variables are only available after their extraction action has successfully run.

For example, a workflow could:

  1. Use Extract Variable from Filename to identify a value in an incoming filename.

  2. Store the result as an Automation variable.

  3. Use that variable in the destination path or filename of a later action.

This allows one Automation to dynamically route or rename files based on information contained in the filename or file itself.

Last updated

Was this helpful?