cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
peterji
New Member

email subject keyword for sharepoint path

Just trying to tweek my flow for email subject parsing.  I am using substring and position based syntax to create a sharepoint path, but I would like to use a keyword in the subject field and then use the next 10 characters as a variable (or text) for the sharepoint path.  Please see below for the current working flow using substring to create a sharepoint path: /sharepoint/substring1/substring2/ then file attachments.

peterji_0-1664466377415.png

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @peterji ,

Power Automate has an expression indexOf(...) that'll give you position of a specific string in a string.

indexOf(<searchIn>, <searchFor>)

use the whole text as the first parameter, and the keyword as the second parameter.

It'll return the first position of the first letter in the keyword, therefore, you must add the length of the keyword to the index number. That'll be the starting position to use in the Substring.

add(indexOf(<searchIn>, <searchFor>),<lengthOfKeyword>)


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

1 REPLY 1
tom_riha
Super User
Super User

Hello @peterji ,

Power Automate has an expression indexOf(...) that'll give you position of a specific string in a string.

indexOf(<searchIn>, <searchFor>)

use the whole text as the first parameter, and the keyword as the second parameter.

It'll return the first position of the first letter in the keyword, therefore, you must add the length of the keyword to the index number. That'll be the starting position to use in the Substring.

add(indexOf(<searchIn>, <searchFor>),<lengthOfKeyword>)


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,161)