Power Automate Condition If String [With Examples]

A few weeks ago, I encountered an interesting scenario while working with strings in Power Automate. That’s when I thought sharing how to handle different string conditions in Power Automate would be helpful.

In this article, we’ll explore Power Automate Condition If String, such as checking if a string is empty, verifying if it contains a number or unique character, validating its length, and determining if it includes a specific word.

Power Automate Condition if String is Empty

Suppose you have a SharePoint list named Support Tickets and want to send an email notification to the support team only if the Issue Description field is not empty. If it is empty, send an email to the requester.

Below is the SharePoint List which I will use in this example:

Power Automate Condition if String is Empty

Now follow the below steps:

1. Create an Automated Cloud Flow using the SharePoint connector’s ‘When an item is created‘ trigger. Select the SharePoint site where your Support Tickets list is present, and choose the Support Tickets list.

Power Automate Check if String is Empty

2. Add a Condition action which will check the length of the Employee Code:

  • In the left input, enter this expression:
empty(triggerBody()?['IssueDescription'])
  • Operator: is equal to
  • Right field: true
string empty in power automate

3. In the true section, add a Send an Email (V2) action to notify the requester about the description is empty:

  • To: Provide the requester email address.
  • Subject: Action Required: Provide More Details for Your Support Ticket [Ticket ID]
  • Body: Provide the below:
Hello @{triggerBody()?['ClientName']},  

We noticed that your support ticket (**Ticket ID:** @{triggerBody()?['TicketID']}) was submitted without an issue description. To help us assist you better, please provide more details about your issue.  

You can update your request in the Support Portal.  
Looking forward to your response.  

Best regards,  
IT Support Team  
power automate if string is empty

4. In the False section, add an action to send an email to notify the Support Team.

  • To: Provide the Support Team email address.
  • Subject: New Support Ticket Received – [Ticket ID]
  • Body: Provide the below:
Hello Support Team,  

A new support ticket has been submitted. Please find the details below:  

Ticket ID: @{triggerBody()?['TicketID']} 
Client Name: @{triggerBody()?['ClientName']} 
Issue Description:
@{triggerBody()?['IssueDescription']}

Please review and take necessary action.  
Best regards,  
IT Support Team 
How to Check if String is Empty in Power Automate

Now save the flow, go to the SharePoint list Employee Details, and add an item with an empty Issue Description.

power automate condition check empty

After the flow runs successfully, the Client will receive the email.

power automate condition check string empty

Power Automate Condition if String Contains

Suppose you have a SharePoint list called ‘Customer Requests,’ where customers submit their names. Check if the ‘Customer Name’ contains a number to ensure valid entries. If it does, update the ‘Status’ column in SharePoint to ‘Invalid Entry’; otherwise, change the status to ‘Valid’.

power automate if string contains

To do this, follow the below steps:

1. Create an Automated Cloud Flow using ‘When an item is created‘ trigger. Select the SharePoint site address, and choose the Customer Requests list.

power automate if string contains value

2. Add a Compose action and use the following expression to check if the Customer Name contains a number:

or(contains(triggerBody()?['CustomerName'], '0'), contains(triggerBody()?['CustomerName'], '1'), contains(triggerBody()?['CustomerName'], '2'), contains(triggerBody()?['CustomerName'], '3'), contains(triggerBody()?['CustomerName'], '4'), contains(triggerBody()?['CustomerName'], '5'), contains(triggerBody()?['CustomerName'], '6'), contains(triggerBody()?['CustomerName'], '7'), contains(triggerBody()?['CustomerName'], '8'), contains(triggerBody()?['CustomerName'], '9'))
power automate check if string contains value

3. Add a Condition action to check if the compose output is equal to true:

power automate check if string contains number

4.  In the true section, add an update item action and change the status to invalid Entry:

  • Site Address: Your SharePoint site
  • List Name: Customer Requests
  • ID: Select dynamic content ID
  • Status Value: Select Invalid Entry
power automate check if string contains text

5. In the False section, add an update item action and change the status to Valid Entry:

  • Site Address: Your SharePoint site
  • List Name: Customer Requests
  • ID: Select dynamic content ID
  • Status Value: Select Valid Entry
power automate if string contains number

Save the flow, go to the SharePoint list Customer Requests, and add an item when the customer name contains a number.

power automate check if string contains only numbers

After the flow runs successfully, go to the SharePoint list and refresh it once. The status will be updated to ‘Invalid Entry’.

Power Automate Condition if String Contains

By following the above steps, you can check whether the string contains a number. However, to check whether a string contains a unique character instead of a number, you can modify the Compose action expression in Power Automate.

