web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating a Flow for an...
Power Automate
Answered

Creating a Flow for an Inventory Reorder Email

(0) ShareShare
ReportReport
Posted on by 27

I have a sharepoint list containing all our inventory items. There is a column for "actual quantitiy" and a column for "minimum quantity". I am trying to find a way to send an email containing all the line items where "actual quantity" is less than or equal to "minimum quantity". I am flexible on how this can be accomplished. Perhaps it generates a table of all the line items that fits the condition and emails the table or a link to the generated table. I just don't want it to be one email per line item (as this could be 50+ and it would not be useful). Any help on how to set up this workflow would be very appreciated!

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,501 on at

    Hey @pcpatter 

    You can initialize an array variable. And whenever the condition gets true, append it to that array. After the apply to each ends, after that just send one email with all the array values.

     

    Sundeep_Malik_0-1664598188851.png

    Sundeep_Malik_3-1664598322751.png

     

    Sundeep_Malik_2-1664598302189.png

     

    And if you want to send it in a format:

    You can also use create csv table and pass the array in it before the mail action:

    Sundeep_Malik_4-1664598497008.png

     

  • Verified answer
    pcpatter Profile Picture
    27 on at

    For the append to array variable step what do I put for "value"? I am guessing I am not choosing a correct option as I get this error

    Flow save failed with code 'WorkflowRunActionInputsInvalidProperty' and message 'The inputs of workflow run action 'Append_to_array_variable' of type 'AppendToArrayVariable' are not valid. Self reference is not supported when updating the value of variable 'A'.'.

  • Sundeep_Malik Profile Picture
    6,501 on at

    @pcpatter 

    Put the name of the item. 

  • pcpatter Profile Picture
    27 on at

    Ok thanks. I will try to figure this out. I am basically as beginner as you get so I don't understand what you mean by "name of item" as it is a full line from a spreadsheet. Would I put all the dynamic content for all the columns I want reported?

    I also don't know what should go in the parenthesis for the variable function. 

  • Sundeep_Malik Profile Picture
    6,501 on at

    @pcpatter 

    Actually directly I am not sure you will be able to get the array variable(not sure why)

    So, I just wrote

    variables('A')

    So, I wanted to ask you just want to notify yourself that this particular item has reached minimum quantity? So that's why I said just to send the name of the item.

  • pcpatter Profile Picture
    27 on at

    The output will be used to place an order so in a perfect world it would include some minimum amount of information from the sharepoint list. Namely the catalog #, description, actual quantity, minimum quantity. This would be all the information needed to place the order and know how many to order. 

  • Sundeep_Malik Profile Picture
    6,501 on at

    @pcpatter 

    Ok then try adding all the things in that append. See if you are getting the appropriate result. Otherwise make separate variables for each.

  • pcpatter Profile Picture
    27 on at

    I tried to run it but the email never comes in so I don't know where I am going wrong now unfortunately

  • Sundeep_Malik Profile Picture
    6,501 on at

    @pcpatter 

    Can you share your flow ss in edit mode?

  • pcpatter Profile Picture
    27 on at

    I showed my husband your workflow and he was able to get it to work see he better knows what should actually go in as inputs! Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard