A triggered sweep sweeps one record soon after something happens to it, instead of waiting for the nightly sweep. Each triggered sweep starts when a Quickbase email notification on your table sends the record's sweep parameters to File Attachment Sweep. The notification decides when a record is swept—for example, when a file is added. It goes to File Attachment Sweep, not to your users.
You create the notification once, on the table your sweep configuration uses. For how triggered sweeps fit in with nightly sweeps, see How sweeps run.
Before you start
Your sweep configuration must be set up to run as a triggered sweep (or both nightly and triggered), and it must be active. See Sweep configuration options.
You need the configuration's ID and config key. If your table has a File Sweep Console Arguments field (its name may start with a prefix, such as
Docs_File Sweep Console Arguments), it already holds both. Otherwise, open a technical support case to get them.Make sure you can create an email notification with the Open permission type in your app, so it can be sent to an address outside your app. If you can't select Open, contact your Quickbase account admin.
Create the email notification in Quickbase
In your Quickbase app, create a new email notification on the table with the files, and enter these settings:
Setting | Value |
|---|---|
Permission Type | Open: Emails sent openly to anyone |
Notification Name | Any name that makes sense to you, for example |
Notify Whom | A specific list of email addresses |
Email address |
|
Notify When | The record changes and conditions that should start a sweep (see Choosing when to notify). |
Message Type | Custom Message, Single Record Version |
Subject | Any subject. File Attachment Sweep doesn't use it, so pick one that helps you recognize the notification—for example, |
Custom Message | The sweep parameters, and nothing else (see Custom message). |
Save the notification.
Custom message
The message tells File Attachment Sweep which configuration to run and which record to sweep. If your table has a File Sweep Console Arguments field, the message is just that field in square brackets (use the field's full name, including any prefix):
[File Sweep Console Arguments]Otherwise, type the parameters yourself, on one line, separated by spaces:
configid=1234 recid=[Record ID#] configkey=a1b2c3 type=fasweepParameter | Description | Sample |
|---|---|---|
| The ID of your sweep configuration. |
|
| The record to sweep. Use the Record ID# field in square brackets, so each message names the record that changed. |
|
| Your configuration's key. It must match the key on the configuration, or the record isn't swept. Newer configurations require it. |
|
|
|
|
Note: Don't add other text, a signature, or formatting to the message, and keep it on one line. File Attachment Sweep reads the message as a list of parameters separated by spaces, so anything else can stop the record from being swept.
Choosing when to notify
Use Notify When and the notification's conditions so that a record is swept only when it has a new file. For example:
When a file is added. Notify when a record is added or modified and the file attachment field changes. Add a condition: the file attachment field is not empty.
When a record reaches a status. Notify when a record is modified and Status changes, and only when Status is, for example, Approved.
Important: Make sure the notification can't fire again because of the sweep it just started. After a file is swept, File Attachment Sweep updates the record: the uploaded checkbox, the file name and size, the S3 key or Dropbox link, the sweep date and time, and—if the configuration clears it—the file attachment field. Don't notify on changes to those fields without a condition that rules them out. The file attachment field is not empty condition above covers configurations that clear the field. If yours doesn't, add a condition such as uploaded checkbox is not checked—but then a file that replaces one that was already swept isn't swept again until you clear the checkbox.
Each notification sweeps one record. If many records change at once—for example, during an import—each one sends its own notification, and the records are swept a few at a time.
What happens after the notification is sent
File Attachment Sweep checks the configuration key, sweeps the record's file to the configuration's destination, and updates the record as the configuration says—for example, it checks the uploaded checkbox and writes the file name, size, and where the file went. See Record updates.
The record doesn't have to be in the configuration's report. A triggered sweep uses only the record in the message.
If the record can't be swept, it's left as it is, and nothing is written to the record. The reason is recorded with the configuration's run results, which support can look up.
Test it
Add your own email address to the notification as a second recipient, so you get a copy of what's sent.
Make the change your notification watches for—for example, attach a file to a test record.
Open the copy you received. The message should be one line, such as
configid=1234 recid=57 configkey=a1b2c3 type=fasweep, with the real Record ID# in place of[Record ID#]and no other text.Wait a minute or two, then refresh the record. The uploaded checkbox should be checked (if the configuration updates the record), and the file should be at the destination.
When it works, remove your address from the notification.
If nothing happens
What you see | What to check |
|---|---|
You didn't get a copy of the notification | The notification didn't fire. Check that it's on the right table and turned on, and that the record matches its Notify When settings and conditions. |
The copy has extra text, formatting, or a field name instead of a value | Edit the custom message so it holds only the parameters, on one line. Check that the field names in square brackets match your fields exactly. |
The copy looks right, but the record wasn't swept | Check the email address and |
The same record is swept again and again | The notification is firing on the fields the sweep updates. Add a condition as described in Choosing when to notify. |
For more, see File Attachment Sweep troubleshooting.