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:

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.

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

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

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

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

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

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’.

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.

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'))

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

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

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

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

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

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.

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

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

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

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

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

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:
1. Created an Automated Cloud flow with the trigger When an item is created or modified for the Customer Requests SharePoint list.

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

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

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

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

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:
- Check If the Filename Contains in Power Automate
- Check IF SharePoint List is Empty in Power Automate
- Check if SharePoint List Already Exists in Power Automate
- Power Automate IF Length
- Check IF Attachment Exists Using Power Automate
- Send Email Reminders From a SharePoint List Using Power Automate
- Check if a file exists in the SharePoint document library in Power Automate

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.