You are almost there.
- Your file i.e. the excel can reside anywhere. You have chosen AWS S3 which is ok.
- To get the file from AWS S3 you are using the correct module
- Once the file comes to Mendix runtime, now it needs parsing so that its Content can be READ and WROTE into the mendix domain model to represent it in a nice UI for your end customers. For this you are using ExcelImporter module that is also right
- So based on the excel files STRUCTURE(the sheets it has, the columns per sheet etc.) you first need to create a TEMPLATE in the ExcelImporter module provided pages
- Once the template is ready give it a good name which can be queried in the microflow
- This Microflow where the first part of the logic is to get the file from AWS S3 (can also be a SUB MF) and the second part is using ExcelImporter Module provided Java actions or Helper microflows to Parse it into your domain model
- while making the template you give the domain model entity, attributes to which you need yout excel data to be mapped
- this way the Template facilitates the data entry into the domain model when it gets parsed by the MFs/JA’s of the ExcelImporter module
The existence of the file can be checked by checking the GetObject Actions Responses. It will have properties that can be checked to see if some properties are usefull which indicates the file has contents (its size, name etc.)
Now about the automation part:
Since the Automation has to get triggered from the source, basically you need to setup some kind of event trigger to Call the mendix Microflow(which gets from S3, Parses, loads etc.) as soon as the FILE gets dropped in S3.
- Expose your microflow over a PUBLISHED REST SERVICE
- Now setup AWS to trigger a AWS SNS notification on S3 PutObject(which gets fired when file gets dropped)
- as a target to this notification, you can put the REST Service made in Point 1 which gets triggered when the files gets placed
So ideally the flow is:
- Mendix is running by exposing a REST API (which underneath has your Microflow)
- AWS S3 has an event on PutObject to trigger AWS SNS Topic which has a Endpoint Trigger to the Endpoint exposed by Mendix
Find below some references:
Link
Link
https://docs.aws.amazon.com/sns/latest/dg/sns-http-https-endpoint-as-subscriber.html
Rather long but worth a shot :) Good luck