cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Emailing a collection of records to different users

Hello All,

 

I hope this is the right sport for this. I am fairly new to power apps and I`m stuck on two things.

 

I have a scheduling APP I have built for my techs which is working good but I would like to add an email button to send to my PM's to check over there scheduled Jobs.

 

I can get this to work via the office365 connector but it is sending a email for each individual job to the PM... I would like to clean this up and have 1 email send to my PM's with the data of all there scheduled jobs.

 

I have had success and collecting the information but I'm not sure how to separate the items and match them to the PM's..  This is what I have so far.

 

In my APP I have a button that that kicks off a flow. The button creates a collections from a gallery and then it collects my information and sends it to the flow.

Button:
EmailPreLim-Dev'.Run(JSON(ColJobReady2,JSONFormat.IncludeBinaryData),SelectedDate,SelectedDate);
Clear(ColJobReady2)

 

This is my current flow:

legion1202_0-1604587653411.png

 

and below is my JSON format. The question that  I have is how do I separate all my items and then group them under each PM(Or is there a better way). I would imagine an array would be built for each PM.. Then once this is complete I would send a email to each PM email Address with the body of there array list only there jobs in the collection that was created from the button in power apps..

 

 

Thanks,

GA

 

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "Customer": {
                "type""string"
            },
            "Customer Engineer": {
                "type""string"
            },
            "Docs Needed": {
                "type""string"
            },
            "EST_StartDate": {
                "type""string"
            },
            "Job Notes": {},
            "Job Scope": {},
            "Job_Number": {
                "type""string"
            },
            "Job_Type": {
                "type""string"
            },
            "Location": {
                "type""string"
            },
            "Outage Status": {
                "type""string"
            },
            "PD_OfficersNeeded": {},
            "PD_Time": {},
            "PD_Town": {},
            "PD_XStreet": {},
            "PW": {
                "type""string"
            },
            "Police Detail": {},
            "Project Manager": {},
            "Scheduled_Time": {
                "type""string"
            },
            "Tech1": {
                "type""string"
            },
            "Tech10": {},
            "Tech11": {},
            "Tech12": {},
            "Tech2": {
                "type""string"
            },
            "Tech3": {},
            "Tech4": {},
            "Tech5": {},
            "Tech6": {},
            "Tech7": {},
            "Tech8": {},
            "Tech9": {},
            "Tools Needed": {}
        },
        "required": [
            "Job_Number"
        ]
    }
}
 
 
 
 
 

 

1 REPLY 1
Helper I
Helper I

Forgot to add... The second part to this question is once I get one email for each PM can I add approval works flows for each assigned job? Or is the approval work flow just for 1 email?

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (69,039)