Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Convert True to Yes in Power Automate?

Do you need to change true false to yes no in Power Automate? Then, this Power Automate tutorial will guide you to convert true to Yes and false to No in Power Automate in different ways with examples. I will also show you how to convert a boolean to a string in Power Automate.

Scenario:

The flow will trigger When an item is created in the SharePoint List, and an email will go to the Employees to check whether the details are correct or not.

So, by default, when we get items from the SharePoint list for the Yes/No column data type, it returns the values as true or false. The screenshot below shows that the Yes/No column types (highlighted in red) are presented in my SharePoint list.

As per my requirement, I want to convert a boolean to a string and display the Yes/No fields in the email notification.

power automate convert true to yes

Now, we will create a flow to convert a boolean to a string using Power Automate.

Power Automate convert Boolean to String

Let us see how to convert a boolean to a string using Power Automate flow.

In this example, I am going to use the below SharePoint Employee list, consisting of different columns.

power automate convert string to boolean
Column NameColumn Data type
EmployeeIDdefault title column
EmployeeNameperson or Group type
EmployeeDesignationText type
DateofJoiningDate type
EmployeeStatusChoice type
ContactNumberNumber type
EmployeeEmailAddressText type
PreviouslyWorked Yes/No type
Disablity Person Yes/No type

Step-1:

  • Based on my requirement, the flow will trigger when an item is added to the SharePoint list. So create an automated cloud flow and choose the trigger as when an item is created.
  • Expand the created trigger action and configure the required parameters.
    • SharePoint Site Address – select the SharePoint site address
    • List Name – I have selected my SharePoint list (Employee list)
power automate convert yes no to boolean

Step-2:

Select + new step and add a send email action from the action triggers. Provide the required parameters

  • To – Pass the Employee email address from dynamic content values
  • Subject – Enter the Subject of the mail
  • Body – Provide the body of the mail

Here, if we directly pass the yes/no field from the dynamic content value, it returns the boolean value as true or false. So we will convert the boolean to a string and then send an email to the Employee to check whether the details are correct.

In my SharePoint list, I have two yes/no fields.

PreviouslyWorked (Yes/No type)

if(equals(triggerOutputs()?['body/PreviouslyWorked'],true),'Yes','No')

where,

PreviouslyWorked = column internal name

Disability Person (Yes/No type)

if(equals(triggerOutputs()?['body/DisablityPerson'],true),'Yes','No')

where,

DisablityPerson = column internal name

power automate convert boolean to string

Save and Run the flow, The flow will trigger only when I add a new item to the SharePoint list. Here, I have added the highlighted list item

power automate convert yes to boolean

Once the flow runs successfully, now you can see that all the Yes/No fields will be converted from True/False values to Yes/No values, as shown below.

power automate convert false to No

This is how to change true false to yes no using Power Automate flow.

Power Automate convert String to Boolean

Now, we will see how to convert String to Boolean using Power Automate flow.

We can convert yes no to a boolean using Power Automate flow in three ways. They are,

  1. Using If Function
  2. Bool function
  3. Condition action

Using If Function

Yes, we can easily convert the string to a boolean by using the if function in Power Automate flow. We are going to use this expression to get the string value, compare it with the required value, and finally return the corresponding boolean value.

If function syntax:

if(condi