While working on an Employee Survey Application, I encountered an interesting challenge. One of the steps in Power Automate required converting a string value, such as an employee’s unique identifier from a form response, into a GUID. If you’ve ever faced a similar requirement in Power Automate, don’t worry—converting a string to a GUID is easy.
In this Power Automate tutorial, I will show you how to convert a string into a GUID format with dashes (with or without curly braces) in Power Automate. I will also explain how to generate a GUID in Power Automate.
Convert String to GUID in Power Automate
When you need to convert a string into a GUID format in Power Automate, you must format the string with specific patterns: groups of characters separated by dashes, optionally enclosed in curly braces. Since Power Automate doesn’t have a built-in function to create a GUID from a given string, we use the substring() and concat() functions to manually format the string into the standard GUID pattern.
Now follow the below steps:
1. Create an Instant Cloud Flow by selecting the ‘Manually trigger a flow’ trigger action.

2. Add the ‘Initialize Variable‘ action, provide a name, set the type to ‘String,’ and enter the string value you want to convert into a GUID format.
1234567890abcdef1234567890abcdef

3. Add a Compose action to convert the string into a GUID format. Provide the below expressions:
- Without curly braces:
concat(
substring(variables('varGUID'), 0, 8), '-',
substring(variables('varGUID'), 8, 4), '-',
substring(variables('varGUID'), 12, 4), '-',
substring(variables('varGUID'), 16, 4), '-',
substring(variables('varGUID'), 20, 12)
)

- With curly braces:
concat(
'{',
concat(
substring(variables('varGUID'), 0, 8), '-',
substring(variables('varGUID'), 8, 4), '-',
substring(variables('varGUID'), 12, 4), '-',
substring(variables('varGUID'), 16, 4), '-',
substring(variables('varGUID'), 20, 12)
),
'}'
)

Now Save and manually run the flow and check the Compose action outputs.
- Without curly braces:

- With curly braces:

Get a GUID in Power Automate
Power Automate provides a built-in function, guid(), to generate unique GUIDs dynamically.
| Expression | Description | Example Result |
|---|---|---|
| guid() | Generates a standard GUID. | 12345678-90ab-cdef-1234-567890abcdef |
| guid(‘N’) | GUID in number format (no hyphens). | 1234567890abcdef1234567890abcdef |
| guid(‘B’) | GUID with curly braces. | {12345678-90ab-cdef-1234-567890abcdef} |
| guid(‘P’) | GUID is enclosed in parentheses. | (12345678-90ab-cdef-1234-567890abcdef) |
Now, let’s see how to do in Power Automate:
1. Select the ‘Manually trigger a flow’ trigger action, then create a Compose action and provide the below expression:
guid()

Save and manually run the flow. Check the outputs of the Compose action.

In the same way, you can check the rest of the expression.
Conclusion
This tutorial covered how to work with GUIDs in Power Automate. We learned how to convert a string into a GUID format using the substring() and concat() functions, both with and without curly braces. Additionally, we covered how to generate a GUID dynamically using the built-in guid() function.
You may also like:
- Convert XML to CSV Using Power Automate
- Retrieve SharePoint List Items Using Power Automate
- Send a Customized Email when a new File is added using Power Automate
- Convert CSV to Excel Using Power Automate
- Add Condition Based On Form Response Using Power Automate
- Update Only One Field in a SharePoint List Item Using Power Automate

I have worked with Microsoft technologies for more than 18 years, including SharePoint, Microsoft 365 and the Power Platform (Power Apps, Power Automate and Power BI), at companies like HP, TCS and KPIT. I started EnjoySharePoint in 2011 to share the solutions I build in real projects with readers in the United States, Canada, the United Kingdom, Australia, New Zealand and beyond. Microsoft has recognized this work with the Microsoft MVP award 13 times since 2014.