Setting the account for each new contact that is created is a potentially automatable task. If you store the website URL on your account records AND the contacts have emails AND their domains match, then we can automate this with Power Automate. Some organizations have multiple domains or have changed them over time, so in that case you will need to extend this approach.

Sean Astrakhan has a great video on C# Custom Connectors here Write C# in Power Automate!!! No Azure or extra tools needed | C Sharp in Custom Connector

I used ChatGPT to create this custom connector which I edited to produce this:

https://github.com/chrismvnro/power-automate/blob/main/csharp-custom-connectors/extractEmailDomainCustomConnector.cs

Sean’s video shows how to create the custom connector and you can connect this code instead.

When creating the custom connector the Operation ID is extractEmailDomain

We need an emailaddress body parameter to input the email address from which to extract the domain.

For the Power Automate Flow to extract the email domain and set the account we use the connector to extract the email domain, below is a flow that runs against a selected contact record

To extract the domain from the connector output we can use

Assuming your accounts are unique over their website URLs – you don’t have multiple accounts with the same URLs, then we can do a List Rows below to find the account that matches the domain.

We then extract the first element of the list rows and set the contact’s account

Below sets the contact’s account

This is a skeleton flow – you would need error handling for real use but it outlines the idea.