cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Catman
Level: Powered On

Flow Problem: Updating SharePoint File Properties using E-mail Address in a SharePoint List

Hi Everyone,

 

I'm pretty new to flow, and i was hoping someone could point out where i've gone wrong with this flow i've built.

I'm using SharePoint in Office 365 in a University setting

I have a SharePoint Library called 'External Examiner Reports' and a SharePoint List called 'External Examiners'

 

The list is essentially a list of all the external examiners we have for the University Programmes. The list has their names (column: External Name) and E-mail Addresses (Column: E-Mail), and a bunch of other columns. 

 

I have built a flow that will take attachments from e-mails when they land in my inbox in a sub folder called '0.Document Repository', and create a file in the SharePoint Library 'External Examiner Reports'. 

 

The aim of the flow is to then cross reference the sender's e-mail address to the list of items in the SharePoint List 'External Examiners', and update the properties of the file that were created to recrord the sender's e-mail address and the senders name.

 

Whilst it works in so much as data gets written to the required columns, it is pulling back the wrong External Name from the External Examiners List... and i ca't fathom why. I've been testing it using myself, so i added myself to the External Examiners list and then E-mailed myself files. I don't know why, but it sets the E-mail field for the file to my e-mail, but the External's Name doesn't come back as me, instead, it comes back as a lady name Sue. Where am i going wrong? Flow images are below

Flow01.jpgFlow02.jpgFlow03.jpgFlow04.jpgFlow05.jpg

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow Problem: Updating SharePoint File Properties using E-mail Address in a SharePoint List

Hi @Catman,

 

Could you please share more details about your SharePoint list (External Examiners) and library (External Examiner Reports)?

Do you add the your email address into the E-Mail column of a External Examiners list item?

 

I suppose that you add the your email address into the E-Mail column of a External Examiners list item, is it true?  I think there is something wrong with the "Set variable" action nested within the "Apply to each" action of your flow. The input parameter of the "Apply to each" action (the "Set variable" action is within it) should be output of the "Filter array" action rather than the output of the "Get items" action.

 

I have made a test on my side and don't have the issue that you mentioned. Please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

 

Within "Set variable" action nested in "Apply to each 2" action, Name set to Name of Email Sender, Value set to following formula:

item()?['External_x0020_Name']

 

The flow works successfully as below:4.JPG

 

5.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

Highlighted
Catman
Level: Powered On

Re: Flow Problem: Updating SharePoint File Properties using E-mail Address in a SharePoint List

Hi @v-xida-msft

 

I solved the issue and it now works exactly as you laid out. Here's is what I had to do to make it work:

 

1. The column 'External Name' in my External Examiners list had an internal name of 'Title'. So i referenced this instead.

 

2. I had to set a range for the 'Get Items' to return. Even though when you open advanced options on the 'Get Item' action, the bottom field 'Top Count' says the default is 'all' - assuemdly, if left blank it 'all' - this was not retruning all the items. So, i know there are 497 records, so i put the 'top count' to 999 (see pciture). Once i did this, everything worked.

Might be a little bug to be worked out there. You can't type 'all' because it demands an integer'GetItems.jpg

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Flow Problem: Updating SharePoint File Properties using E-mail Address in a SharePoint List

Hi @Catman,

 

Could you please share more details about your SharePoint list (External Examiners) and library (External Examiner Reports)?

Do you add the your email address into the E-Mail column of a External Examiners list item?

 

I suppose that you add the your email address into the E-Mail column of a External Examiners list item, is it true?  I think there is something wrong with the "Set variable" action nested within the "Apply to each" action of your flow. The input parameter of the "Apply to each" action (the "Set variable" action is within it) should be output of the "Filter array" action rather than the output of the "Get items" action.

 

I have made a test on my side and don't have the issue that you mentioned. Please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

 

Within "Set variable" action nested in "Apply to each 2" action, Name set to Name of Email Sender, Value set to following formula:

item()?['External_x0020_Name']

 

The flow works successfully as below:4.JPG

 

5.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

Catman
Level: Powered On

Re: Flow Problem: Updating SharePoint File Properties using E-mail Address in a SharePoint List

Hi, thanks for this.

I'll try this when i'm back in the office in the morning.

In terms of where the email addresses are, the External Examiner Reports list has a column called 'E-mail' where everyone we have on the books has their e-mail stored. Each row on that list is essentially their profile (loads of other details there about what programmes they examine etc.)

 

In the External Examiners library, the corresponding e-mail column has blank fields until the attachments from the e-mails land in the libray. At this point that field in the E-Mail column takes the 'From' on the e-mail and writes it.

 

So if 'Bob@contoso.com' sends the report on e-mail, it goes in the External Examiners Library, and the field on the E-Mail column will say 'Bob@Contoso.com'

 

Then the aim of the flow is that it looks for that field data, 'Bob@Contoso.com' in the External Examiners List. If it finds a match, it should then copy Bob's proper name, e.g. Bob Jones, into the field for the 'External Name@ column in the External Examiner Reports library.

 

Eventually i want to pull back more data like what department Bob is affiliated to at the university, and which programmes his report is related to.

Catman
Level: Powered On

Re: Flow Problem: Updating SharePoint File Properties using E-mail Address in a SharePoint List

Hi @v-xida-msft

Ok, so... it kind of worked

 Everything worked fine except the get items and filter array. see picture.

 Filter01.jpg

 

I ran it multiple times, and couldn't get it to pull back the details form the 'External Examiners List'.

So, i made another list as a test, with just 2 columns (External Name, External E-mail) and one record in my name.

When i ran the flow to get items from this list it worked perfectly.

So, could there be some problem with the setup of my other list (External Examiners)?

 

When i recreated the columns i made them identical, both of type 'single line of text'.

 

So, this one is a head scratcher. Could it be that there are too many items in the list for the array? The 'External Examiners' list has 497 items in it. It was originally made by importing an Excel spreadsheet and then adding columns etc.

 

What do you think?

Highlighted
Catman
Level: Powered On

Re: Flow Problem: Updating SharePoint File Properties using E-mail Address in a SharePoint List

Hi @v-xida-msft

 

I solved the issue and it now works exactly as you laid out. Here's is what I had to do to make it work:

 

1. The column 'External Name' in my External Examiners list had an internal name of 'Title'. So i referenced this instead.

 

2. I had to set a range for the 'Get Items' to return. Even though when you open advanced options on the 'Get Item' action, the bottom field 'Top Count' says the default is 'all' - assuemdly, if left blank it 'all' - this was not retruning all the items. So, i know there are 497 records, so i put the 'top count' to 999 (see pciture). Once i did this, everything worked.

Might be a little bug to be worked out there. You can't type 'all' because it demands an integer'GetItems.jpg

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,411)