How to Perform Workfront Event Subscription Using Microsoft Power Automate
Blog

How to Perform Workfront Event Subscription Through Microsoft Power Automate

By Somnath Saha  |  Published on July 26, 2022

How to Perform Workfront Event Subscription Through Microsoft Power Automate

Introduction:

Adobe Workfront, a project management software like Jira and Asana, is used for project planning, scenario comparison, and analysis. It can connect with software that we already use, for example Outlook, Slack, and Adobe Creative cloud.

Power Automate, a part of Microsoft’s Power Platform, is used to automate tasks that are to be performed based on specific events, time intervals, or when explicitly called using REST API.

The Challenge

How to Perform Workfront Event Subscription Through Microsoft Power Automate

We want to perform specific tasks using Power Automate when a project is created or updated in Workfront. Workfront provides a few methods to call APIs and create custom webhooks, but that requires an ‘Adobe Workfront Fusion license.’

List of requirements

Click on this link Workfront WebHooks Documentation to view the list of requirements.

The Solution

We used the subscription API of Workfront and used a postman to subscribe to a flow for every project’s create and update event

Step 1: Creating power automate flow with a HTTP trigger
How to Perform Workfront Event Subscription Through Microsoft Power Automate

When we use HTTP trigger, we get an endpoint URL that can be used to call the Power Automate flow. This is the flow that gets triggered when events occur in Workfront.

Step 2: Get API Key for authorization
Three things are required to create the subscription:
  • The API endpoint is provided by Workfront to which we send the subscription request. It looks like this:
  https://<HOSTNAME>/attask/eventsubscription/api/v1/subscriptions

Where HOSTNAME is your Workfront domain. Example:

https://rataalada.my.workfront.com/attask/eventsubscription/api/v1/ subscriptions
  • An endpoint that gets subscribed to Workfront. (Power Automate URL that we already got in the previous state).
  • An API Key that we need to generate for authorization.
    • How to generate API Key:
      • We need the ID and password of a user with the access level of System Administrator
      • Send a request to the following endpoint
https://<HOSTNAME>/attask/api/v7.0/USER?action=getApiKey&username=<USERNAME>&password=<PASSWORD>

HOSTNAME, USERNAME and PASSWORD are to be replaced with your hostname and the System Administrator’s username and password

With header:

Content-typeapplication/json
  • We will get an apiKey in a response that looks like this:
{
   "data": {
             "result": "rekxqndrw9783j4v79yhdsakl56bu1jn"
           }
}
Step 3: Create the subscription

We can create the subscription by making an API call from anywhere. In this instance, we used postman.

  • Add the following headers where “Authorization” is the apiKey that we just generated
{
Content-Type:  application/json
Accept:  application/json
Authorization:  rekxqndrw9783j4v79yhdsakl56bu1jn
}
  • In the request body you put the following info:
{
“objCode”: “PROJ”
“url”: “<here you put the power automate URL>”
“eventType”: “UPDATE”
}

objCode is the Workfront object you are subscribing to. If you subscribe to Assignments objCode would be “ASSGN”. Here we are subscribing to projects hence “PROJ”

eventType describes what sort of event would trigger the subscriber. We could select “CREATE”, “DELETE”, “UPDATE”, or “SHARE”.

  • The request is sent to the event subscription API
https://<HOSTNAME>/attask/eventsubscription/api/v1/subscriptions

And if the subscription is successful, we receive a repose with status 201

Once the subscription is created, the occurrence of the selected event would trigger the subscriber (in this case a Power Automate flow) with all the details about the latest changes as newState and the oldState.

For more references on the subject, click on the links below:

We hope you found this blog useful in learning how to perform specific tasks using Power Automate when a project is created or updated in Workfront. Please reach out to us so that we can put our year of experience in streamlining tasks and paperless processes with Power Automate and Power Platform to work for your organization’s Digital Transformation journey.

Leave a comment

Your email address will not be published. Required fields are marked *

Unravel The Complex
Stay Connected

Subscribe and receive the latest insights

Netwoven Inc. - Microsoft Solutions Partner

Get involved by tagging Netwoven experiences using our official hashtag #UnravelTheComplex