Define an IF Condition

It is important to note that not all actions are compatible with all conditions and it is up to the user to determine and setup correct workflows.

When you create a workflow, you must select a condition to act as a trigger.

  • Depending on the trigger, additional parameters may be required. 
  • Once a Condition is selected, compatible Actions can be selected.


When you create a new Workflow, you will be able to select a condition.


After you select a Condition, then you can enter any parameters, such as a date or time.

If you need more information about what parameters are required, look below the Required Parameters box.


Available Conditions

Client App Conditions


Workflow ConditionParametersDescription
If any new client app connectsNo parameters required

This condition is triggered when an external (non-browser) client connects to FileCloud Server.

For example, this condition will trigger for clients such as:

  • FileCloudSync
  • FileCloudDrive
  • iOS
  • Android App

File Conditions

Workflow ConditionParametersDescription
If a file is created{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered if a file is created via any means (Browser, Clients, etc.)

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies how the folder path is validated.

  • 0 or unspecified = use an exact match for the parent folder path string
  • 1 = use a regular expression match for the parent folder path string

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).

Workflow ConditionParametersDescription
If a file is updated.{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered if a file is updated.

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies how the folder path is validated.

  • 0 or unspecified = use an exact match for the parent folder path string
  • 1 = use a regular expression match for the parent folder path string

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).


Workflow ConditionParametersDescription
If a file is deleted{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered if a file is deleted.

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies how the folder path is validated.

  • 0 or unspecified = use an exact match for the parent folder path string
  • 1 = use a regular expression match for the parent folder path string

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).



Workflow ConditionParametersDescription
If a file is downloaded{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered if a file is downloaded

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies how the folder path is validated.

  • 0 or unspecified = use an exact match for the parent folder path string
  • 1 = use a regular expression match for the parent folder path string

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).




Workflow ConditionParametersDescription
If a file was not modified for specified days
{
  "parent_folder_path_string": "/johndoe",
  "number_of_days": 7,
  "skip_recently_accessed": 1,
  "exclude_recyclebin": 1,
  "exclude": ".*secret.*"
}

This condition will be triggered if a file is not updated for specified number of days.

  • This is useful for removing old files that are no longer being used
  • This check will run once a day

parent_folder_path_string - required as a parameter for this condition to trigger.

  • If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.
  • NOTE: ONLY Managed storage paths are supported for this condition.

number_of_days - required to specify the number of days before the current date that a file was last modified.

  • This will be checked once a day and all files that match this condition will be subject to the THEN action you choose.
  • For example, if you specify the number of days as 15, all files in the specified folder that have not been modified in the last 15 days will subject to the the THEN action you configure.

skip_recently_accessed - required to specify whether files that were viewed or downloaded during the number of days are considered modified. Default is false, viewed or downloaded files are not considered recently modified. When true, files viewed or downloaded within number_of_days are considered modified and will not be included in the Then action.

exclude_recyclebin - (added in FileCloud version 21.3) optional (default is false) When true, files in recycle bin are not considered.

exclude - (added in FileCloud version 22.1) optional - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).

Workflow ConditionParametersDescription
If a file is added or updated{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered if a file is added or updated

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies how the folder path is validated.

  • 0 or unspecified = use an exact match for the parent folder path string
  • 1 = use a regular expression match for the parent folder path string

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).

Workflow ConditionParametersDescription
If the file uploaded is bigger than expected size.{ 
"size":"4" 
}

This condition will be triggered when an uploaded file is bigger than the size specified.

size- specifies the maximum expected file size in MB.

Workflow ConditionParametersDescription
If the file downloaded is bigger than expected size.{ 
"size":"4" 
}

This condition will be triggered when a downloaded file is bigger than the size specified.

size- specifies the maximum expected file size in MB.

Folder Conditions

Workflow ConditionParametersDescription
If a folder is created{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered when a folder is created in the system

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies whether system uses an exact match for the parent folder path string ("use_regex": "0" or missing) or whether to use a regular expression match ("use_regex":"1")

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).


Workflow ConditionParametersDescription
If a folder is deleted{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered when a folder is deleted

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies whether system uses an exact match for the parent folder path string ("use_regex": "0" or missing) or whether to use a regular expression match ("use_regex":"1")

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).


User Account Conditions

Workflow ConditionParametersDescription
If a user's last login is older than ...
{
    "last_login_days_ago": 30,
    "user_account_type": "USER_ACCOUNT_LIMITED_ACCESS",
    "day_interval": 1,
    "skip_users_not_logged_in": 1,
    "include_domain": "domain.com",
    "exclude_domain": "subdomain.domain.com,@otherdomain.com"
}



For example, every five days to check for external (limited) access users who have not logged in for the last 30 days:

{
    "last_login_days_ago": 30,
    "user_account_type": "USER_ACCOUNT_LIMITED_ACCESS",
    "day_interval": 1,
    "skip_users_not_logged_in": 1
}

