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

Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

 

 

Hi All,

I am new to using Flow and trying to find the best solution for the following situation, so any help would be much apprecited:

I want to have a online form automatically route to sequential departments for authorisation, whilst at the same time emailing the relevant parties of its progress and updating an excel document on sharepoint. At the final stage I want it to email out to a corresponding depot depending on how one of the excel fields has been updated during the process.

I have hit 2 problems in trying to get this to work:

1: A limit in the amount of authorisation steps i can include which i believe is a nesting issue and i can't work around?

2: The final step where I have a formula within excel to update the table with the correct corresponding email address based on the flow updating a cell duing the process seems to fail in gathering that email address in my flow, i can only assume it is pulling the formula and not the text/value from the cell?

formula is: =IF([@Route]="","",VLOOKUP(VALUE(LEFT(SUMPRODUCT(MID(0&[@Route],LARGE(INDEX(ISNUMBER(--MID([@Route],ROW(INDIRECT("1:"&LEN([@Route]))),1))*ROW(INDIRECT("1:"&LEN([@Route]))),0),ROW(INDIRECT("1:"&LEN([@Route]))))+1,1)*10^ROW(INDIRECT("1:"&LEN([@Route])))/10),2)),Depot_Email!$B$2:$C$18,2,FALSE()))


I have a sharepoint excel doument that has 3 tabs. 

One tab is a table with main record with the responses from the from, the second is a table with the stage that the form has been through for authorisation updated when the approve response date is submitted, the third is a table of the relevant email addresses for the appropriate depots that need informing at the final stage. A lot of the information contained within the emails is dynamic from the excel doucment.

I am using the approvers comments at various stages to update fields within table 1 such as the required route/accounting details when the approval is completed by that department.

My current solution:

Form is submitted - updates to show recieved, send email to say been received - starts approval - if approved due to containing correct information updates fields with data, and table with response date and sends emails to sender and next department - starts new approval - department approves with routing details - sends email to sender, next department, updates table with response date and updates table 1 with routing data - starts new approval - once final set up has been completed systemically it emails sender to confirm completed - updates information of completion date and send email to relevant depot with details (last bit thats failing)
Capture 1.PNGCapture 2.PNGCapture 3.PNG



i am sure there is a more elegant soloution and any help would be much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

Hi @Segw78,

 

It's should not a timing issue, I have tested on my side but not the same issue with you.Annotation 2019-09-18 180520.png

You could use the variable to have a test, the Initialize variable and Set variable actions will be used.Annotation 2019-09-18 180652.png

Best Regards,
Community Support Team _ Lin Tu
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

7 REPLIES 7
Segw78
Level: Powered On

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

This is the email set up I am using at the final stage, which reads from the cell that is updated by the formula above, however the flow fails as it states that the email address is not  valid:

Capture 5.PNG

Community Support Team
Community Support Team

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

Hi @Segw78,

 

  1. Not sure the authorization is the connection of outlook, you could refer to this document to view the limits of Flow configuration. https://docs.microsoft.com/en-us/flow/limits-and-config#definition-limits
  2. The Flow will pull the text value not the formula. If the last error in the final step that email is invalid, you can create a Compose action, to check the output the Email ref whether correct.
  3. Your Flow logic is correct. If you want to simplify the process, it is hard to do, it will make your Flow more complex.

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

Segw78
Level: Powered On

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

Hi, thanks for the reply and your help.

I included the dynamic field"Email ref" in the body of an email to myself and it correctly displayed the email address rather than the formula which indicates it pulls the value rather than the formula as you stated.

I added in a new connector "compose" with the input as "email ref" and then used the output as a dynamic field in the email address field - when testing however this still failed!

The error code was 400 and as follows:

  "errors": [
    {
      "message": "The to array is required for all personalization objects, and must have at least one email object with a valid email address.",
      "field": "personalizations.0.to",

When looking at the error email it shows the "To:" field as blank despite this showing correctly within the flow as the output from the compose. I understand the logic of why this should work but don't understand why it isn't?

Any thoughts?

Community Support Team
Community Support Team

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

Hi @Segw78,

 

It's weird, could you please have a try that input the email address manually?Annotation 2019-09-18 165641.png

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

Segw78
Level: Powered On

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

Hi @v-litu-msft,

Community Support Team
Community Support Team

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

Hi @Segw78,

 

It's should not a timing issue, I have tested on my side but not the same issue with you.Annotation 2019-09-18 180520.png

You could use the variable to have a test, the Initialize variable and Set variable actions will be used.Annotation 2019-09-18 180652.png

Best Regards,
Community Support Team _ Lin Tu
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

Segw78
Level: Powered On

Re: Flow reading excel to get email addresses from a vlookup & sequential authorisation steps

Hi @v-litu-msft ,

I have managed to get this to work - but with a wierd solution.

I used "Compose" to identify the email ref within the table as a text field - then "Update Row" within the table to hold the output from "Compose" in another column within the table (Lookup1)- then the email "To" used the the field Lookup 1 as the address to.

This worked - i don't understand why it didn't accept the compose output as a valid address for the email "To" field, however this has resolved the problem.

Thank you for your help

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

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 (4,026)