Hello
I'm trying to set up a flow where when an email is flagged a new task is created in Planner. So far I've managed to set up the flow successfully whereby it pulls all of the email body text (converted from HTML to text) into the description of the task but I'd ideally like it to just be the URL from within the email.
I've tried following this solution: https://powerusers.microsoft.com/t5/Building-Flows/Extract-URL-from-Email-body/m-p/695681#M94225 but something just isn't working for me. I only have 'Compose' action and not 'Compose - Trim Start' or 'Compose - Replace Chars':
This is my current flow:
Can anyone help me please!?
That works! Thank you so much for your help.
Hi @Anonymous ,
Here are the screnshots and expressions:
All of these should be after the Html to text action, expressions are:
startPos...
indexOf(outputs('Html_to_text')?['body'], 'https://docs.google.com')
endPos...
indexof(substring(outputs('Html_to_text')?['body'], outputs('startPos')), 'sharing')
URL...
substring(outputs('Html_to_text')?['body'], outputs('startPos'), add(outputs('endPos'),7))
All are compose actions. See how you get on.
Not sure what is going on there, another user just tested pasting it for me and it worked for them. Will do you some screenshots, but can't do it right now. Will post screenshots in about an hour.
This is what I'm doing and still no luck:
Are you sure you copied the entire code? If you miss one character it will not appear, if it does not work for you I will screenshot it.
Thanks for this! I copied the code and then went to Power Automate, but its just showing me this:
ok, try this:
A bit like this:
Except your one is called getURL. Because a couple of the concepts are a little complicated I have separated the actions into different steps, so you can better understand what is going on.
After you paste, you will have a scope which will contain the steps that give you the URL, but these are intended to be chained off the action, HTML to text, so must go after it.
{"id":"2b75eb54-de4b-4cb5-8ab0-96c4-e6bf1982","brandColor":"#8C3900","connectionReferences":{"shared_conversionservice":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_conversionservice/connections/shared-conversionser-8c945934-2489-4e84-98ab-725c-31760fc1"}}},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"getURL","operationDefinition":{"type":"Scope","actions":{"startPos":{"type":"Compose","inputs":"@indexOf(outputs('Html_to_text')?['body'], 'https://docs.google.com')","runAfter":{}},"endPos":{"type":"Compose","inputs":"@indexof(substring(outputs('Html_to_text')?['body'], outputs('startPos')), 'sharing')","runAfter":{"startPos":["Succeeded"]}},"URL":{"type":"Compose","inputs":"@substring(outputs('Html_to_text')?['body'], outputs('startPos'), add(outputs('endPos'),7))","runAfter":{"endPos":["Succeeded"]}}},"runAfter":{"Html_to_text":["Succeeded"]}}}
See how you get on.
Yes, that's what I'm trying to extract and yes, please can you help me with this instance.
Are you trying to grab:
https://docs.google.com/document/d/1Coy_qI5qUAFlMbh2CLWP73Bs9ecK5vlevhaGBhcITx4/edit?usp=sharing
Correct?
As you are parsing a human written email, this is likely to wrong in future, but I can make you something that will pull that out of the email in this instance?
lol, that is a bit more than I was looking for, but that will do. 😂
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,075
Most Valuable Professional