Use Flow Designer to list multiple records into an email

Tom136
Kilo Contributor

Not sure I put this in the right forum, but it's about managing the knowledge bases.

We're just not building our our KB and I want to utilize the Valid To date to make sure the content is fresh and still accurate. But I also want to setup a workflow to alert us for what content is expiring soon and have us review it before the valid to date.

I've got a flow setup in Flow Designer to check for KBs expiring this quarter, but I can't figure out how to get the short description of each record into a single email. I see where I could get a email for each KB.. but that would be a lot of emails.

Any help or any better way to do this would be much appreciated.

Thanks,

1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

Hi,

You could to this by temporarily storing the short descriptions in a Flow variable. Unfortunately Flow variables came in Quebec, so you'll need to upgrade first.

After looping through all short descriptions, adding them to a flow variable, you set the value of the Flow variable as part of the text message sent out with your email.

View solution in original post

14 REPLIES 14

Perfect!  I was missing the Set Flow Variable action, this makes much more sense now.  Thank you!

 

One more question for you:

One of the fields is a reference field and I need the display value, not the sys_id.  I tried this, but it doesn't work.  Do you know the correct syntax to get the display value? Is there documentation somewhere for flow designer scripting?  

return 'Product model: ' + fd_data._3__for_each.item.model.getDisplayValue() + '\n' + 'Part number: ' + fd_data._3__for_each.item.part_number;
 
Thanks!

 

Since you are dotwalking multiple levels down, you cannot use .getDisplayValue(), that will only work on a direct GlideRecord object.

In this case just continue to dotwalk to the field you want, for example:

fd_data._3__for_each.item.model.display_name.toString()

 

As to understanding scripting, I would recommend that you start by looking through the learning plans on the Developer site.

Or continue asking questions on the community.. 😉

Oh, how stupid of me!  I should have thought of that!

Thanks!

Brilliant! Thank you for this. Using this logic I was able to do the following (super fun stuff imo):

  • Trigger: Group deactivated
  • Append existing Group Description with a note for admins, "This group was deactivated on [date/time]. The following users were removed automatically."
  • Look up Group Member records and enter a ForEach loop on those
  • Append Group Description again (for each group member record found) that lists the current user's full name and user ID in the Description
  • Delete the sys_user_grmember record

This is cool stuff. 🙂 Thank you so much!