Sync Salesforce records to file storage until batch completes

Recipe ToolsCRMMarketingFile TransferDeveloper ToolAPI Integration

What it does

When Workato Service receives a request to process a new page, this automation queries Salesforce for records. It uploads each batch to the file server, repeats until all records are retrieved, then returns a success response.

Who it's for

Data and analytics teams who need to export Salesforce records to file storage in batches without manual intervention.

How teams use this

Export all Salesforce records to file storage

Retrieve every Salesforce record across multiple batches and upload each to file storage without stopping between pages. The automation handles pagination automatically so nothing else changes.

Sync records to a data warehouse

Route the uploaded files from file storage to a data warehouse pipeline instead of leaving them on the server. The batch query and upload logic stays the same and only the destination changes.

Filter records by a date range

Add a date condition to the Salesforce query so only records modified in the last week are exported to file storage. Include the filter in the custom query to narrow the batch size.

How it works

  1. Receive the process request. Workato Service receives a real-time call to process a new page of Salesforce records.
  2. Query the first batch of records. Query Salesforce for records using a custom query that returns a batch and a link to the next set if more records exist.
  3. Upload the batch to file storage. Upload the file containing the Salesforce records to the file server so the batch is persisted and ready for the next step.
  4. Check for more records and repeat. If a next records link is present, query more records via HTTP and upload to file storage. Repeat until no more batches remain, then return a success response.