Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Import Into Dataverse Table using Flow with Duplicate Detection

(0) ShareShare
ReportReport
Posted on by 243

Hi All,

 

I'm looking at importing a CSV file into a Dataverse table using Flow but I want to utilise the duplicate detection options I would normally get if done manually.

I'm partially on the right track I think as I create the Data Import and then the Import File - 

 

/SamConroy1_0-1703758483479.png/

 

On the Create Import File step, I get a generic error:

An unexpected error occurred.

 

With the following Output - 

{
    /statusCode/: 400,
    /headers/: {
        /Cache-Control/: /no-cache/,
        /x-ms-service-request-id/: /55223d0f-98a4-429e-adf2-f2c9f0eb0518,6d9433fc-5a28-4271-ba68-6da94654f428/,
        /Set-Cookie/: /ARRAffinity=bbfc29b660328fb8c95bc7afe0f62bbff9944453af8a25c3765b11b5bf63ac935ab954b42cfa12ad9f33ddc80a07e15dd633bd57139a65479392e46e5242529408DC0212D00BE70B1901265142; path=/; secure; HttpOnly,ReqClientId=03b69755-cdee-4358-8967-1c8a72fb0e54; expires=Thu, 21-Dec-2073 10:21:40 GMT; path=/; secure; HttpOnly,ARRAffinity=bbfc29b660328fb8c95bc7afe0f62bbff9944453af8a25c3765b11b5bf63ac935ab954b42cfa12ad9f33ddc80a07e15dd633bd57139a65479392e46e5242529408DC0212D00BE70B1901265142; path=/; secure; HttpOnly/,
        /Strict-Transport-Security/: /max-age=31536000; includeSubDomains/,
        /REQ_ID/: /6d9433fc-5a28-4271-ba68-6da94654f428,6d9433fc-5a28-4271-ba68-6da94654f428/,
        /CRM.ServiceId/: /framework/,
        /AuthActivityId/: /d15fd870-e535-4b93-aca3-b52e07ce6a9e/,
        /x-ms-dop-hint/: /48/,
        /x-ms-ratelimit-time-remaining-xrm-requests/: /1,199.86/,
        /x-ms-ratelimit-burst-remaining-xrm-requests/: /5996/,
        /OData-Version/: /4.0/,
        /X-Source/: /2402351721155594022675123462201311467925524514492481151802940192180225123239173229141,52199173011531127818221199109172188166471108920125114922426852813284249203110198/,
        /Public/: /OPTIONS,GET,HEAD,POST/,
        /Date/: /Thu, 21 Dec 2023 10:21:39 GMT/,
        /Allow/: /OPTIONS,GET,HEAD,POST/,
        /Content-Type/: /application/json; odata.metadata=full/,
        /Expires/: /-1/,
        /Content-Length/: /1023/
    },
    /body/: {
        /error/: {
            /code/: /0x80040216/,
            /message/: /An unexpected error occurred./,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey/: /Plugin/Microsoft.Crm.ObjectModel.ImportFileService/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey/: /24cabb1b-ea3e-db11-86a7-000a3a5473e8/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey/: /1/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiActivityIdKey/: /6d9433fc-5a28-4271-ba68-6da94654f428/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey/: /System/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey/: /System/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory/: /ClientError/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName/: /UnExpected/,
            /@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode/: /400/,
            /@Microsoft.PowerApps.CDS.InnerError.Message/: /An unexpected error occurred./
        }
    }
}
 
Not really sure what I'm doing wrong at this point and I'm not sure if I've missed any other steps so any help would be greatly appreciated /:slightly_smiling_face:/
 
Cheers all
 
Sam
  • Sam Conroy Profile Picture
    Sam Conroy 243 on at
    Import Into Dataverse Table using Flow with Duplicate Detection
    Thanks Leah, I went with your second link (Byron's one) and it worked great with a few small changes!
  • Verified answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Import Into Dataverse Table using Flow with Duplicate Detection
    Hi Partner,
    You can refer to the following link:
    --Adjust this step according to the information mentioned on the blog.
    Or you could try another approach as well:
    https://byrondittberner.com/blog/2022/04/30/how-to-use-power-automate-to-import-deduplicate-data-from-excel-online-to-the-dataverse/
    I hope you can mark my answer verified if it is helpful! If you have any questions, please feel free to contact me.
    Regards,
    Leah
     

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans