Unable to insert record in group member table through flow designer

Toshu
Tera Contributor

I have a flow designer developed for AD integration with Servicenow through AD spoke

While trying to add user to group in Servicenow instance after adding the users to the AD group I am getting an error that says "Error occurred while inserting record : null"

I have referred to the KB article available but they do not provide a clear fix as expected

I have already referred to these KBs: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0827213

And related KBs to this error but unable to find a fix

 Below is the flow with error execution:

 

find_real_file.png

Actual flow logic:

find_real_file.png

Please let me know if you could find the issue?

 

21 REPLIES 21

Yes tried creating a subflow but no luck

Same error in that case swell

Aman Kumar S
Kilo Patron

Hey,

Few things to check here,

  1. Does the user and group exist in the SN tables?
  2. Make sure, we are passing "sys_ids"  for both user and group.
  3.  Check if Flow is running as system user

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Thankyou for your response Aman,

1. User and group both exists in table while trying to perform the same operation in another brach it works

2.We are passing sys_ids in the flow

3. Using system user while runtime

find_real_file.png

OlaN
Giga Sage
Giga Sage

Hi,

I would suggest that you remove your custom action (step 5), and instead do it in 2 separate steps, as follows:

- Look up records (sys_user or whatever record you are using as List collector value) where sysID is one of Step1->List collector values
- For each record found in above action, to a create record (your step 9 currently).

User332204
Kilo Guru

Hello, did you find a fix? My flow is similar to yours and has been working or 1.5 years. Suddenly 3 weeks ago it stopped working and I'm recieving the same error as you. 

find_real_file.png