cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Run history outputs correct link to sharepoint File, Planner posts different link

Hello,

 

Im encountering a weird issue with a flow that is supposed to grab an attached file from Outlook , upload it to SharePoint and create a planner task with a link to the SharePoint file. 

 

The flow is correctly executing everything in the run history, and posts the correct link to the file, however when i try to open the link in the actual planner, the link is not corresponding to the one "update task details" is telling me has been outputted. 

 

Path that run history tells me has been outputted to "Update task details" - 

 

EQg-Cna9b95JggWszHdGoY4BmC4q5tkjngPPNdz9aqy8AQ

 

Path that the actual planner contains 

 

EUdoulvpeShMgrbTqSNV6ZwBFUv2HHqZBufB94EvsMJjUw

 

How can this be?

 

WTF.PNG

 

This is the end of the flow,

 

Also the link in the actual planner is reffering to the "signature image" in the email

The template i have been using is: Here 

 

Hope to hear from you, thanks in advance - please do tell me if you need more information 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Run history outputs correct link to sharepoint File, Planner posts different link

Hi @Kristianpeterse 

 

Here are a couple of changes you can do: 

1. After the get email action, add an action - Initialize a variable (name it as links and type is string, leave the value empty)

2. In the apply to each loop, add a condition, before the get attachment action and check the file content type to compare if it is not equal to jpg (add two more rows for png and jpeg)

3. Move everything except the update task details in the apply to each loop to the yes branch of the condition. 

4. In the yes branch, after the create sharing link action, add an action- Append to string variable and select the variable initialized at the top and in the value, provide the link to file. 

5. Drag the update task details action outside the loop and pass the string variable in the description along with whatever other text you want to pass there. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

7 REPLIES 7
Highlighted
Dual Super User III
Dual Super User III

Re: Run history outputs correct link to sharepoint File, Planner posts different link

Hi @Kristianpeterse 

 

Can you share a screenshot of the flow in edit mode? Based on the template, it will create files in sharepoint for all the attachments in the email. Note that the signature images (or any images in the body of the email) also get created as files in sharepoint and if the attachments from the email are of a different type (like a pdf or an excel sheet etc) you can add a condition to ignore file types of png/jpeg/jpg and revise the flow a bit and try again. Also, as all of this is in a loop, the update task details happens multiple times and it replaces the content that was in there before. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Run history outputs correct link to sharepoint File, Planner posts different link

Hi @yashag2255 

Thanks for the super fast reply!

- That kind of makes sense to me, (only started working with flows a couple of weeks ago) 

 

here are the screenshots 

 

1.JPG

 

2.JPG

 

3.JPG

 

4.JPG

 So the most important files are going to be excel, pptx and word

are you suggesting that i create an action/condition that ignores jpeg/png files since body signatures are often in this format (in my experience), or are there other ways around it?

 

Thanks!

Highlighted
Dual Super User III
Dual Super User III

Re: Run history outputs correct link to sharepoint File, Planner posts different link

Hi @Kristianpeterse 

 

Here are a couple of changes you can do: 

1. After the get email action, add an action - Initialize a variable (name it as links and type is string, leave the value empty)

2. In the apply to each loop, add a condition, before the get attachment action and check the file content type to compare if it is not equal to jpg (add two more rows for png and jpeg)

3. Move everything except the update task details in the apply to each loop to the yes branch of the condition. 

4. In the yes branch, after the create sharing link action, add an action- Append to string variable and select the variable initialized at the top and in the value, provide the link to file. 

5. Drag the update task details action outside the loop and pass the string variable in the description along with whatever other text you want to pass there. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Frequent Visitor

Re: Run history outputs correct link to sharepoint File, Planner posts different link

@yashag2255 

 

Thankyou

 

Will try this first thing in the morning and let you know how im progressing, if it solves my issue i will make sure to mark your answer 🙂 !

Highlighted
Frequent Visitor

Re: Run history outputs correct link to sharepoint File, Planner posts different link

@yashag2255 

 

Okay, i think i am closer but not quite there yet. 

 

The flow history posts that the flow has failed, even though when i check the history a few minutes after, everything has been executed correctly. ( could be something with the loops you were mentioning ) ?

 

- The first time i tried, it looked like it still tried to grab the jpg file and upload it, however when i reviewed the flow and tried a couple other times later, the correct file was uploaded. ( i also noticed the flow will fail if there already exists a file with the same name, any way to counter this?) 

 

1.PNG2.PNG

 

Also the update tasks is providing a link that does not refer me to the sharepoint folder, i am suspecting that it is because i have to change the substring to fit the changes that you suggested (i just copied the one from the flow template)  - if so, could you help me specify what it should include?

 

Also please let me know if you need a screenshot of the run history 🙂 

 

THANKS in advance!!

Highlighted
Dual Super User III
Dual Super User III

Re: Run history outputs correct link to sharepoint File, Planner posts different link

Hi @Kristianpeterse 

 

1. The error you saw first and found the flow successful in run history is because you can monitor the run mode (test from previous runs) for about 10 minutes after which it shows a time out error but the flow is still running and you can check that in the run history. 

2. Regarding the name of the attachment, yes it will fail and to get rid of this, you can use the expression utcNow(dd-mmThh-ss) (to add the current date and time stamp in date-monthThours-seconds format before the file name) and add this before the current text in the name of the file for create file action. 

 

Now can you share the expression in the substring? (what is being displayed when you just pass the variable outputs in the update planner task action?)

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Run history outputs correct link to sharepoint File, Planner posts different link

@yashag2255 

 

the substring contains the following code:

 

 

substring(coalesce(body('Html_to_text'),''), 0, min(length(coalesce(body('Html_to_text'),'')),32000))

 

 

Also the following wall of text is at the moment being outputted to the planner

 

3.PNG

(the correct link gets posted at the bottom)

 

Also i noticed that i did not have "sharing link" after the substring in the "update planner task" when i made the initial reply today - i believe i need to have that element? like this: 

 

4.PNG

 

Also just noticed that the files that the link is referring to is corrupted, can that be due to the substring aswell?

 

The utcnow() wont let me add the date format you suggested, can i leave it empty?

 

 

 

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (4,004)