How to trigger a Flow by an event?

Adam Robbins1
Mega Guru

Has anyone been able to get a Flow to trigger by an event (sysevent table)?  I was trying to trigger by a record insert on that table with the Name matching the event name, but the Flow was not triggered.

Thank you,

Adam Robbins

1 ACCEPTED SOLUTION

Adam Robbins1
Mega Guru

For anyone reading this post, please refer to some of the other replies marked helpful which may work for your particular scenario.  My specific use case was around Contract Management, so I didn't want to modify anything with the out of the box contract.expiration event.  I instead pointed to the Contract record and was able to get the Flow to trigger when the Expiration field changed.

View solution in original post

5 REPLIES 5

Dan H
Tera Guru

Hi @Adam Robbins 

 

I had an issue like this before, trying to use the EventQueue API to trigger a Flow, but it wasn't working. I found this knowledge article at that time, please take a look:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0960053

If you are using the eventQueue function inside a business rule, replace how the eventQueue record is created as seen in the article.

Hope that helps.

 

Please mark my answer as Correct/Helpful based on impact

Regards,

Dan H

 

Community Alums
Not applicable

HI @Adam Robbins ,

While using gs.eventQueue, setWorkflow is set to false so setWorkflow(false). You need to create a property that sets this value to true like so:

Name: trigger_engine.ignore.set_workflow

Type: True

Value: True

Having this setup allows for "Record" triggers for "Create", "Create/Update", "Updated" for events to actually trigger.

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Can you share your flow configuration?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Adam Robbins1
Mega Guru

In my case, I was trying to key off the event contract.expiration as part of contract management.  I have set up a test and will try pointing the Flow to look at the ast_contract record when the expiration field changes to see if that works.  Since contract.expiration is out of the box, I am trying to avoid any changes to that.