Send Email notification to certifiers using workflows

I have compared with your workflow small thing i have missed, for get identity i have given
$.hTTPRequest2.body instead of $.hTTPRequest2.body[0].id.
But still getting the same error: request failed. Below are the details i get when i run test workflow.
I have given the sample input with my campaign details, is it good to give original input and check or we can test with default sample input.
{
“authenticationType”: null,
“basicAuthPassword”: null,
“basicAuthUserName”: null,
“csvRequestBody”: null,
“formRequestBody”: null,
“headerAuthName”: null,
“headerAuthValue”: null,
“jsonRequestBody”: null,
“method”: “get”,
“oAuthClientId”: null,
“oAuthClientSecret”: null,
“oAuthCredentialLocation”: null,
“oAuthScope”: null,
“oAuthTokenUrl”: null,
“requestContentType”: null,
“requestHeaders”: {
“Authorization”: “Bearer access_Token”
},
“suppliedInlineExpression”: {
“requestHeaders”: “{"Authorization":"Bearer {{$.hTTPRequest2.body.access_token}}"}”
},
“textRequestBody”: null,
“url”: “https://tenantname.api.identitynow-demo.com/beta/certifications/campaignid/reviewers”,
“urlParams”: null
}

Just wondering why is URL missing inside suppliedInlineExpression

image

API HTTP Request.json (2.9 KB)

Here is the json File of my workflow. Can u check whether did i missed something?

I cannot find anything missing.

Can you try in Postman the URL from Get Reviewers step?

Tried in postman with following URL:

Used the below API URL to get the campaign id:
GET https://tenant.api.identitynow-demo.com/v3/campaigns?filters=name eq “testcert”
Below are the response i get in postman,

Used the campaign id as id:“12b662f8fe744eaca0b390436d246612” for below api call
GET https://tenant.api.identitynow-demo.com/v3/certifications/12b662f8fe744eaca0b390436d246612/reviewers
But getting 404 not found did i get the campaign id correctly?

Apparently, the ID you are using is of a campaign.

Get the certification ID from this API:
https://tenant.api.identitynow-demo.com/v3/certifications

If it works, you will have to add another httpRequest to get the certification ID using this API along with query filters=campaign.id eq "CAMPAIGNID"

Sorry I did not think through this earlier

1 Like

Hi @Santhakumar, just a suggestion, you can try to download the execution logs from the workflow to check for the error logs, eg: 403 forbidden, 404 not found error etc.

1 Like

Hi @sjoyee Yes i have seen the log I think is refuse to connect to the server, any idea how to resolve this?

I am actually getting the same error as well in my configuration and I suspect is due to this issue as discussed in this post:
API read scopes - 403 forbidden error - IdentityNow (IDN) / IDN Discussion and Questions - SailPoint Developer Community Forum

You can try to use personal access token (PAT) and see if it still hits the same error?

1 Like

It got resolved when i change the client id and client secret to PAT ID which has all scope!!!

1 Like

@iamology I got the reviewers successfully, Thanks a lot.
But this makes me a new question, if the cert have individual reviewers we can get the cert id and get the reviewers but when the manager campaign has more than one manager for reviewers, in this case how do u get the all certification id? I have attached the json file for this scenario.
Multiple Reviewers.json (10.6 KB)

@iamology I have given like this
GET https://tenant.api.identitynow-demo.com/v3/certifications/{{$.hTTPRequest3.body[*].id}}/reviewers

And i have given inside the loop its working fine but how to get the all email in send email action.
In the email body i have given like this $.loop.loopInput[*].email.

But it was bringing empty value. Any idea to get all emails of the reviewers.

Here are the steps:

  1. Authentication (no change from earlier config)
  2. Get Certification using query filters=campaign.id eq "CAMPAIGNIDFROMTRIGGER"
    campaign.id eq "{{$.trigger.campaign.id}}"
  3. Get reviewers (same as before, but use certification ID from previous request as path parameter {{$.hTTPRequest.body[0].id}})
  4. Enter a loop where input is response body of Get Reviewers
  5. Send Email inside loop where recipient address is $.loop.loopInput.email

This worked for me and I received the test email.

@iamology Thanks for the help. I got the test mail successfully.

But I need one more help to apply the below scenario:
Send Email notification to certifiers using workflows

In the solution u have given, How to do it? Whether i need to give the wait action inside the loop to send the email for 2,5,7 days repeatedly or which way i can do it?

Thanks,
Shantha Kumar

It might be a challenge achieving this with workflow. However, you may consider wait action to trigger Send email after certain days from Campaign Activated. Just need to check status of certification before sending email though.

We can use this inside the loop right?

Yes… May be you can create a chain of Wait/Send Emails for each periodical email to be sent

@iamology Thanks for the idea it worked!!! :+1: :+1:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.