Sync files to Salesforce attachments on schedule

Recipe ToolsMarketingCRMDocument/File

What it does

When a scheduled interval triggers, this automation searches Salesforce for notes and attachments. It retrieves files and uploads them as attachments to Salesforce so someone can monitor the job status.

Who it's for

Sales operations teams who need to keep Salesforce attachments in sync with external files on a regular cadence.

How teams use this

Sync external files to Salesforce daily

Run this automation every morning to pull files from an external source and attach them to Salesforce notes. The team always has the latest files without manual uploads.

Attach files to specific contact records

Filter the search to only sync attachments for contacts in a certain region or account. The automation runs the same way but only updates the records that match.

Add metadata to each attachment

Include a condition to check the file type or size before upload, and set a custom field on the attachment with the sync date. This ensures only valid files are stored.

How it works

  1. Run on a specified interval. This automation runs on a schedule you set, such as daily or weekly, to keep Salesforce attachments up to date without manual work.
  2. Search for notes and attachments. Query Salesforce to find all notes and attachments that need to be synced, so the automation knows which records to update.
  3. Retrieve file from external source. Get the file from the external location using File so it can be uploaded into Salesforce as an attachment.
  4. Upload file to Salesforce. Create the attachment in Salesforce and link it to the correct note or record so the file is stored in the right place.
  5. End the scheduled job. Stop the automation run after all files are uploaded so the next scheduled interval can begin without overlap.