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?
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:
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.
@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
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...
I have created an example for that.
This expression is added in a compose action. It identifies |,| and replaces it by ;
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.
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.
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?
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:
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.