wiki/knowledge/crm-automation/folder-automation-via-api.md Layer 2 article 741 words Updated: 2026-04-05
↓ MD ↓ PDF
automation salesforce api folder-management crm it-coordination

Server-Side Folder Automation via API

Overview

When a CRM record reaches a meaningful stage — lead creation, qualification, or conversion — it can trigger automated creation of a corresponding project folder on a network server. This pattern keeps file storage in sync with CRM activity without manual intervention, but it requires careful coordination between the CRM implementation team and the client's IT/infrastructure provider.

The core challenge is that the CRM (e.g., Salesforce) lives in the cloud while the target folder structure typically lives on a managed on-premises or hosted server that is locked down by an IT provider. Bridging these two environments requires API access negotiated with that provider.

Implementation Pattern

Trigger Point

Folder creation can be triggered at different CRM stages depending on business need:

Quarra Stone example: Lincoln Durham confirmed that folder creation should happen at the lead stage, not the opportunity stage, because sales reps need somewhere to put materials as soon as a project is being pursued. See [1].

Technical Approach

The recommended implementation uses a server-side trigger fired from Salesforce:

  1. A Salesforce Flow or Apex trigger fires when the target record is created or reaches the designated stage.
  2. The trigger calls an external API endpoint (e.g., a lightweight Node.js service) that has authenticated access to the file server.
  3. The API service creates the folder using the prospect number, project name, or other CRM-derived naming convention.
  4. Optionally, the resulting folder path is written back to the CRM record for easy navigation.
Salesforce Record Event
        ↓
  Flow / Apex Trigger
        ↓
  HTTP callout → Node.js (or similar) middleware
        ↓
  Server API / file system access
        ↓
  Folder created at [server path]/[prospect-number]-[project-name]/

Naming Convention

Folder names should be derived from stable CRM fields to ensure consistency and avoid collisions:

A combined format such as QS-00123 — Tang Wing Met provides both machine-sortability and human readability.

IT Coordination Requirements

This integration cannot be completed by the CRM team alone. The following stakeholders must be involved:

Role Responsibility
CRM implementer Build the Salesforce trigger and callout logic
Technical developer Build and host the middleware API service
Client IT provider Grant server access, define API or protocol, configure firewall/auth
Client stakeholder Facilitate introduction and confirm requirements

What to Get from the IT Provider

Before the development call, confirm:

Note: IT providers managing locked-down servers (e.g., Vieth IT for Quarra Stone) may need advance notice to open the necessary access. Plan for at least one coordination call before development begins, and ensure a technically capable representative attends — not just an account manager.

Common Pitfalls