With your service desk being the center of operations amidst multiple tools used in your organization, integrating your service desk seamlessly with your ecosystem would be vital. With Web Request nodes, we now have the ability to integrate with all kinds of 3rd party systems, including the ones which you cannot integrate with from our orchestration center.
What are Web Request Nodes?
Web Request node allows you to fire off an API request from the Workflow Automator to any 3rd party system that uses REST APIs.
You can also reference the status code returned from the request in subsequent condition nodes to branch out based on the success or failure of the request.
WebRequest vs Webhook
Authentication Types
To access private endpoints via the Webrequest nodes, please whitelist the below IP's to bypass the firewall restrictions and ensure only trusted requests can be processed.
Below is the list of domains to be whitelisted for Onprem- Orchestration server wrt to regions.
Let’s look at an example and see how the Web Request node can be used in the workflow.
Sample Usecase
In this example, we’ll invoke a Web Request to generate a strong temporary password for a Password Reset service request.
Step 1
Select Ticket is raised in the Event block and choose the Service item for Password Reset in the Condition block.
Drag and drop the Web Request node into the canvas to trigger a Custom API request and set the Authentication Type as No Auth.
Note: We can route the requests to on-premise networks with the help of the Orchestration Server.
Step 2
The status code can be checked for a 2XX response in the condition block to ensure that this request is successful.
Step 3
Test the Web Request action and copy the sample response body to the clipboard.
Step 4
Drag and drop the JSON Parser node onto the canvas.
Step 5
Map the Source to the output of the Web Node Request.
Step 6
Paste the sample response body into the Payload section and hit the Generate Output button to automatically create the outputs based on the schema of the payload input.
Step 7
To perform actions on Microsoft AD, drag and drop the app node to the canvas and execute the Reset Password action from Microsoft AD.
Use the respective Custom user field placeholder (SamAccountName) across the name payload. The new password can be fetched from the outputs defined in the Parser fields.
Tip: You can use the Discovery Probe to sync your SamAccountName with a Custom User field in Freshservice.
Step 8
Finally, Unlock the account and send an email to the requester with the new password.
You can set up much more with WebRequest nodes.
Invoke WebRequest node to fetch ticket details and perform actions based on it.
Faq:
1. How to create new ticket whenever someone replies /adds a public note to a closed ticket ?
To create a new automation to create a ticket, follow these steps:
- Navigate to Global Settings or the specific Workspace Admin.
- Go to Workflow Automator and click on New Workflow.
- Set the Event to trigger when a reply is sent.
- Add a Condition node to check if the status is Closed or Resolved (or adjust the status based on your use case).
- Drag and drop a Web Request node and configure it to use a POST call.
- Use the following link to create a ticket via API:
https://api.freshservice.com/v2/#create_ticket
. - The API URL should look like this:
your_domain.freshservice.com/api/v2/tickets
. - For authentication, use Basic Auth with an admin API key as the username, and any single-letter alphabet (e.g., 'a', 'x') as the password.
- Ensure that all mandatory fields are included in the body of the request. If you do not require the existing ticket to be reopened, kindly disable the workflow responsible for reopening tickets. You can identify the specific workflow by checking the ticket activities to see which one is being executed for reopening the ticket.