Hi Mostafa,
I agree with Pranay's approach, but to solve your challenge of recurring automation I'd recommend using Azure Logic Apps.
I've working with automated reporting and exporting as xlsx and csv recently, and there are a few ways you can achieve this - but my recommendations depend on you having Azure Log Analytics enabled for your subscription and needing to learn or already be familiar with Kusto Query Language (KQL).
Method 1: Use Azure Logic Apps and Azure Automation -
Once you've established Log Analytics, navigate to the log analytics console and enter Kusto query similar to below:
AzureDiagnostics
| where Resource == "AzureBackup"
| where OperationName == "BackupJob"
| where TimeGenerated > ago(14d)
| project TimeGenerated, JobStatus, JobType, ResourceGroup, Resource
*You will need to adjust the query to your specific resource, timeframe and what you want to display ('project')
When you have a suitable query, create an Azure Logic App (recommended over Power Automate flows due to better at handling critical business processes, and no 'premium' connectors).
Trigger - A recurrence (eg. 8am each day or specific day of the week),
Action 1 - Use the Azure Monitor Logs connector to run your KQL query,
Action 2 - Use create CSV table to convert the query results
Action 3 - Use a create file action (OneDrive, SharePoint, or Blob storage connector), to output your csv table as a csv file. Alternatively you can put the csv table output into a send an email action (Outlook)
Method 2: Use Azure Logic Apps and an Azure Automation Runbook (more complex than method 1) -
A similar method that will still need your KQL query, you can create a similar Logic App workflow, but call an Azure Automation runbook ***create job ***action to execute your KQL query in PowerShell.
Please note: You won't be able to just paste your query into PowerShell, from experience I needed to format it slightly to work in PowerShell. Ideally you should also return the data in JSON format.
Also: You will need specify on the create job action, that it needs to wait for the process to finish - see the additional options on the connector.
Your Logic App workflow will be identical to method one, except instead of the Azure Log Analytics action, you'll be using 2 Azure Automation actions - one to create the job and one to get job output - and then a Parse JSON action to collate the data.
The rest of your workflow will be the same as method one (csv table, create file).
I hope this helps, best of luck!