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

Getting a link to a flagged email

Hello all- 

The sample Flow "Create planner tasks for flagged emails in Office 365" creates a Planner task from a flagged Outlook email. I'm looking for a way to grab the URL of the flagged email in outlook and place that in the body of the Planner task, so I can reach the email and its associated conversation with one click. Is there a way to do this? 


Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @Bryan_Guffey ,

 

Sorry for there is no any way to achieve the requirement in Microsoft flow currently.

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-alzhan-msft
Community Support
Community Support

Hi @Bryan_Guffey ,

 

Sorry for there is no any way to achieve the requirement in Microsoft flow currently.

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi
Would the following workaround match your requirements? I am running a flow that is triggered when an email is flagged and:
-cretate the task in planner
-archive the email in sharepoint (.eml extension)
-adds it as a link to the planner task
Hooe this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi, yes, I think this would work!!

@Bryan_Guffey 

The good news is that I have the suggested workaround up and running since beginning of this month. If you find any issues implementing it please let us know

In this link you will find an example of how can you archive an email in .eml format (please refer to method#1):

https://www.enovapoint.com/blog/post/2-ways-to-autosave-emails-to-sharepoint-online

Happy Flowing!

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



bradcannell
Regular Visitor

Hi @Bryan_Guffey ,

 

I was trying to do something similar. I think I managed to figure out a work around that may or may not meet your needs. 

 

1. Use the When a new to-do in a specific folder is created (V2) trigger to create a new to-do in your Flagged Emails to-do list.

Screen Shot 2022-10-02 at 8.13.30 AM.png

2. Use Get my profile (V2) to get your profile (if you want to assign the task to yourself).

3. Use Initialize variable to create a string that will hold the link when we parse from the JSON below. I'm naming my string variable linkToEmail.

Screen Shot 2022-10-02 at 8.18.46 AM.png

4. Parse the body dynamic content from the trigger step using a Parse JSON step.

Screen Shot 2022-10-02 at 8.22.08 AM.png

Here is the schema I used. I may work for you as well.

{
    "type": "object",
    "properties": {
        "@@odata.context": {
            "type": "string"
        },
        "@@odata.etag": {
            "type": "string"
        },
        "importance": {
            "type": "string"
        },
        "isReminderOn": {
            "type": "boolean"
        },
        "status": {
            "type": "string"
        },
        "title": {
            "type": "string"
        },
        "createdDateTime": {
            "type": "string"
        },
        "lastModifiedDateTime": {
            "type": "string"
        },
        "hasAttachments": {
            "type": "boolean"
        },
        "categories": {
            "type": "array"
        },
        "id": {
            "type": "string"
        },
        "linkedResources@odata.context": {
            "type": "string"
        },
        "linkedResources": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "webUrl": {
                        "type": "string"
                    },
                    "applicationName": {
                        "type": "string"
                    },
                    "displayName": {
                        "type": "string"
                    },
                    "externalId": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string"
                    }
                },
                "required": [
                    "webUrl",
                    "applicationName",
                    "displayName",
                    "externalId",
                    "id"
                ]
            }
        },
        "body": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "string"
                },
                "contentType": {
                    "type": "string"
                }
            }
        }
    }
}

5. Add the webUrl dynamic content from step 4 to the string variable you created in step 3. Even though there is only one URL, it is stored in an array. So, we have to "loop" through the array and convert it to a string that we can use in the body of the planner task.

Screen Shot 2022-10-02 at 8.23.45 AM.png

6. Create a new planner task using a Create a task step. As you can see, I'm grabbing the title from the trigger and I'm assigning it to myself using the returned value from step 2.

Screen Shot 2022-10-02 at 8.26.38 AM.png

7. Add an Update task details step. Use the ID dynamic content from step 6 as the input value to the Task ID field. Add the variable containing the URL you created in steps 3/5 to the Description field. 

 

8. (Optional) Delete the to-do item created by the trigger using a Delete to-do (V2) step. I don't new a to-do item and a planner task.

Screen Shot 2022-10-02 at 8.32.37 AM.png

Warning: Step 8 will also remove the flag from the email. I haven't figured out a way around this, but for me this ins't a dealbreaker. 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,415)