A webhook is an HTTP call that is triggered by an event. You can use webhooks to activate instant trigger modules. Any application that is connected to the Internet and allows HTTP requests can send webhooks to Adobe Workfront Fusion.
You must have the following access to use the functionality in this article:
Adobe Workfront plan* | Pro or higher |
Adobe Workfront license* | Plan, Work |
Adobe 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 Adobe Workfront Plan, your organization must purchase Adobe Workfront Fusion as well as Adobe 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 Adobe Workfront Fusion as well as Adobe 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 Adobe Workfront Fusion licenses, see Adobe Workfront Fusion licenses
To call a third party webhook (an outgoing webhook) use one of the HTTP modules. For more information, see HTTP modules.
To use a webhook to connect an app to Workfront Fusion:
Add the Webhooks >Custom Webhook instant trigger module to your scenario.
Click Add next to the Webhook field and enter a name for the new webhook.
(Optional) Click Advanced Settings.
In the IP restrictions field, enter a comma-separated list of the IP addresses that the module can accept data from.
Click Save
After you create a webhook, a unique URL displays. This is the address where the webhook sends data. Workfront Fusion validates the data sent to this address, then passes it on for processing in the scenario.
Once you create a webhook, you can use it in more than one scenario at a time.
In order to recognize the data structure of the incoming payload, Workfront Fusion parses sample data that you send to the displayed address. You can supply the sample data by making a change in the service or app that will make that service or app call the webhook. For example, you could remove a file.
Or you can follow the steps below to send the sample data via the HTTP > Make a request module.
Create a new scenario with the HTTP > Make a request module
Configure the module with the following values:
URL |
Enter the URL of the webhook. You can find this URL in the Webhooks module that you have used to set up the webhook. |
Method | POST |
Body type | Raw |
Content type | JSON (application/json) |
Request content | Raw JSON expected in the webhook |
Open the scenario with the Webhooks module in a separate browser tab or window.
In the webhooks module, click Redetermine data structure.
You do not need to unlink other modules from the webhooks module.
Switch to the scenario with the HTTP module and run it.
Switch back to the scenario with the Webhooks module.
A “Successfully determined” message means that the module has successfully determined the data structure.
Click OK to save the data structure.
The webhook’s items are now available in the mapping panel for use with subsequent modules in the scenario.
If a webhook receives data and there is not an active scenario that is expecting that data, the data is stored in the queue. Once you activate the scenario, it processes all bundles waiting in the queue sequentially.
Webhook queues are shared among scenarios that employ the same webhook. If one of the scenarios is disabled, all incoming data is held in the queue.
Workfront Fusion supports 3 incoming data formats: Query String, Form Data and JSON.
Workfront Fusion validates all incoming data against the selected data structure. Then, depending on the scenario’s settings, the data is either stored in the queue for processing, or it is processed immediately.
If any part of the data does not pass the validation, Workfront Fusion returns a 400 HTTP status code and specifies, in the body of the HTTP response, the reason why the incoming data failed the validation checks. If the validation of the incoming data succeeds, Workfront Fusion returns a “200 Accepted” status.
GET https://app.workfrontfusion.com/wh/<yourunique32characterslongstring>?name=<yourname>&job=automate
POST https://app.workfrontfusion.com/wh/<yourunique32characterslongstring>
Content-Type: application/x-www-form-urlencoded
name=<yourname>&job=automate
POST https://app.workfrontfusion.com/wh/<yourunique32characterslongstring>
Content-Type: multipart/form-data; boundary=---generatedboundary
---generatedboundary
Content-Disposition: form-data; name="file"; filename="file.txt"
Content-Type: text/plain
Content of file.txt
---generatedboundary
Content-Disposition: form-data; name="name"
Workfront Fusion
---generatedboundary
In order to receive files encoded with multipart/form-data
, you must configure a data structure with a collection
type field that contains the nested fields name
, mime
, and data
. The field name
is a text
type and contains the name of the uploaded file. The mime
is a text
type and contains a file in MIME format. The field data
is a buffer
type and contains binary data for the file being transferred.
For more information on MIME format, see MIME modules.
POST https://app.workfrontfusion.com/wh/<yourunique32characterslongstring>
Content-Type: application/json
{"name": "Workfront Fusion", "job": "automate"}
If you want to access the original JSON, enable JSON pass-through when setting up the webhook.
To access the webhook’s headers, enable Get request headers when setting up the webhook.
You can extract a particular header value with the combination of map()
and get()
functions.
Example:
The example below shows a formula that extracts the value of the authorization
header from the Headers[]
array. The formula is used in a filter that compares the extracted value with the given text to pass only webhooks if there is a match.
For further information on obtaining an array’s element with a given key, see Map an array’s element with a given key in the article Map information from one module to another in Adobe Workfront Fusion.
The default response to a webhook call is the text “Accepted”. The response is returned to the app that called the webhook during the execution of the Custom Webhook module.
Include the Custom Webhook module in your scenario.
Add a new webhook to the module.
Copy the webhook URL to your clipboard.
Run the scenario.
The lightning icon on the Custom Webhook module changes to spinning dots. This shows that the module is now waiting for the webhook call.
Open a new browser window, paste the copied URL in the address bar and press Enter.
The Custom Webhook module is triggered and the browser will display a new page.
If you want to customize the webhook’s response, employ the module Webhook Response.
The configuration of the module contains two fields: Status and Body.
The Status field contains HTTP response status codes such as 2xx for Success (for example, 200
for OK), 3xx for Redirection (for example, 307
for Temporary Redirect), 4xx for Client errors (for example, 400
for Bad Request), and so on.
The Body field contains anything that will be accepted by the webhook’s call. It can be simple text, HTML, XML, JSON, and so on.
We recommend setting the Content-Type
header to the corresponding MIME type: text/plain
for plain text, text/html
for HTML, application/json
for JSON, application/xml
for XML, and so on. For more information on MIME types, see MIME modules.
Timeout for sending a response is 40 seconds. If the response is not available within that period, Workfront Fusion returns a ‘200 Accepted’ status.
Example:
Configure the Webhook Response module as follows:
Status | 2xx success HTTP status code, e.g. 200 |
Body | HTML code |
Custom headers |
|
This will produce an HTML response that displays in a web browser:
Example: Configure the Webhook Response module as follows:
Status | 3xx redirection HTTP status code, e.g. 303 |
Custom headers |
|
Webhooks are deactivated automatically if either of the following applies:
Deactivated webhooks are deleted and unregistered automatically if they are not connected to any scenarios and have been in deactivated status for over 30 days.
If some items are missing in the mapping panel in the setup of the modules following the Webhooks > Custom Webhook module, click on the Webhooks > Custom Webhook module to open its setup and click Re-determine data structure:
Then follow the steps described in the section Configure the webhook’s data structure in this article.