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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Automatically create a consent record for new contacts

(1) ShareShare
ReportReport
Posted on by 37
I have set up a cloud flow to create an opt-in consent record for new contacts that are added.
But it is just not working - the test shows that it's run successfully, but it's not adding an opt-in consent record. 
I think the issue must be coming from the 'Condition' step - because I added a new contact, which means it should have gone down the 'true' path and added a new consent record. But, it's gone down false, and the contact's consent is still not set. 
 
Has anyone tried to set this up and had the same problem?
Thanks.
I have the same question (0)
  • Jimmy Passeti Profile Picture
    777 Most Valuable Professional on at
    Hello,
     
    Can you send a screenshot for the condition?
    We need to check it to understand what is happening.
  • Suggested answer
    Tom_Gioielli Profile Picture
    3,040 Super User 2026 Season 1 on at
    Screenshot of the condition would help, but I think your overall structure may be incorrect. If you want to run this any time a new contact is added, then I don't see any reason why a "List Rows" action is being used unless you are validating that there are no existing consent records already.
     

     
    Option 1: If you don't need to worry about consent records from other sources
    Trigger: When a contact is added (row is added, modified, or deleted in Dataverse)
    Action: Add a new row (create your consent record and link it to the contact)
     

     
    Option 2: If you need to validate that no consent record already exists
    Trigger: When a contact is added (row is added, modified, or deleted in Dataverse)
    Action: List Rows, find any consent records linked to the contact from the trigger
    Condition: Check if the list rows record returned any values.
     * If no records found, create a consent record

     
    You can check if the list rows action returned any records by using the following in the formula editor:
    length(outputs('List_rows')?['body/value'])
    If that value is = 0, then no records were found.
     
     
    If this response helped, please consider marking as verified so future users can see the resolution. If you have additional questions or problems, please tag me in the response so I receive a notification.
  • BS-18090839-0 Profile Picture
    37 on at
    Thank you for taking the time to reply. A screenshot of the condition is here. 
    is equal to true.
     
    And yes, that's correct - using the list rows to validate that there are no existing consent records.
  • Suggested answer
    Tom_Gioielli Profile Picture
    3,040 Super User 2026 Season 1 on at
    The 'Empty' function can act a little weird outside of Canvas Apps in my experience. I usually avoid it myself in flows.
     
    Try it with the length function I indicated above and see if it works. My guess is that Empty is not checking for records returned, but if anything came back in the List Rows action (which Power Automate always returns at least something, even if it isn't records).
     
     
    If this response helped, please consider marking as verified so future users can see the resolution. If you have additional questions or problems, please tag me in the response so I receive a notification.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 118 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans