> For the complete documentation index, see [llms.txt](https://docs.rubica.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rubica.au/households/secure-files/setting-up-secure-files.md).

# Setting Up Secure Files

For admins. Placing the card, permissions, how links are emailed, automated sending and automatic filing.

## 1. Place the card

In the Lightning App Builder, open your household record page and drag **Secure Files** (custom component) onto it. A tab of its own (for example **Secure Files**) in the main column works best. You can also add it to the job record page (for example on a **Documents** tab): shares sent from a job are remembered against that job and also show on the household.

## 2. Give people access

Assign the **Rubica Secure Files** permission set to everyone who should send files or review uploads, usually every adviser and support staff member. It covers the card, the share records and the connections it needs.

## 3. Choose how links are emailed

Open **Site Configuration** and set **Secure Files Email Channel**:

| Setting                     | What happens                                                                                                                                                         |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Rubica email** (default)  | Sent by Rubica from *Your Firm via Rubica <<secure@rubica.au>>*, in Rubica's branded layout with your firm's name and colour. Replies go to the adviser who sent it. |
| **Firm Outlook (MS Graph)** | Sent from the adviser's own mailbox, using a Salesforce email template you can edit. Needs **Send Emails via MS Graph API** switched on.                             |

For **Firm Outlook**, the template used is the one in **Secure Share Email Template ID**. It's set to *Rubica Secure Files Link* for you. Edit that template in **Email Templates**, or point the field at your own. Use these placeholders:

| Placeholder       | Becomes                                                    |
| ----------------- | ---------------------------------------------------------- |
| `{{first_name}}`  | Recipient's first name                                     |
| `{{message}}`     | The adviser's message                                      |
| `{{summary}}`     | e.g. *1 document to download, and you can send files back* |
| `{{share_url}}`   | The recipient's private link                               |
| `{{expiry}}`      | Expiry date, e.g. *25 Nov 2026*                            |
| `{{Sender.Name}}` | The adviser                                                |
| `{{firm_name}}`   | Your firm                                                  |

## 4. Automated sending

Flows and Rubica agents can send secure files with the **Send secure files** action. It's off until you allow it: tick **Secure Files: Allow Automated Send** on Site Configuration.

The action takes the household, the people (contact Ids), the Salesforce Files to send, an optional message, optional requested documents and an optional expiry. People verify by text where a mobile is on file, or by email if *Verify by email* is set. Files sent by automation must be under about 4 MB each.

## 5. Automatic filing of kept uploads

To have uploads filed automatically when an adviser clicks **Keep**, put an https webhook address, usually a Workato recipe, in **Secure Files Webhook URL** on Site Configuration.

On each Keep, the webhook receives:

```json
{
  "event": "secure_files.upload_kept",
  "householdId": "001…", "householdName": "…",
  "shareId": "a1T…", "shareName": "…",
  "keptBy": "Adviser Name", "keptAt": "2026-10-26T05:00:00Z",
  "files": [
    { "uploadId": "a1W…", "fileName": "Super statement.pdf", "mimeType": "application/pdf",
      "sizeBytes": 234567, "requestItem": "Last 2 super statements",
      "downloadUrl": "https://storage.googleapis.com/…", "expiresAt": "…" }
  ]
}
```

`downloadUrl` works for 24 hours, so the recipe can fetch the file and save it into SharePoint, Box or anywhere else. If the webhook fails, the upload is still kept and the row shows *Webhook failed* so you can follow up.

## Multi-site firms

Settings are read from the household's **Assigned Site**. Households without one use your first site.
