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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Export data from d365 ...
Power Automate
Unanswered

Export data from d365 F&O to csv file

(0) ShareShare
ReportReport
Posted on by 375

Hi, I am new to d365 f&O.  I want to export data from f&O to csv file using power automate. Is there any sample that I can learn from? 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @NurNina,

     

    Out of interest, is there a specific requirement that you want to use Power Automate over the Data Management export feature?

     

    With that feature you can very easily create csv data exports:

    https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-entities-data-packages#export

     

    Otherwise you could use the approach below in Power Automate.

     

    1. Add a list items present in table action. Configure it to use your preferred instance and table. 

    In my example I was only retrieving 5 CustomersV3 records. 

     

    2. Add a Create CSV Table action. Use the value field

     

    3. Add a Create File action, in my example in OneDrive for Business. Use the output of the Create CSV Table action for the File Content field.

     

    customersv3export.png

  • NurNina Profile Picture
    375 on at

    @Expiscornovus thank you for the suggestion!

     

    the goal is to export data from F&O using automate and create the file inside FTP. However, the data format in csv should be in semicolon separated

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @NurNina,

     

    You can't set the delimiter in that create csv table action.

     

    However, you could use a workaround for that. You can use custom formatting instead of automatic formatting in that create csv table action.

     

    With this custom formatting you can add a character pattern which is easily replaceable. This is needed because if you would just replace a comma character you might be replace valid content as well.

     

    You can find that approach in this thread: https://powerusers.microsoft.com/t5/Building-Flows/Change-the-delimiter-when-creating-a-CSV-file/m-p/674703/highlight/true#M90892

     

    I have created an example for that.

     

    This expression is added in a compose action. It identifies |,| and replaces it by ;

    replace(body('Create_CSV_table'),'|,|',';')

     

    repalcepipecharacters.png

     

  • NurNina Profile Picture
    375 on at

    hi @Expiscornovus ,

    thanks for the reply. I've found that there is a create file function for FTP. However, I'm not sure how to pull only data created today from the list of items, based on the created  date and time. 

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @NurNina,

     

    Does your entity have an creation date time field?

     

    If so, you could potentially use a filter array to filter the results from the list items present in table action.

     

    After that you can use the filtered array instead of the original array in the from field of the Create CSV table action.

     

    Below is an example with the CDSSalesOrderHeaders entity. I know that entity has a created date time field.

     

    filterarray_createdtoday.png

  • NurNina Profile Picture
    375 on at

    Hi @Expiscornovus , I've tried this and apparently it doesn't export the data needed from f&O. It only creates the csv table that is needed. Am I missing any step? 

     

    NurNina_0-1629712299758.png

    NurNina_1-1629712391294.png

     

     

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @NurNina,


    I see that your Create CSV table is within an apply to each action. It looks like it is creating a csv table per item. Can you remove the apply to each action?

     

    You can use expressions to retrieve the property values and to avoid that Power Automate automatically generates a Apply to each action.

     

    This is for example the expression for the SalesOrderNumber property:

    item()?['SalesOrderNumber']

     

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard