How do I trigger a flow when a new record is inserted in sc_req_item table?

LikeARabbit
Giga Expert

This is my first time building anything with Flow Designer so I wouldn't be surprised if I'm missing something obvious.

What I need to happen:

One of our catalog items is to kick off the onboarding process for new employees. In that catalog item we capture their personal email address. When a new RITM is created from that catalog item we need to send an email with an attachment (not attachment link) to that personal email address.

 

What I've done so far:

Stumbled across @Göran Lundqvist's awesome guide on building notifications with actual attachments using Flow Designer and his custom action. I have it working as expected except for the trigger. If I use the Service Catalog trigger I am able to pull the relevant variables from the RITM and send an email with an attachment

However, this trigger apparently only works if you call it directly from the catalog item. This catalog item is already using a lengthy workflow, I'd rather not have to rebuild the entire workflow as a flow just to send an attachment. 

If I use the record created trigger then I can't base it on the sc_req_item table.

The current flow:

find_real_file.png

My questions:

Is it possible to set up a trigger along the lines of "New record on sc_req_item WHERE item.name IS new contractor"?

Is it possible to call a flow from within a workflow? Similar to the create event action, where you simply put an action in place that calls the event / flow?

I can set a trigger to fire when a record is created on the sc_req table, is it possible to dot walk to the corresponding RITM variables from within the sc_req table?

 

This desired end result seems like something that would just exist out of the box, kinda surprised that it's proving to be an issue.

4 REPLIES 4

Kona LeDude
Kilo Guru

Flows used with the Service Catalog function very similarly to Workflows. With workflows, you create the workflow then associate it on the Catalog Item (sc_cat_item) in the "Workflow" field.

Since you've selected "Service Catalog" as your initial trigger, you'll be able to add this flow to the Catalog item itself in the "Flow" field.

Let me know if this helps!

Best,

 

LikeARabbit
Giga Expert

Thanks Kona, I figured that part out once I started testing the flow outside of Flow Designer. The catalog item that needs the notification already has a complex workflow in place, so I don't want to scrap the workflow and recreate it in Flow Designer.

Is there any other way to trigger the flow without calling it directly from the catalog item? (for sc_req_item table at least)

If the Flow is meant to run entirely separately from the complex Workflow process, you can trigger flows/subflows directly via script using the FlowAPI.

Tristan Elmore
Tera Expert

In case anyone is looking, you could use the Task table instead here. You'd probably want pretty tight filter conditions though

TristanElmore_0-1682521888002.png