Daily Gift Digest based on fund

Options

I have been spending a lot of time trying to figure this out, but now it's time to ask the community. I'll also ask at the next Power Automate user group.

Goal: Send daily gift digest to Executive Director based on Fund

I'm using the flow from Trevor Kelly with the Fund description string from the accelerator video.

Question: Do I use a Switch Control, Filter Array, etc. And then where do I insert it? And how to create the flow most efficiently?

Please guide me to a sample flow that might address my goal (I feel like I have tried every sample provided :-) )

Here is a screenshot of the “yes” after the control.

Thank you community!

4c4aba0d8e1c85e3e53de92b188c7174-huge-im

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Sarah Homan
    Not sure what you mean by your goal

    Goal: Send daily gift digest to Executive Director based on Fund

    in many of the power automate template, there are fund information added to the email, are you having trouble getting fund info into the email that you need help on? or is it something else?

  • Austen Brown
    Austen Brown Community All-Star
    Ninth Anniversary 1,500 Likes 1000 Comments Name Dropper

    @Sarah Homan - Can you export a copy of your flow and share the zip file here? It'll be easier to see what you're doing and better advise you on how to accomplish your task.

  • @Alex Wong, I can isolate the fund, but how do I use it to send it to the correct Executive Director? Fund1 digest (HTML Table) goes to ED1, and Fund2 digest goes to ED2. I thought I could use a Switch but that wasn't working properly. Or maybe I inserted it in the wrong step.

  • @Austen Brown I have attached a copy of the export. This is the version that sends the complete digest. I want to send separate emails with the digest based on the fund. Thank you

    ExecutiveDigest_20240415195546.zip

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Sarah Homan
    I'm going to assume you do not use split gift (if yes, you will have to determine if how to handle if a gift is split between 2 funds for 2 different executive director.)

    first, let's fix a unneccessary “for each”. Drag and move the Add to digest variable action outside of the For each action and then delete the For each action

    ecf3122cd6303c44088be855bd131413-huge-im

    delete the Create HTML table action (since you will be creating a new table that is used for each email to each ED.) and delete the Cleaned up table action.

    then outside of your For each gift returned from last week gift list action, you will use a Filter array action to filter the GiftDigest array for specific fund to specific ED, create the html table based on that filtered array (conditioning on there IS gift with the fund), and send the email to the specific ED using the html table created from the filtered array. one example below:

    c5b9b645ebac8f54db0fc9fbf1471b82-huge-im

    The use of “Scope” allows you to copy the Scope and then paste the Scope with everything in it for your Fund2, then Fund3, etc.

    2a1c71251c09c0fb3e433df7c943fe18-huge-im
    You will not be able to select Fund(s) from dynamic content, you need to type in the expression of item()?['Fund(s)']
    5d6397213cf27f5378d74aa0a1983141-huge-im
    length(body('Filter_Array_Fund1'))
    fb24ff8466f43249c3f6e823f1192f51-huge-im
    01e41f23e308e961ad8c824522f94f69-huge-im
    @{outputs('CSS_for_table')}
    @{replace(replace(body('Create_HTML_Table_Fund1'), '&lt;', '<'), '&gt;', '>')}
  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Sarah Homan
    IF you have a few (i.e. 3) Fund to ED, then that's just 3 Scopes of the 3 Funds and 3 ED emails.

    If you have a lot, you can create a JSON array of the Fund name and ED email and loop through the “Scope” section, using the Fund and ED email from the JSON array:

    [
    {
    "Fund Name": "Fund1",
    "ED Email": "ed1@yourorg.org"
    },
    {
    "Fund Name": "Fund2",
    "ED Email": "ed2@yourorg.org"
    },
    {
    "Fund Name": "Fund THREE",
    "ED Email": "ed.three@yourorg.org"
    }
    ]

    As discussed in the user group, other options include adding the ED email into Fund Attribute (that you will have to add to your flow to get fund attribute, filter array by the fund category, etc)

    or use SharePoint List, or Excel Table save in SharePoint.

  • @Sarah Homan Can you post your updated flow from today's meeting? Thanks.

Categories