Skip to main content
Carter Pavey が「#Flow」で質問

Hi everyone,

I’m looking for some guidance on building a Flow in Salesforce and could use some help from those who have solved something similar.

The situation

We use HubSpot forms that create activity in Salesforce when a form is submitted. If the form is tied to an existing contact, a Task is created in Salesforce and associated with that contact. Once the task is completed, we want to notify the Contact Owner that the activity has been finished.

The goal is simple in concept but has been trickier to implement cleanly.

What we are trying to accomplish

When a Task is marked Completed and the task is related to an existing Contact, we want Salesforce to:

  1. Send an email notification to the Contact Owner.
  2. Include key details like:
    • Contact name
    • Task subject
    • Task description
  3. Provide a direct clickable link to the Task record in Salesforce so the owner can immediately review the activity.

Example of the link structure we’re trying to use:

https://yourdomain.lightning.force.com/lightning/r/Task/{TaskId}/view

What we’ve tried

We built a record-triggered Flow that runs when a task status changes to Completed. However, we’ve run into a few issues:

  • Errors when the email action tries to send with 0 recipients
  • Difficulty reliably referencing the Contact Owner’s email
  • Ensuring the Flow only runs for Tasks tied to existing Contacts
  • Building a dynamic link to the Task record in the email body

We’ve also received performance warnings from Salesforce when using a Get Records element to query tasks.

What we’re hoping to learn

Specifically, we’d appreciate advice on:

  • Best practice for triggering a Flow when a Task is completed
  • Safely identifying the Contact Owner as the email recipient
  • How to build the dynamic Lightning link to the Task record
  • Avoiding Flow errors like “0 recipients”
  • Structuring the Flow so it only runs when:
    • Task is completed
    • Task was created for an existing contact

 

If anyone has implemented something similar using Flow, I would really appreciate seeing how you structured it.

Thanks in advance for any suggestions or examples you can share! 

 

#Flow

1 件の回答
  1. 3月5日 14:09

    Hi @Carter Pavey,

    You can handle this cleanly with a record-triggered Flow on Task (after update).

    Entry conditions

    • Status = Completed
    • WhoId Starts With 003 (ensures the task is related to a Contact)
    • ISCHANGED(Status) = TRUE

    From there you use Get Records element to get linked contact. 

    Before sending the email, add a Decision to check that the owner email is not null to avoid the 0 recipients error.

    For the link in the email body you can build it dynamically like this:

    https://yourdomain.lightning.force.com/lightning/r/Task/{!$Record.Id}/view
0/9000