Linking Zendesk and Medium One

This tutorial will show you how to link your Zendesk account to your Medium One account.  You will need a Zendesk Team Plan or higher.  This tutorial assumes you already have a Zendesk account and Medium One IoT Prototyping Sandbox [Buy-here].

Part 1: Create a trigger on Zendesk to send events to Medium One

Step 1: Create a Basic User and an API Key

On Medium One, navigate to “Manage Users” under “Setup.” The following menu will appear:

Click on Add User and choose a username and password for the user your Zendesk Information will come from.

Next, create an API key. Navigate to Manage API keys under Setup on the sidebar. Click add a new API key, and choose a name for it.

Once you hit save, you’ll see your API key.  It will have the same length as above.

Step 2: Create a Target on Zendesk

Log into your Zendesk admin account. Under the setup tab on the sidebar, click on Extensions at the very bottom.

Click Add Target, then click on HTTP Target.

Enter the information shown below, and click save. The link to post to is

Step 3: Create a Trigger on Zendesk

Under the Setup tab on the sidebar, click on Triggers under Business Rules.

In JSON Data, copy and paste the following, replacing the keys:

  • “medium_one_basic_user” with the basic user you created in Step 1
  • “medium_one_basic_user_password” with the password of the user created in Step 1
  • “medium_one_api_key” with the API key you created

For medium_one_env, replace with the environment you are working on; if you are using theMedium One sandbox, put “sandbox,” and if you are in a production environment use “prd.” If you put nothing it will default to sandbox.

Click save. Now, an event will be sent to your Medium One account every time a ticket is created.

Step 4: Create a ticket on Zendesk

Go to your Zendesk account and create a ticket. Include as much or as little information as you want; this is just a test ticket to make sure everything has been correctly configured. The add ticket button can be found on the top lefthand side.

Click “Save as New.” Then go back to your Medium One account. Under Config, click on Data Streams.

Select raw data stream and click “Edit.” You should see a list of new tags, all sent from Zendesk. Hit the checkbox next to all of them labeled “enabled” to use them in workflows. If there are no tags, there was a problem in the configuration. Go back through the previous steps to make sure nothing was missed.

Part 2: Link Zendesk API Credentials on Medium One

Step 1: Create an API key on Zendesk

Log into your Zendesk Administrative account. Under the Setup tab in the sidebar, click on “API” under Channels.

Make sure Token Access is enabled. Then click on the plus sign to create a new API key.

Enter a description and then copy the key shown below. Save this key for the next step. Click Save to finalize the creation of the key.

Step 2: Enter your Zendesk Credentials on Medium One

Log into your Medium One account. Click on the External APIs tab under Setup (You have to be logged in as a web administrator).

Click “Add a new service key.” Select Zendesk from the list, and enter:

  • Your Zendesk account’s URL.  i.e   Note: Be sure to include https:// in the url.
  • Your Zendesk admin email address.
  • The API key created in Step 1.

Click Save.

On the next page, you will see a new box for your new Zendesk Credential plus an ID. This is your credential ID.  Make sure to hold onto it because you’ll need it in the next part.

Part 3: Create a Workflow to respond to ticket creation

Go to your Workflow Studio and create a new workflow. Under the “Tags and Triggers” tab on the righthand side, go under raw and select ‘ticket_id.’ Drag and drop this box onto the Workflow Studio. Your workflow should look like this:

Next, click on the tab Modules from the righthand sidebar.  Under “Foundation,” drag and drop the box Base Python. Then drag the output node from the green raw.ticket_id box to the blue Python foundation node. Your workflow should look like this:

Double click on the Base Python box. Copy and paste the following into the box. Replace “Your Credential ID” with the credential ID you got from the previous part.

Click Save and Activate. What this workflow does is write a comment onto any new ticket created on Zendesk saying “Processed by Medium One.” Instead of this line, you can put in any information you want to automatically send back to Zendesk. To check if this was successful, create a test ticket in Zendesk the same way as in Part 2. Refresh the page, and see the message sent from the workflow to your Zendesk account.


How to create a Zendesk ticket from a workflow

To create a new Zendesk ticket, you’ll need this command in your workflow:

Comments are closed, but trackbacks and pingbacks are open.