<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jubril Ajao</title>
    <description>The latest articles on DEV Community by Jubril Ajao (@jajao).</description>
    <link>https://dev.to/jajao</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4257683%2F9e2cfe17-3772-4c8c-a1e4-899e605f3795.png</url>
      <title>DEV Community: Jubril Ajao</title>
      <link>https://dev.to/jajao</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jajao"/>
    <language>en</language>
    <item>
      <title>Nightly CSV from an SFTP server into Salesforce: 7 things that break</title>
      <dc:creator>Jubril Ajao</dc:creator>
      <pubDate>Sat, 21 Nov 2026 17:31:31 +0000</pubDate>
      <link>https://dev.to/floverk/nightly-csv-from-an-sftp-server-into-salesforce-7-things-that-break-2j7h</link>
      <guid>https://dev.to/floverk/nightly-csv-from-an-sftp-server-into-salesforce-7-things-that-break-2j7h</guid>
      <description>&lt;p&gt;A supplier, a logistics provider or a payroll provider drops a CSV file on an SFTP server every night. Someone downloads it, fixes a few columns in a spreadsheet and imports it into Salesforce by hand. Automating that looks like a 50-line script, and an AI chatbot will write the script in seconds.&lt;/p&gt;

&lt;p&gt;The script works on day one. These are the seven things that break it in month two, and what to do about each.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Reading a file that is still being written
&lt;/h2&gt;

&lt;p&gt;The sender's upload and your nightly run overlap, and you import half a file. Nothing fails; you just have half the records.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; only take files that have not changed for a while (a minute is a sensible default), or agree that the sender uploads under a temporary name and renames when done. Do the same for your own uploads: write &lt;code&gt;.orders.csv.part&lt;/code&gt;, then rename it to &lt;code&gt;orders.csv&lt;/code&gt; once it is complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Reading the same file twice
&lt;/h2&gt;

&lt;p&gt;The run fails after the import but before the cleanup, and the next night imports the same file again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; move the file to an archive folder &lt;em&gt;before&lt;/em&gt; you read it, and read it from there. If the run fails, the file is still in the archive for a retry, and the next run will not pick it up again.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. A new date in the file name every day
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;orders_2026-11-20.csv&lt;/code&gt;, &lt;code&gt;orders_2026-11-21.csv&lt;/code&gt; … A fixed file name stops working on day two.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; match a pattern such as &lt;code&gt;orders_*.csv&lt;/code&gt;, or take only the newest match. Decide upfront what happens when two days arrive at once (after a holiday, for example).&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Duplicates in Salesforce after a re-run
&lt;/h2&gt;

&lt;p&gt;An insert-only import creates every record a second time when you re-run a night.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; upsert on an external ID field (the supplier's order number, for example) instead of inserting. A re-run then updates the same records.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. A renamed column or a new date format
&lt;/h2&gt;

&lt;p&gt;The sender renames &lt;code&gt;Cust No&lt;/code&gt; to &lt;code&gt;Customer Number&lt;/code&gt;, or switches from &lt;code&gt;21.11.2026&lt;/code&gt; to &lt;code&gt;2026-11-21&lt;/code&gt;. A script that reads columns by position writes wrong values. One that converts loosely writes empty fields.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; map columns by name, give each one a type, and set aside rows that do not fit with a clear message instead of writing them half-empty.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Credentials and host keys
&lt;/h2&gt;

&lt;p&gt;The password sits in the script, and the script accepts whatever server answers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; keep credentials out of code. Pin the server's host key, so a different server cannot answer in its place. If the server only accepts known addresses, connect from one fixed address that the server's operator can allow.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Failing silently
&lt;/h2&gt;

&lt;p&gt;The job runs on a schedule nobody watches. A failed night is noticed when someone asks where last week's orders went.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; log every run, with a result for every record, and alert on failure so a failed night is visible the next morning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where AI fits
&lt;/h2&gt;

&lt;p&gt;An AI that writes the script saves the first hour and leaves you all seven problems. An AI that creates the pipeline in a tool that already handles them is more useful. Either way, check five things before it writes to Salesforce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does it use your real object and field names, or plausible-sounding ones?&lt;/li&gt;
&lt;li&gt;Does a person approve every step that writes or sends data?&lt;/li&gt;
&lt;li&gt;Are records sent to the AI model? Field names are enough to build a pipeline.&lt;/li&gt;
&lt;li&gt;Where do the credentials live? Not in a script, and not in the chat.&lt;/li&gt;
&lt;li&gt;Can you run the steps before the write on their own and check their output?&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Disclosure: this post is from the team behind Floverk, a data pipeline platform for Salesforce, CSV and other files, SFTP servers and REST APIs. In Floverk, the job above is a pipeline of four steps (SFTP Download → CSV Input → Map Fields → Data Writer) built on a visual canvas, or created by its AI Copilot, and every step that writes waits for a person's click. The longer guide, including REST APIs: &lt;a href="https://floverk.com/guides/ai-copilot-data-pipelines/" rel="noopener noreferrer"&gt;Can an AI copilot create a data pipeline for Salesforce, CSV, SFTP and REST APIs?&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>salesforce</category>
      <category>sftp</category>
      <category>csv</category>
      <category>dataengineering</category>
    </item>
  </channel>
</rss>
