Robot

Triggering Robocorp processes from Freshdesk

Walkthrough on creating an automation in Freshdesk that triggers a process in Robocorp.

Robocorp

Freshdesk's hugely popular customer service platform can be easily extended with the use of RPA robots. Robocorp's Control Room API allows triggering of the automated processes in various scenarios. This example demonstrates the required configuration in the Control Room and in Freshdesk to trigger a process based on various Freshdesk ticket actions. Example also includes a small robot that takes in the payload from Freshdesk, and demonstrates how to update priority and add notes to the ticket.

What you'll learn with this reference architecture

  • Configuring Freshdesk automation to trigger a process execution in Robocorp
  • Using python-freshdesk package to manipulate Freshdesk tickets in the robot

Set up the API key in Control Room

First create an API key in Control Room (unless you have one already made). It's found under API tab in your workspace. To trigger a process, you only need one checkbox selected as shown.

image

After that, the easiest way to find the rest of the details is by navigating to your process that should be triggered, and click API Helper from the top right corner of the page. It will open a sidebar that shows you all the relevant details you'll need to set things up in Freshdesk. Choose "Start process with a single work item payload" from the first dropdown, and then make sure you have the correct process and API key chosen. Leave this page open, and continue with Freshdesk.

FireShot Capture 181 - Solution Demos (STABLE) · Process - cloud robocorp com

Configuring the automation in Freshdesk

If you don't have your Freshdesk instance, you can create a free demo here that is valid for 21 days.

To create automation rules, navigate to Admin > Workflows > Automations and hit "Create a rule".

image

First you'll choose how the triggering happens, having three options:

  • Ticket creation
    • When a new ticket is created in Freshdesk
  • Time triggers
    • Scheduled triggers e.g. once every day. Can be used for various maintenance tasks
  • Ticket updates
    • When details like priority or status of a ticket changes

image

Next create the necessary filters under which conditions the triggering will happen. As an example in the screenshot, we have chosen the triggering to happen only when the ticket is created with a status Open.

image

Now it's time to set up the connection to Robocorp Control Room. Choose Trigger webhook from the first dropdown. Then choose POST as the Request Type.

For the URL, jump back to the Control Room API Helper, and copy paste the full URL all the way to the last question mark, but without quotes. It will look something like this (with Workspace ID and Process ID replaced with real values):

Then choose Add custom headers and configure the Authorization string. You can copy paste it mostly from the API Helper, but notice that you'll need to add curly braces and quotes to make it valid JSON. An example of a correctly formed header is here (worry not, I have already deleted the API key used in the example):

Then choose JSON for Encoding, and Simple for Content type. Last, you can choose the ticket values you want the process to receive as inputs. The values chosen here will end up in your input work item and will look like this:

image

After saving you are all done!

Writing data back to Freshdesk

The robot example included will take the payload sent by Freshdesk automation and write data back to the ticket. In real life, you would naturally have more tasks in the robot code. For example you could perform NLP tasks to the ticket content using Google API, or fetch additional data from legacy systems using web or desktop automation.

In order to use the robot, you'll need to configure a Vault called Freshdesk that contains two items: apikey that is found under your Freshdesk profile and domain that looks like yourownsubdomain.freshdesk.com.

image

NOTE! Api key determines in who's name robot is manipulating the tickets. The best practise is to create a separate user for the robot.

Then add the robot to control room, create a process and use that process in your Freshdesk automation. Voila, Robocorp RPA and Freshdesk now talks two ways!

Technical information

Last updated

15 September 2022

License

Apache License 2.0