Home > Forum > Processes > Automated email for inactive users

Automated email for inactive users
0

Hi,
we have created a data dictionary with people picker field. This people picker field has few team member names.
I need to setup a process to check the dictionary everyday if there inactive users. If inactive users found, send email notification to Admins.
Please suggest the best way.

Thank you

MVP

Hi kaluser,

this would be my approach:
You have some data which needs to be processed and something will happen. So you have process. :)
Step 1: Collect the data from the dictionary in an item list
Step 2: Populate another column with the active/inactive information
Step 3: Send the mail

This workflow would be started via a cycling action every day.
Each Step would have a timeout action, which sends the workflow to the next step.

This way you can start and test the functionality on demand and rely on build in mechanism to do it unattended.
You could send yourself a mail, if something goes wrong during the path transition in the timeout. Depending on your situation you can also add a cyclical action, to delete old "monitoring" workflows after 30 /60 days.

Cyclical actions: https://community.webcon.com/posts/post/cyclical-actions/106


I'm using this approach in multiple situations. It may be slower than it could be, but this way it's far easier to debug and is more transparent if someone needs an information why it didn't work. :)

Perhaps I should write a blog post about this in the near future. :)

Best regards,
Daniel

MVP
In reply to: Webcon_kaluser

Does these steps need a separate workflow?
In the Item list, What type of columns are needed? Can I have below columns:
For Channel Owners can I have Autocomplete Choice field or Choice field picker
To get Active and inactive, may I have single line text

Hi kaluser,

maybe I've misunderstood you.
I understood that there's a workflow in which users are selected and you need to check and act accordingly.

This check would be done on a daily basis using a new workflow.

Maybe some screenshots would help to understand it better.


Best regards,
Daniel

In reply to: Daniel Krüger (Cosmo Consult)

Hi kaluser,

maybe I've misunderstood you.
I understood that there's a workflow in which users are selected and you need to check and act accordingly.

This check would be done on a daily basis using a new workflow.

Maybe some screenshots would help to understand it better.


Best regards,
Daniel

We have a flow with all different steps. This flow has an item list and it has the required information from the Data dictionary. I think I can use them but due to all different steps exists in this flow, I thought of creating a simple 2 step flow in the same process and use that item list.

In reply to: Webcon_kaluser

We have a flow with all different steps. This flow has an item list and it has the required information from the Data dictionary. I think I can use them but due to all different steps exists in this flow, I thought of creating a simple 2 step flow in the same process and use that item list.

Daniel,
Thank you soo much for the helpful info.
I have created a 2 step flow(attached the pic) and using the existing item list with 2 additional new columns Name_inactiveuser, Count_inactive user. This item list has channel name, Channel cache( all the team members part of the channel), Name_inactiveuser, Count_inactive user.
I have used below query to pull loginID and Count(*) seperately and populating Name_inactiveuser, Count_inactive data row type form fields.

Select Count(*) from (
select
pn as ID,
s as BPS_Format,
dbo.ClearWFElem(s) as DisplayName,
dbo.ClearWFElemID(s) as Login
from Split(';', 'teammemberlist{text}')
) as P
Where P.Login not in ( Select cos_bpsID from CacheOrganizationStructure)

Is it the correct approach?

In reply to: Daniel Krüger (Cosmo Consult)

Hi kaluser,

from what I can tell this looks good and since it’s a separate workflow you can easily test it.

Once it works the only thing left is to create a scheduled execution.
I would add a new path on Registration step. Which only saves the workflow instance. In addition a timeout would be added which immediately triggers the real path. This could fail for some unexpected reasons without you knowing it. I would mitigate this risk by adding another path which sends a Mail to you/some other admin, so that they can check it.

Best regards,
Daniel

Thanks Daniel.
The following 2 form fields are showing data on the form(see sc1 screenshot) :Name_inactive user (Field type: Data row, Db column: DET_Select1), Inactive user( field type: Multiline, Db column: DET_LongText4) But when I tried to pull data using the below query from the content db to setup a cyclical action based on the query result, it is displaying null for in the DET_LongText4 column :

Select DET_LongText4, DET_LongText2 ,* from WFElementDetails
where DET_WFCONID='419'
AND DET_WFDID='4041'

Not sure why DET_LongText4 column is showing NULL but displaying data on the form.
I can't find DET_Select1 column in the table at all.

MVP
In reply to: Webcon_kaluser

Thanks Daniel.
The following 2 form fields are showing data on the form(see sc1 screenshot) :Name_inactive user (Field type: Data row, Db column: DET_Select1), Inactive user( field type: Multiline, Db column: DET_LongText4) But when I tried to pull data using the below query from the content db to setup a cyclical action based on the query result, it is displaying null for in the DET_LongText4 column :

Select DET_LongText4, DET_LongText2 ,* from WFElementDetails
where DET_WFCONID='419'
AND DET_WFDID='4041'

Not sure why DET_LongText4 column is showing NULL but displaying data on the form.
I can't find DET_Select1 column in the table at all.

Hi kaluser,

I should have added an image of my suggestion earlier and sorry for repeating myself
The cyclical action only starts the "monitoring" workflow (1).
On each step there's a timeout which executes triggers a path transition (2).

I prefer to do more steps, so that each step does one thing. This way I can easily verify the retrieved/modified data and I don't need to take care of any unexpected behaviors inside the cyclical action. :)

Regarding your two questions:
You should check the database columns again. In my case all choice picker fields are stored in DET_Attxx columns.
Maybe you have the wrong column for LongText4, too.

Best regards,
Daniel