Skip to content

πŸ“ˆ Daily Exchange Rates, Zero Manual Effort: D365FO + Logic Apps

Exchange rates are critical component of global finance operations. Manually importing daily exchange rates into D365FO can be time-consuming and prone to errors.

Exchange rate integrations are often designed as simple file-based processes. However, real-world constraints can make the solution more interesting. In one of my recent implementations, exchange rate files were delivered to an SFTP location, but processed files could not be moved, archived, or deleted after import.

This meant that every day the SFTP folder contained both historical and newly uploaded files. The challenge was ensuring that only the files uploaded on the current day were sent to Dynamics 365 Finance & Operations for processing.

There are various ways to implement exchange rate imports; I’ve shared the approach that fits my client’s requirements.

The Challenge

The requirements were straightforward:

  1. Files will be dropped in the SFTP folder by the external team everyday at 1130pm GMT
  2. Read files from an SFTP folder.
  3. Imported files must remain in the same folder.
  4. Archival or deletion of processed files is not permitted.
  5. Only files uploaded on the current date should be processed.
  6. Exchange rate files are pushed to D365FO through a queue-based integration pattern.

Without filtering, the Logic App would repeatedly process historical files, resulting in duplicate imports and unnecessary processing.

Solution Overview

The integration follows a simple but effective pattern:

  1. Read files from an SFTP folder.
  2. Retrieve file metadata.
  3. Compare the file’s LastAccessTime with the current date.
  4. Process only files belonging to the current day.
  5. Push eligible files to D365FO through an enqueue .

Step 1: List Files from the SFTP Folder

The Logic App starts with the recurrence and then the List files in folder action.

As the files will be dropped at 1130pm GMT everyday, the first step will be recurrence to trigger the flow at 11:55pm (safe side of 20 mins later)

Since historical files remain in the folder, the action returns all available files, including files already processed on previous days.

Add the step with SFTP and enter the necessary details for SFTP connection

I`ve selected the Built-in SFTP connector for my flow

STEP 2: Loop through the files in the for-each loop

Step 3: Validate the File Date

Once files are retrieved, the next step is determining whether the file belongs to the current processing date.

For each file, Logic Apps reads the metadata, specifically ‘LastAccessTime’.

Step 4: Conditional Processing

The condition acts as a filter.

If TRUE

βœ… File belongs to today

  • Continue processing
  • Push to queue
  • Import into D365FO

If FALSE

❌ Historical file

  • Ignore
  • No processing
  • No duplicate imports

This prevents old files from being re-imported accidentally.

Code view

Step 5: Get the file content

Read the file content using the file path fetched from the fetched step

Step 6: Generate Auth token using Http Connector

As I am using OAuth connection, I am using an auth token for validation.

The placeholders ‘ClientId’, ‘Secret’ , ‘FOURL’ are parameters which are defined in the flow

Step 7: Enqueue the file to D365FO

The auth token generated in the first step is passed in the Header parameters – ‘Authorization’ .Body of the connector is the file content .

The details of configuring enqueue are given in the MS link

All set.. Our flow is now ready to push the files to D365FO.

A quick recap of our flow is given below

Benefits of This Approach

βœ… No manual intervention

βœ… Processes only current-date files

βœ… Prevents duplicate imports

βœ… Supports scalable processing

βœ… Improves reliability through asynchronous handling

βœ… Easy to monitor within Logic Apps

Anitha Santosh originally posted this article on 6 October 2026 at 6:30 PM.

Leave a Reply