web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Auto tag a lead to an account

(0) ShareShare
ReportReport
Posted on by 190

Hello,

We currently have leads coming across from HubSpot, and if the lead has the correct email domain for that company, it automatically brings in the account also.

We use the "parent account for lead" field to then link the lead to the relative account, so we can see the lead on the account level straight away. However, the only issue we have is when the account comes across from HubSpot, it doesn't auto link the lead to the account. This field remains blank.

Is there any way to automate this, by tagging the lead directly to the account, or is it not possible? 

Thank you in advance.

I have the same question (0)
  • StefanS365 Profile Picture
    3,575 Most Valuable Professional on at

    Hi there,

    How are the leads from HubSpot added to the Leads table in Dynamics 365 Sales?

    The 'parent account for lead' field is a lookup to the Accounts table and needs an unique identifier (guid) to set/select a specific account; the Account Name is not necessarily unique.

    It's possible to automate the Account selection/setting with Power Automate flow for example.

  • dynamicsgs Profile Picture
    190 on at

    Hi Stefan,

    The leads come across automatically through HubSpot operations (like an integration software that allows leads to flow across from one platform to another). When the lead flows across, it will automatically sync across the related account also and create this in Dynamics. So what we want, is to automatically link the lead to the account through the Parent account for lead field.

    Does this make sense, or do you need more info?

    Thank you in advance.

  • StefanS365 Profile Picture
    3,575 Most Valuable Professional on at

    So both (lead and account) are added to Dynamics but you're missing the link in the field Parent account for lead.

    Yes, that makes sense.

  • dynamicsgs Profile Picture
    190 on at

    Now I am looking to automate this. Is it possible to achieve?

  • Suggested answer
    StefanS365 Profile Picture
    3,575 Most Valuable Professional on at

    Yes, with help of Power Automate flow: I use the same trick: match the e-mail domain of the lead with accounts

    Here's an example. I've added an unmanaged solution with this flow to download and import in your environment.:

    Set-Parent-account-for-lead-1.png

    Set-Parent-account-for-lead-2.png

    Set-Parent-account-for-lead-3.png

    Used expressions:

    substring(triggerOutputs()?['body/emailaddress1'],indexOf(triggerOutputs()?['body/emailaddress1'],'@'),sub(length(triggerOutputs()?['body/emailaddress1']),indexOf(triggerOutputs()?['body/emailaddress1'],'@')))

    first(outputs('List_rows_-__Accounts')?['body/value'])?['accountid']

    [View:/cfs-file/__key/communityserver-discussions-components-files/762/PowerAutomatecloudflowtosetparentaccountforlead_5F00_9_5F00_0_5F00_0_5F00_211012.zip]

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans