۶Ƶ

Connect ۶Ƶ Workfront Fusion to a web service that uses API token authorization

Some services do not allow integration solutions such as ۶Ƶ Workfront Fusion to create an app that you can easily use in your scenario.

There is a workaround to this situation. You can connect the desired service (app) to Workfront Fusion using Workfront Fusion’s HTTP module.

This article explains how to connect almost any web service to Workfront Fusion using an API Key/API token.

Access requirements

You must have the following access to use the functionality in this article:

۶Ƶ Workfront plan*
Pro or higher
۶Ƶ Workfront license*
Plan, Work
۶Ƶ Workfront Fusion license**

Current license requirement: No Workfront Fusion license requirement.

Or

Legacy license requirement: Workfront Fusion for Work Automation and Integration

Product

Current product requirement: If you have the Select or Prime ۶Ƶ Workfront Plan, your organization must purchase ۶Ƶ Workfront Fusion as well as ۶Ƶ Workfront to use functionality described in this article. Workfront Fusion is included in the Ultimate Workfront plan.

Or

Legacy product requirement: Your organization must purchase ۶Ƶ Workfront Fusion as well as ۶Ƶ Workfront to use functionality described in this article.

To find out what plan, license type, or access you have, contact your Workfront administrator.

For information on ۶Ƶ Workfront Fusion licenses, see ۶Ƶ Workfront Fusion licenses.

Connect to a web service that uses an API token

The procedure of connecting the service via an API token is similar for most web services.

  1. Create an application on the web service’s website, as explained in the section Create a new application and obtain the API token in this article.
  2. Obtain the API Key or API token.
  3. Add Workfront Fusion’s HTTP > Make a Request module to your scenario.
  4. Set up the module according to the web service’s API documentation and running the scenario, as explained in the section Set up the HTTP module in this article.
NOTE
We will use the Pushover notification service as an example throughout this article.

Create a new application and obtain the API token

NOTE
There are many different ways that web services create and distribute API keys or API tokens. For instructions on obtaining an API key and token for your desired web service, go to the service’s website and search for “API key” or “API token.”
We are including instructions for obtaining a Pushover API key only as an example of what you might find.
  1. Log in to your Pushover account.
  2. Click Create an Application/API Token at the bottom of the page.
  3. Fill in the Application Information and click Create an Application.
  4. Store the provided API token in a safe place. You will need it for the Workfront Fusion HTTP >Make a Request module to connect to the desired web service (Pushover, in this case).

Set up the HTTP module

To connect a web service to your Workfront Fusion scenario, you need to use the HTTP >Make a request module in the scenario and set up the module according to the web service’s API documentation.

  1. Add the HTTP >Make a Request module to your scenario.

  2. To push a message using Workfront Fusion, set up the HTTP module as follows.

    note note
    NOTE
    These module settings correspond to the Pushover web service API documentation. Settings may be different for other web services. For example, the API token may be inserted to the Header and not to the Body field.
    table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 layout-auto html-authored no-header
    URL

    https://api.pushover.net/1/messages.json

    The URL field contains the endpoint that you can find in the web service's API documentation.

    Method

    POST

    The used method depends on the corresponding endpoint. The Pushover endpoint for pushing messages uses the POST method.

    Headers Some web services may use Headers to specify the API token authentication or other parameters. This is not the case in our example as the Pushover's endpoint for pushing messages uses Body (see below) for all request types.
    Query String Some web services may use a Query String to specify other parameters. This is not the case in our example as the Pushover web service uses Body (see below) for all request types.
    Body Type

    Raw

    This setting allows you to select the JSON content type in the Content Type field below.

    Content Type

    JSON (application/json)

    JSON is the required content type by the Pushover app. This may differ from other web services.

    Request Content

    Enter the Body request content in the JSON format. You can use the JSON > Create JSON module as explained in JSON Body Mapped Using the JSON > Create JSON module in this article. Or you can enter the JSON content manually, as explained in JSON Body Entered Manually in this article.

    See the web service's API documentation for the required parameters for that web service.

JSON Body Entered Manually

Specify parameters and values in the JSON format.

INFO
Example:
code language-none
{"user":"12345c2ecu1hq42ypqzhswbyam34",
"token":"123459evz8aepwtxydndydgyumbfx",
"message":"Hello World!",
"title":"The Push Notification"}
user
Your USER_KEY. This can be found in your Pushover dashboard.
token
Your API token/API Key that was generated you created your Pushover app.
message
The text content of the push notification that is sent to the device(s).
title
(Optional) Your message's title. If no value is entered, your app's name is used.

JSON Body Mapped Using the JSON >Create JSON module

The Create JSON module makes the specifying JSON easier. It also gives you the possibility to define values dynamically.

For more information about the JSON modules, see JSON modules.

  1. Enter or map the values you want to create JSON from.

  2. Connect the JSON > Create JSON module to the HTTP > Make a Request module.

  3. Map the JSON string from the Create JSON module to the Request content field in the HTTP >Make a Request module.

    Now when you run the scenario, the push notification is sent to the device that has been registered in your Pushover account.

recommendation-more-help
5f00cc6b-2202-40d6-bcd0-3ee0c2316b43