URL link for Record ID and Table name in flow designer

shaik23
Tera Expert

Hi had a requirement where i need a generate URl and create a incident and add the URL into incident worknotes. I am sharing my requirement.

 

The Okta API will lock out the token if it is not utilized for 30 days. We want a schedule flow created that will run a basic Okta function. Create a system property that will hold the test ID we will use for the action

sys_properties entry

  • Name: okta_test_user_id

  • Description: User ID used in the Okta API Heartbeat Test flow to verify the Okta Token is valid

  • value: Lee@example.com

 

Flow scheduled to run every 25 days

  • Name : Okta API Heartbeat Test

  • Run AS: System Administrator

  1. Lookup user id held in system property

  2. Call action “Is User Account Locked” (input user id from previous step)

  3. If the step returns “invalid token”

    1. Generate URL

      1. Record ID: Current flow engine context ID

      2. Table Name: sys_flow_context

      3. Display: Flow Context Error Record

    2. create and Incident record assigned to the ServiceNow team

      1. Caller: ServiceNow Automation

      2. Channel: Event

      3. Assigned Group: ServiceNOW

      4. Category: Failure

      5. Configuration Item: ServiceNow (Business Service Class)

      6. Short Description: Okta Integration failed with Invalid Token

      7. Description: The Okta Integration Keep-alive flow has failed due to Invalid Token

      8. Urgency: 2

      9. Impact: 3

      10. Work Notes: “Review the Context Error Record and take appropriate action. The Token is most likely locked on the Okta Side.
        #'Code' output from the generate URL step noted above#”

 

Sharing my flow logic below

shaik23_0-1727357577880.png

shaik23_1-1727357666220.png

shaik23_2-1727357780968.pngshaik23_3-1727357797987.pngshaik23_4-1727357803624.png

 

shaik23_5-1727357819876.png

 

shaik23_6-1727357836478.png

 

In line number 4 i want to generate url with Record ID and table :sys_flow_context amd we have put the 2 fields in worknotes of incident as link.

As i am new i tried to best, Please check logic and assist me how to achieve this and i have not created any custiom action for this.

Thanks.

@Sandeep Rajput, @AshishKM 

 

 

 

1 REPLY 1

Viraj Hudlikar
Giga Sage

Have you tried to check flow run context that can help you what is output for step 4 & 5.
Is it expected one as per your requirement?