Hi Jared,
I was able to replicate that same error when trying to use a handlebar expression in the "How can we find existing records?" input of a lookup or input step of a flow.
There are two options to resolve this.
Option 1. This looks like a bug with SuiteScript 2.X in which case you can rebuild your import step using the NetSuite SuiteApp SuiteScript 1. When you create a new import step under Advanced options (see below screenshot) you would select SuiteApp Suite Script 1.0 and then you could use the same handlebar expression. This would require you to remap the step as well as the API version can not be changed after the step has been modified.
Option 2. You can transform the data using a JavaScript hook before the data gets to the import or lookup and continue to use SuiteApp SuiteScript 2.X. By performing the data transformation (removing the "www") before you get to the step in which you are doing the lookup action. I made an example of doing this via the transformation feature with a simple script on the flow step before I needed to do the lookup. I have also included steps and screenshots below.
Step 1. Click on the plus icon on the endpoint bubble step before the step on which the lookup needs to occur.
Step 2. Click on the data transformation step to define a new transformation in the flow. This will open up the transformation page.
Step 3. Switch the view to JavaScript to allow you to select you script that you want to run.
Step 4. Create a new script by hitting the plus button. This will open create a script menu.
Step 5. Give your script a name and insert the function stub for transformation which gives details about what the script will do. If you want to know more about the different stubs and their use cases this help center article will have further links to the different types of stubs.
Step 6. Input your script with a function that will transform the needed data. I created the following script based on the example data you provided but it may require modification on your side. It just removes the www from the domain record.
function transform (options) {
//modifys the record for the domain and removes the www value
options.record.selector.domain = options.record.selector.domain.replace("www","")
//return the record
return options.record
}
Step 7. Save and close the script editor
Step 8. Back in the define transformation page, search for your newly created script and make sure to call the function which in the case of the example I made it is just called transform. You can preview how the script handles the data and from the screenshot below with step 8 you can see that the script has removed "www" from the record domain. If you want to transform the icon_url you would need to modify the script.
Step 9: Now with a script modifying the data, there is no need to do a handlebar expression on the lookup criteria step. I can just search by the field mapping. I am looking up against a custom field on a customer record in this example.
Screenshots for the JavaScript steps