or(
    contains(triggerBody()?['CustomerName'], '!'),
    contains(triggerBody()?['CustomerName'], '@'),
    contains(triggerBody()?['CustomerName'], '#'),
    contains(triggerBody()?['CustomerName'], '$'),
    contains(triggerBody()?['CustomerName'], '%'),
    contains(triggerBody()?['CustomerName'], '^'),
    contains(triggerBody()?['CustomerName'], '&'),
    contains(triggerBody()?['CustomerName'], '*'),
    contains(triggerBody()?['CustomerName'], '('),
    contains(triggerBody()?['CustomerName'], ')'),
    contains(triggerBody()?['CustomerName'], '-'),
    contains(triggerBody()?['CustomerName'], '_'),
    contains(triggerBody()?['CustomerName'], '='),
    contains(triggerBody()?['CustomerName'], '+'),
    contains(triggerBody()?['CustomerName'], '['),
    contains(triggerBody()?['CustomerName'], ']'),
    contains(triggerBody()?['CustomerName'], '{'),
    contains(triggerBody()?['CustomerName'], '}'),
    contains(triggerBody()?['CustomerName'], ';'),
    contains(triggerBody()?['CustomerName'], ':'),
    contains(triggerBody()?['CustomerName'], "'"),
    contains(triggerBody()?['CustomerName'], '"'),
    contains(triggerBody()?['CustomerName'], '<'),
    contains(triggerBody()?['CustomerName'], '>'),
    contains(triggerBody()?['CustomerName'], ','),
    contains(triggerBody()?['CustomerName'], '.'),
    contains(triggerBody()?['CustomerName'], '/'),
    contains(triggerBody()?['CustomerName'], '?'),
    contains(triggerBody()?['CustomerName'], '|'),
    contains(triggerBody()?['CustomerName'], '`'),
    contains(triggerBody()?['CustomerName'], '~')
)

Power Automate Condition Length of String

For this example, I use the same SharePoint list where customers submit their names. To ensure valid entries, check the length of the Request Details column. If the length is less than 3 characters, update the Status column to Invalid Entry. Otherwise, update the Status column to Valid Entry.

Follow the below steps:

1. Create a Power Automate cloud flow with a trigger. When an item is created, select the site address and list name.

power automate if string contains value

2. Add a Condition action to check the length of the string:

  • In the left input, enter this expression:
length(triggerBody()?['RequestDetails'])
  • Operator: is less than
  • Right field: 3
power automate string length

4.  In the true section, add an update item action and change the status to invalid Entry:

  • Site Address: Your SharePoint site
  • List Name: Customer Requests
  • ID: Select dynamic content ID
  • Status Value: Select Invalid Entry
power automate check if string contains text

5. In the False section, add an update item action and change the status to Valid Entry:

  • Site Address: Your SharePoint site
  • List Name: Customer Requests
  • ID: Select dynamic content ID
  • Status Value: Select Valid Entry
power automate if string contains number

Save the flow, go to the SharePoint list Customer Requests, and add an item where Request Details is less than three.

power automate string length limit

After the flow runs successfully, go to the SharePoint list and refresh it once. The status will be updated to ‘Invalid Entry’.

Power Automate Condition Length of String

In the same way you can check the Power Automate string length greater than, you only need to change the operator in the condition action.

Power Automate Condition If string Contains SubString

You have a SharePoint list called Project Tracker with a column named Description (Multiple lines of text). When the title contains the word “urgent,” you want to email the project manager.

To do this, follow the below steps:

1Created an Automated Cloud flow with the trigger When an item is created or modified for the Customer Requests SharePoint list.

power automate condition contains string

2. Add a Condition Action to Check if the Description contains Urgent.

power automate if contains string

3. In the true section, add Send an email (V2) action to Notify the project manager that an urgent task has been created.

  • To: Enter the project manager (email address) using dynamic content.
  • Subject: Enter a subject line for Mail.
  • Body: Enter the body of the email.
Hello @{triggerBody()?['ProjectManager/DisplayName']},

A new urgent task has been added to the Project Tracker SharePoint list.

Task Title: @{triggerBody()?['ProjectName']} 
Description: @{triggerBody()?['Description']}
Created On: @{formatDateTime(utcNow(),'dd/MM/yyyy')}

Please review this task as soon as possible.

Best Regards,  
Power Automate Notification
Power Automate flow  substring Expression with condition

Save the flow, go to the SharePoint list, and add an item where the description contains the urgent keyword.

Check text contains a value with Power Automate

After the flow run successfully, the project manager will receive an email.

Power Automate Condition If string Contains SubString

Conclusion

In this tutorial, we explored different ways to use conditions in Power Automate when working with strings.

We covered checking if a string is empty to send appropriate email notifications, verifying if a string contains a number or unique character to mark invalid entries, and determining the length of a string to validate input. Additionally, we looked at how to check if a string contains a specific word (like “urgent”) to trigger an email notification.

You may also like:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Live Webinar

Quiz App Using SharePoint Framework (SPFx)

Learn to built a complete Quiz Management solution that enables admins to create and manage quizzes, categories, questions, and settings with an easy automated setup process in SharePoint. It also includes an interactive quiz experience for users and a powerful dashboard to track participation, analyze results, and view detailed performance reports with charts and answer insights.

📅 2nd June 2026 – 10:00 AM EST | 7:30 PM IST

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App