Notifications

A Notification is our feature that sends E-Mails when specific actions occur in the folder.

Emails are sent in batches, with email frequency options of every 5 minutes, every 15 minutes, hourly, or daily. They will include a list of the matching actions within the configured notification period, limited to the first 100.

Resource Schema

Optional

PropertyDescription
path
String
Folder path to notify on. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
group_id
Int64
ID of Group to receive notifications
group_ids
List
Group IDs when the notification requires multiple groups
triggering_group_ids
List
If set, will only notify on actions made by a member of one of the specified groups
triggering_user_ids
List
If set, will only notify on actions made one of the specified users
trigger_by_share_recipients
Bool
Notify when actions are performed by a share recipient?
notify_user_actions
Bool
If true, will send notifications about a user's own activity to that user. If false, only activity performed by other users (or anonymous users) will be sent in notifications.
notify_on_copy
Bool
Trigger on files copied to this path?
notify_on_delete
Bool
Trigger on files deleted in this path?
notify_on_download
Bool
Trigger on files downloaded in this path?
notify_on_move
Bool
Trigger on files moved to this path?
notify_on_upload
Bool
Trigger on files created/uploaded/updated/changed in this path?
recursive
Bool
Apply notification recursively? This will enable notifications for each subfolder.
send_interval
String
The time interval that notifications are aggregated to
Possible values: five_minutes, fifteen_minutes, hourly, daily
subject
String
Custom subject line to use for notification emails
message
String
Custom message to include in notification emails
triggering_filenames
List
Array of filenames (possibly with wildcards) to scope trigger
workspace_id
Int64
Workspace ID. 0 means the default workspace.
user_id
Int64
Notification user ID
username
String
Notification username

Read Only

PropertyDescription
id
Int64
Notification ID
group_name
String
Group name, if a Group ID is set
group_names
List
Group names when the notification requires multiple groups
unsubscribed
Bool
Is the user unsubscribed from this notification?
unsubscribed_reason
String
The reason that the user unsubscribed
Possible values: none, unsubscribe_link_clicked, mail_bounced, mail_marked_as_spam
suppressed_email
Bool
If true, it means that the recipient at this user's email address has manually unsubscribed from all emails, or had their email "hard bounce", which means that we are unable to send mail to this user's current email address. Notifications will resume if the user changes their email address.

Example Resource

resource "files_notification" "example_notification" {
  user_id                     = 1
  notify_on_copy              = false
  notify_on_delete            = true
  notify_on_download          = true
  notify_on_move              = true
  notify_on_upload            = true
  notify_user_actions         = false
  recursive                   = false
  send_interval               = "daily"
  subject                     = "Vendor A CSV Activity"
  message                     = "custom notification email message"
  triggering_filenames        = ["*.jpg", "notify_file.txt"]
  triggering_group_ids        = [1]
  triggering_user_ids         = [1]
  trigger_by_share_recipients = true
  workspace_id                = 1
  group_id                    = 1
  group_ids                   = [1]
  username                    = "User"
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Notifications can be imported by specifying the id.
terraform import files_notification.example_notification 1

Data Source Schema

Required

PropertyDescription
id
Int64
Notification ID

Read Only

PropertyDescription
path
String
Folder path to notify on. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
group_id
Int64
ID of Group to receive notifications
group_name
String
Group name, if a Group ID is set
group_ids
List
Group IDs when the notification requires multiple groups
group_names
List
Group names when the notification requires multiple groups
triggering_group_ids
List
If set, will only notify on actions made by a member of one of the specified groups
triggering_user_ids
List
If set, will only notify on actions made one of the specified users
trigger_by_share_recipients
Bool
Notify when actions are performed by a share recipient?
notify_user_actions
Bool
If true, will send notifications about a user's own activity to that user. If false, only activity performed by other users (or anonymous users) will be sent in notifications.
notify_on_copy
Bool
Trigger on files copied to this path?
notify_on_delete
Bool
Trigger on files deleted in this path?
notify_on_download
Bool
Trigger on files downloaded in this path?
notify_on_move
Bool
Trigger on files moved to this path?
notify_on_upload
Bool
Trigger on files created/uploaded/updated/changed in this path?
recursive
Bool
Apply notification recursively? This will enable notifications for each subfolder.
send_interval
String
The time interval that notifications are aggregated to
Possible values: five_minutes, fifteen_minutes, hourly, daily
subject
String
Custom subject line to use for notification emails
message
String
Custom message to include in notification emails
triggering_filenames
List
Array of filenames (possibly with wildcards) to scope trigger
workspace_id
Int64
Workspace ID. 0 means the default workspace.
unsubscribed
Bool
Is the user unsubscribed from this notification?
unsubscribed_reason
String
The reason that the user unsubscribed
Possible values: none, unsubscribe_link_clicked, mail_bounced, mail_marked_as_spam
user_id
Int64
Notification user ID
username
String
Notification username
suppressed_email
Bool
If true, it means that the recipient at this user's email address has manually unsubscribed from all emails, or had their email "hard bounce", which means that we are unable to send mail to this user's current email address. Notifications will resume if the user changes their email address.

Example Data Source

data "files_notification" "example_notification" {
  id = 1
}