Get Current Month Name in Power Automate Dynamically

Power Automate provides powerful date and time functions that are essential for automating business processes. Whether it's for scheduling, generating reports, sending notifications, managing approvals, or even naming files, precise date handling is often a requirement. One common need is to dynamically retrieve the current month's name.

Organizations frequently use month names in various contexts such as reports, folder structures, email subjects, invoices, dashboards, and automated workflows. This article will guide you through the process of obtaining the current month's name in Power Automate using its built-in expressions.

Why Get the Current Month Name?

Many automation scenarios benefit from using month names instead of just numeric values. For instance, seeing "January" is often more intuitive than "01" in a report title or file name.

Using month names:

Common use cases include:

Solution Overview

The workflow to get the current month name is straightforward:

  1. Capture the Current Date (using utcNow())
  2. Format the Date to Extract the Month Name (using formatDateTime())
  3. Store the Month Name (using a Compose action)
  4. Use the Month Name in your Workflow

This process ensures that the current month's name is automatically retrieved every time the flow runs, keeping your automations up-to-date.

Understanding the formatDateTime() Function

Power Automate offers the formatDateTime() function, which is instrumental in formatting dates and times into various string representations. To get the full month name, you can use the following syntax:

Expression: formatDateTime(utcNow(), 'MMMM')

This expression takes the current UTC date and time (utcNow()) and formats it to display the full month name ('MMMM'). For example, if the current month is July, the output will be "July".

Step-by-Step Implementation

Step 1: Create a Flow

Begin by creating a new flow. You can choose the trigger type based on your specific business requirement:

Step 2: Add a Compose Action

Search for and add the "Compose" action to your flow. This action is ideal for storing the generated month name temporarily or making it readily available for use in subsequent steps.

Step 3: Enter the Expression

In the "Inputs" field of the Compose action, enter the following expression:

Expression: formatDateTime(utcNow(), 'MMMM')

If the current month is July when the flow runs, the "Outputs" of this Compose action will be "July".

Full Month Name vs. Short Month Name

The formatDateTime() function allows you to choose between the full month name and a shortened version. This flexibility is crucial for adapting to different requirements.

Choose the format that best suits your business needs.

Practical Applications

Using Current Month in Email Subjects

Dynamically including the current month in email subjects enhances clarity and organization for automated communications.

Example Expression:

concat('MonthlyReport-', formatDateTime(utcNow(), 'MMMM'))

Output Example: MonthlyReport-July

This is particularly useful for automated reporting emails.

Using Current Month in File Names

Automating file naming conventions with the current month ensures that reports and documents are easily identifiable and sortable.

Example Expression:

concat('SalesReport_', formatDateTime(utcNow(), 'MMMM'), '.xlsx')

Output Example: SalesReport_July.xlsx

This helps in automatically organizing monthly reports.

Using Current Month in SharePoint Folders

For document management systems, creating month-based folders automatically keeps your files organized.

Example Folder Name: July2025

Expression:

concat(formatDateTime(utcNow(), 'MMMM'), formatDateTime(utcNow(), 'yyyy'))

Output Example: July2025

This is very useful for document management systems.

Real-World Example: Monthly Sales Report

Consider a requirement to generate a monthly sales report automatically.

Workflow:

  1. Scheduled Flow: Trigger the flow at the end of each month or beginning of the next.
  2. Get Current Month Name: Use formatDateTime(utcNow(), 'MMMM') to capture the current month.
  3. Create Report: Generate the sales report, potentially incorporating the month name into the report title or file name.
  4. Send Email: Send the report via email, with the subject line including the month name.
  5. Archive File: Save the generated report to a location like SharePoint, organized by month.

Result: Users receive a report with the correct month name every month, ensuring timely and accurate information delivery.

Common Use Cases Recap

Best Practices

Benefits of Dynamic Month Naming

Conclusion

Retrieving the current month's name in Power Automate is a simple yet powerful capability, easily achieved using the formatDateTime() function. Whether you are generating reports, creating folders, sending emails, or building dashboards, dynamic month names significantly improve readability and the efficiency of your automations.

By implementing these date formatting best practices, organizations can build scalable workflows that automatically adapt to changing dates and reporting periods, streamlining operations and enhancing data management.