There is no automatic way to listen to imports/updates to a Data Extension. If you import a CSV a file drop automation could be suitable, otherwise you will need to trigger the API using a program/code. However, check if a realtime trigger is really necessary for your use case or a data extension entry source with a recurring schedule is also sufficient.
If the API approach is feasible for you, as you mentioned in 2) in your question, you could either:
- Configure your data extension as a triggered send data extension and use the API to trigger the message (and write to the DE in the background)
- Either create your triggered send definition in Email Studio and trigger it
- Or use the (newer) Transactional Messaging API, which requires configuration using the API rather than email studio
- Use a Journey with an API entry event with your data extension in the background
In both approaches you need to trigger a different endpoint and not the one for adding a row to a data extension, but in the background data will indeed be added to a data extension. If that is sufficient for your use case, that will be the solution.
Edit (due to additional information from the comments): You will have to do some programming work to create a script/program that goes through your data (e.g. using your CSV as input) and triggers the Journey Builder or Transactional Messaging API for every line/record. However, as already said this is a custom solution, that requires coding effort. This can be achieved using the programming language of your choice as long as it is capable of interaction with REST APIs.
File Upload Option
If your import to the DE can happen via a CSV on the enhanced FTP you could also create a triggered automation with an import and a send email (or journey trigger) activity.
So your automation would look like this:
- Starting Source: File Drop
- Optional: If the file is encrypted: File Transfer Activity
- Import Activity (writes the data of the CSV to the data extensions)
- Send Email Activity
Upload / Automation Option