Smartsheet Attachment to SharePoint Archive
When an attachment is added to a Smartsheet row (or on a schedule), the flow copies the file to a structured SharePoint library organized by project/status, sets metadata from row cells, removes oversized duplicates, and logs the archive location back to the row. Centralizes Smartsheet attachments in governed storage.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow centralizes Smartsheet row attachments in governed SharePoint storage. On a schedule it reads the sheet, lists every attachment, and for each new row attachment copies the file into a structured SharePoint library (organized by project / status), stamps file metadata from the row's cells, writes the archive location back to the row, and logs every action to a Dataverse audit table. Oversized files are flagged and skipped. A summary email reports the run.
Why it matters: Files scattered across Smartsheet rows are hard to govern, search, and back up. A metadata-tagged SharePoint archive with a Dataverse audit trail makes them retained, discoverable, and de-duplicated.
Use Case
An operations team attaches deliverables (specs, sign-offs, receipts) to Smartsheet rows and needs them automatically archived to a SharePoint library, foldered by project and status, with metadata, while a record of what was archived is kept for audit and to avoid re-copying.
Flow Architecture
Recurrence
Schedule (every 1 hour)Polls the sheet (no native Smartsheet attachment trigger).
Initialize_* (1-13)
Initialize VariableBind all 10 env vars + correlation id + archived/skipped counters.
Get_Smartsheet_Rows
Smartsheet — GetSheetDataReads all rows so each attachment's parent-row project/status cells are available.
List_Sheet_Attachments
HTTP GET (Smartsheet REST)/2.0/sheets/{id}/attachments?includeAll=true — lists every attachment.
Foreach_Attachment
Apply to each (sequential)Iterates attachments (concurrency 1 for safe counters).
Check_Existing_Log
Microsoft Dataverse — ListRecordsDedupe: looks up an existing archive-log row by attachment id.
Condition_Is_New_Row_Attachment
Condition (If)Proceed only for parentType = ROW not already archived.
Condition_Within_Size
Condition (If)Compare sizeInKb to the max-size ceiling.
Get_Attachment_Detail / Download_Attachment_Content
HTTP GET (Smartsheet REST / pre-signed URL)Gets the temporary download URL then downloads the file bytes.
Filter_Parent_Row / Compose_* / Compose_Folder_Path
Query + ComposeFinds the parent row and builds <library root>/<project>/<status>.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SmartsheetApiToken | String | <configure> | Bearer token for the Smartsheet REST API. |
| flowlibs_SmartsheetSheetId | String | <configure> | Source sheet. |
| flowlibs_SmartsheetStatusColumn | String | Status | Row column title used as the status folder segment. |
| flowlibs_SPSiteUrl | String | https://your-tenant.sharepoint.com | SharePoint site hosting the archive library. |
| flowlibs_SmartsheetProjectColumn | String | Project | Row column title used as the project folder segment. |
| flowlibs_SmartsheetArchiveColumnId | String | <configure> | Numeric Smartsheet columnId for the archive-location write-back. |
| flowlibs_SPArchiveLibraryPath | String | /Smartsheet Archive | Server-relative library root path. |
| flowlibs_SPArchiveLibraryGuid | String | <configure> | Library list GUID for the metadata patch. |
| flowlibs_MaxAttachmentSizeKb | String | 25000 | Size ceiling (KB); above this = skipped. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Smartsheet | shared_smartsheet | GetSheetData |
| HTTP | http | GET /2.0/sheets/{id}/attachments GET attachment detail PUT /2.0/sheets/{id}/rows |
| SharePoint | shared_sharepointonline | CreateFile ODataStylePatchFileItem |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Schedule vs event
- Smartsheet has no attachment trigger; tune the Recurrence interval (default 1 hour) for freshness vs API load.
- Folder structure
- Change Compose_Folder_Path to fold by date, owner, or any other row cell.
- Oversized policy
- Flip the Else branch from log-and-skip to an HTTP DELETE of the Smartsheet attachment if you want oversized originals removed.
- Retention
- Apply a Purview retention label via SharePoint REST SetComplianceTag after Create_SharePoint_File.
- Hash dedupe
- Extend Check_Existing_Log to compare a content hash in addition to attachment id.
- Metadata
- Add more library columns and extend the Set_File_Metadata item object.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Folder path
Builds the project/status archive folder path.
EXPR.02Parent-row lookup
Matches the attachment to its parent row.
EXPR.03Dynamic cell read (env-var-driven column)
Reads the project cell, defaulting to Unsorted.
EXPR.04Dedupe guard
Proceeds only if no existing log row.
EXPR.05Size gate
Within-size check.
EXPR.06REST write-back body
Writes the SharePoint path back to the row.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.