Automation
Imports can run without a user in two ways: from a folder of an external storage, watched by a job queue, or through the API, called by an external system or by Power Automate.
Automatic imports
Files dropped in a folder of an external storage are imported by a job queue, with no user involved. Search for Automatic Template Imports: one line per feed, with the last run, its status and its error.

Prerequisite: a file account
An administrator registers the storage account (Azure Blob Storage, Azure File Share, SharePoint) on the External File Accounts page with the standard Set Up External File Accounts wizard. See the Microsoft documentation about file accounts.
The feed
- Template Code: the template used for every file of the folder.
- File Account and the three folders: files are read from the Source Folder, moved to the Archive Folder when the import succeeds and to the Error Folder when it fails. The folders must exist and differ; a browse button opens the storage.
- File Name Filter: which files are taken,
*.csvor*.zipfor instance; the default follows the format of the template. - Journal Template Name, Batch Name: only for journal templates.
- Enabled: only enabled feeds run. Enabling checks the whole setup, including that every Import Parameter of the template has a Default Value, which is the value used for every file.
Running the imports
Create Job Queue Entry creates the recurring job queue entry (every 30 minutes, on hold) and opens it; one entry serves all the feeds. Run Now processes one feed immediately and is the way to test it.
Each file is imported on its own: a file that fails leaves nothing behind, is moved to the error folder with its error, and the run continues with the next file. To retry a corrected file, move it back to the source folder.
Every run writes an entry in the Import History, with the file name, the feed and the result: Success, or Error with the message. The Import History action of the feed shows them.
A typical feed: one per bank account, with the account as the default value of the Bank Account No. parameter, so that every statement file dropped in the folder becomes a payment reconciliation journal, already matched when the template has the action Apply the imported payments automatically.
API
The app provides an API for external systems: a file is sent with the code of the template to use, and the import runs as it would from the page, with the same checks and actions.
The API has the following parameters:
- Publisher: memento
- API Group: importTemplate
- Version: v1.0
- Entity: importTemplates
The API can be called using the following syntax:
https://api.businesscentral.dynamics.com/v2.0/[ENVIRONMENT]/api/memento/importTemplate/v1.0/companies([COMPANY ID])/importTemplates
The body of the request should contain the following fields:
- importCode: Required. The name of the import template to be used.
- fileName: Required. The name of the file to be imported. If this field is not filled in, the request will not be processed.
- base64FileContent: Required. The file content in Base64 format, in the format expected by the selected template.
- templateName: Required for journal imports, to select the journal template where the journal lines should be imported.
- batchName: Required for journal imports, to select the batch where the journal lines should be imported.
- importParameters: Optional. If the import template is configured to accept import parameters for the fields, this should be filled with an array of objects with the following structure: tableId: the id of the table this parameter refers to. fieldId: the id of the field this parameter refers to. fieldValue: the value that should be applied to the parameter. Example of a parameter object:[{"tableId":"81","fieldId":"5","fieldValue":01/01/2024}].
The response will contain a result field indicating the outcome of the import operation and the number of documents or journal lines created:

Power Automate
The API can be called from Power Automate, for example:
- Import from an FTP/SFTP server when a new file is uploaded.
- Import an email attachment when a new email is received.
- Import a file produced by another system.
For files that land in a SharePoint, Azure Blob Storage or Azure File Share folder, the automatic imports above need no flow at all.
In the Business Central connector, the Power Automate action to select is Create Record (V3), using the API parameters:

In the action parameters the call request fields should be filled as previously described:

An example for reading files from an FTP server would be as follows:

Using the files read from the FTP as parameters for the request:
