Skip to content

Instantly share code, notes, and snippets.

@HdroguettA
HdroguettA / salesforceAttachmentDownload.ts
Last active November 6, 2024 23:12
Download Salesforce Attachments with Node.js (TypeScript) utilising JSforce.
import JSForce, { Connection } from "jsforce";
import dotenv from "dotenv";
import fs from "node:fs";
import pLimit from "p-limit";
dotenv.config();
const connection: Connection = new JSForce.Connection();
const download = async () => {
// Ensure the statements directory exists to push files into during downloading.