If a user's last login is older than the specified number of days, then the THEN condition you configure will be run. 
last_login_days_ago: last login of a user account in number of days ago. 
user_account_type - type of account. You must use one of the following values:

  • USER_ACCOUNT_ANY
  • USER_ACCOUNT_FULL_ACCESS
  • USER_ACCOUNT_GUEST_ACCESS
  • USER_ACCOUNT_LIMITED_ACCESS (for external users)
  • USER_ACCOUNT_DISABLED

day_interval - the number of days between checks

  • For daily operation, specify a value of 1

skip_users_not_logged_in (optional): Skip users who have never logged in to the system. This enables you to only apply the action to users who are already using the system. Values are true and false.

include_domain - Optional. If the user's email domain matches one of the domains listed here,  the condition applies.

exclude_domain - Optional. If the user's email matches one of the domains listed here, the condition does not apply.



This tells FileCloud that if a new user account is created to trigger the THEN action.

Workflow ConditionParametersDescription
If a new user is created ...

None

When a new user account is created, the THEN action you configure will be triggered.

Optional Parameters

auth-type - Type of authentication. This is optional and can be:

  • DEFAULT
  • ACTIVEDIRECTORY
  • LDAP

user_access_level: Account access level. This is optional and can be:

  • USER_ACCOUNT_ANY_ACCESS
  • USER_ACCOUNT_FULL_ACCESS
  • USER_ACCOUNT_GUEST_ACCESS
  • USER_ACCOUNT_LIMITED_ACCESS (for external users)

user_login_method: How user authenticates. This is optional and can be:

  • LOGIN_METHOD_ANY
  • LOGIN_METHOD_DEFAULT
  • LOGIN_METHOD_SSO

excluded_email_domains: (Available in FileCloud 21.2 and later) Email domain used to create the user. This is optional. If the new user has any of these domains, the workflow is not triggered.


Workflow ConditionParametersDescription
If a user's create date is older than

Available in FileCloud Version 23.232
{
"days": 30,
"include_domain": "contractor.com",
"exclude_domain": "subdomain.domain.com,@otherdomain.com"
}

For example, if a user's account was created more than 60 days ago and it is in the domain contractor.com

{
    "days": 60,
    "include_domain": "contractor.com",
}

This condition is triggered when a user's create date is older than the number of days specified in days.

Parameters

days - Required. When a user's create date is older than this number of days, the condition is triggered.

include_domain - Optional. If the user's email domain matches one of the domains listed here,  the condition applies.

exclude_domain - Optional. If the user's email matches one of the domains listed here, the condition does not apply.


Other Conditions

(lightbulb) Comments can be added to files and folders.

Workflow ConditionRequired ParametersDescription
If a comment is added{ 
"parent_folder_path_string":"/userid/somepath", 
"use_regex":"1", 
"exclude":"1" 
}

This condition will be triggered when a comment is added

parent_folder_path_string - required as a parameter for this condition to trigger. If the condition needs to be triggered for all folders, then you can set it to be "/". For help specifying the path correctly, see Identifying a FileCloud Specific Path.

use_regex (optional) - specifies whether system uses an exact match for the parent folder path string ("use_regex": "0" or missing) or whether to use a regular expression match ("use_regex":"1")

exclude (optional) - specifies the system should only perform the action on non-matching paths (do not perform the action on matching paths).

Workflow ConditionParametersDescription
Perform an action periodically at specified time and interval{ 
"time_string":"16:45:05",
"day_interval":"7"
}

This condition will be triggered when the current time on the FileCloud Server matches the supplied time.

time_string - the time when you want the THEN action triggered

  • The matching time includes the time zone
  • The time is specified in a 24-hour format of Hours, minutes, seconds

days_interval - number of days between triggering the THEN action you configure

  • The THEN action you choose will be triggered every "day_interval" days.
  • If the "day_interval" is 1, then it will be done daily

Workflow ConditionParametersDescription
Perform an action on the specified date{
"date_string":"2020-01-11"
}

When the date matches the supplied date and time, the THEN action you configure will be run.

date_string - date and time in a 24-hour format

  • yyyy-mm-dd H:i:s
Workflow ConditionParametersDescription
Perform an action periodicallyNone. The frequency depends on how you configure the cron or task scheduler frequency.

This requires you to set up one of the following:

  • cron job
  • task scheduler

Workflow ConditionParametersDescription
If a share has not been accessed for specified days

{ 
"share_permission":["PUBLIC", "PRIVATE"],
"number_of_days":"180", 
}

This condition will be triggered when a shared file or folder has not been accessed for the specified number of days. 

  • NOTE: The only supported action is Delete share.
  • This is useful for removing shared files that are no longer being used
  • This check will run once a day

share_permission - required as a parameter for this condition to trigger. An array that specifies the type of shares to monitor. Valid values are:

  • PUBLIC
  • PRIVATE

    Both PUBLIC and PRIVATE may be included in the array.

number_of_days - required to specify the number of days before the current date that a shared file was accessed.

  • This will be checked once a day and all files that match this condition will be subject to the THEN action you choose.
  • For example, if you specify the number of days as 15, all shared files or folders that have not been accessed in the last 15 days will subject to the the THEN action you configure.