An alternate approach - ExcelImporter will do this for you in one step. In the import template, you can define which Excel columns can be used to create references between the imported data and other entities. Further, you can indicate handling of these references so that the ExcelImporter will create a record in the referenced table if one is not found. You can find more info in the documentation found in the Appstore.
Import the data into your staging table. Create a scheduled event that runs over the staging table with a microflow that checks if the data is available by retrieving the data in the items table based on some attribute comparison. Then check if it can be found and handle the true and false exits.