I've been trying to use this solution for my own Microsoft Flow, taking an excel spreadsheet and notify users via email on their overdue datasets. I have a simple table of dataset name, url of dataset, name of person, persons email and overdue days. My issue occurs in the Append to array variable, when i use the following formula
Since you are using an excel spreadsheet and not a SharePoint list like in the previous examples i think you will need to drop the 'first' formula and just grab the value of the item.
In the sharepoint list we are pulling the data from a person column which can contain multiple users and using the first formula iterates that column if there are multiple users assigned to a task.
If you only have one user in your contact email field in excel then the above solution should work. If not you would need to add a delmitter to your excel field like a comma between your email address and then split that field based on the delimitter to get those values into an array.
Thanks for the quick reply. Yes i have multiple contacts which have one or more overdue datasets, which i need to display in the email i send them. Below is an example.
How would i use the contactEmail column email addresses and send an email out with their associated overdue datasets? Can i tweak the existing example to do that?
Here is a link to a post with solution that clearly demonstartes how to reference columns, row by ro... I believe this example is what you need.
Thanks @ScottShearer but i need to send a single email per person, batching items rather than sending multiple emails for each overdue item.
You can do it like below i made a quick flow using an excel sheet.
Append you array to the value of the email field that Flow provides
change the filter to like below in the do until
Then you can follow the rest of the steps they should be the same
Thanks @ZachRoberts. It seems to work up until it gets to the end of the flow and Set Variable returns an error (shown below). This causes it to loop on the first email address until the flow forces a stop, it doesn't get to the other email addresses. But it is outputing the correct content which is good!
You need to adjust your 'Compose 2' to be a formula expression like below
then it should work
in your case the expression needs to be
Many thanks @ZachRoberts. It was driving me nuts and it ended up being a simple error. At least i'll know what it is when it happens next time.
It's all working now. All the test emails now receive the correct datasets that are assigned to them. 🙂
Dear Kris, @v-xida-msft ,
I am currently building a Logic App workflow that should send a message through Microsoft Teams to a specific set of users (chat message), based on your post. So I am trying to accomplish the same result.
My scenario is also based on a SharePoint Online list. Instead of a task list, which you have used, I am using a list called Order Details. Each co-worker can add multiple items to the list, which will be automatically associated with the specific order.
I am trying to configure my Logic App workflow to only send one message through Microsoft Teams once the order has been processed, based on the Created By.Email column. But unfortunately the workflow keeps sending a message for each item that it finds within the list. Could you possibly help me out with this?
Thanks in advance!
Hi @ZachRoberts , definitely,
Let's start with my SharePoint configuration.
I have two lists:
- Order details
Order details contains a lookup column that refers to the related order.
Currently, in the list Created By of all items is just me. You can imagine that other users will show up here.
Once the order has been delivered, I wish to send just one (1) chat message through Microsoft Teams telling that the order has been delivered.
The Logic Apps has now been configured as follow (based on the answer provided on the first page in this topic), and I am pretty sure there will be some errors inside:
2. Check if order status has been changed to Delivered, and then perform get items filtered on the order title (which is unique)
3. For each. "value" shown below is the output of Get Items above: body('Deelnemers_van_de_bestelling_ophalen')?['value']. "Created By Email" inside "Append to array variable" contains: items('For_each')?['Author']?['Email']
4. Compose, "Input "contains:
5. Until, and Get items. Filter Query 'Title' object contains: triggerBody()?['Title']
6. Filter Array,
In 'From', value contains: body('Deelnemers_van_de_bestelling_ophalen_2')?['value']
'Created By Email' contains: item()?['Author']?['Email']
first(...) contains: first(variables('CreatedByEmail'))
7. I am not sure if "Create HTML table" is necessary in this step, but it is configures as follows:
"Body" contains: body('Filter_array')
"Output" contains: body('Select')
8. Send a chat message through MS Teams. Inside 'Recipient', object "first(...)" contains: first(variables('CreatedByEmail'))
9. Compose and set variable.
Compose 2, object skip(...) contains: skip(variables('CreatedByEmail'),1)
Outputs object contains: outputs('Compose_2')
So, the current behaviour is that the Logic App successfully runs without any error, but instead of 1 chat message I am receiving 1 each row.
You mentioned that you followed the solution on the first page? There was some errors in that solution and it was straightend out in a post I made later in the thread. Can you check out message 18 in the thread, I uploaded screenshots of my solution there.
In my flow to test it i replaced send an email with the teams message and i am getting 1 message with each of the tasks that is assigned to me.
Hi @ZachRoberts ,
I have rebuilt the workflow based on message 18.
Now I am getting the following error:
And I have configured this action as follows:
Do you have any idea what I'm doing wrong here?
Hi Kris (@v-xida-msft),
I tried this one. Can you help me further. it seems like my "first" function returns the first letter of the email address instead of the first email. (I tried to search the net what ive missed, but found none up to now) Thanks so much
Hi @BastMani ,
You can place the "code" in the expression field when the dynamic window is visible when you are entering data into a field.
Three Super User rank tiers have been launched!
Features releasing from October 2020 through March 2021
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!