RE: How to map leads to their existing contact records?
Elli Vaere
You don't need to use flow (power automate) in order to do an initial data population. You can do this using flat files (.csv ONLY!) with the data correctly setup so that D365 makes the appropriate 1:N and N:1 relationships for you. This is done through the import data wizard:

The "trick" if you will is to have the flat files with the data setup properly bundled together in a zip file. Then, instead of just importing data to one table/entity, you will be importing to multiple at the same time and you will map those relationships in the import data wizard.
So, for instance, you need to relate (map) leads to contacts and have the scoring data you've defined added to those lead/contact pairs. Thus you would have a 'leads' file and a 'contacts' file in the zip. When you go through the wizard, you will choose the appropriate lookup field for each of them. Again, make sure you have those references in your files. For instance, you have a lead "John Smith". In the Leads file, you will add a column for that John Smith record that contains John Smith again but will be mapped to the Contact table/entity. Same thing in the Contact file. So, you will make those associations in the wizard and D365 will upload the data in pairs doing, essentially, an 'apply to each' function. Here's an example screenshot doing it with Accounts and Contacts:

Does that help?