Trigger a Pulse-IT workflow from Aspera Faspex

Modified on Wed, 13 Nov at 6:58 PM

Lastest tested and confirmed version: IBM Aspera Faspex 5.0


Aspera Faspex can be configured to send a webhook to Pulse-IT when a package has been delivered and is complete.


At the time of writing the limited documentation on Aspera Faspex side is located here: https://www.ibm.com/docs/en/aspera-faspex/5.0?topic=configuration-configuring-package-processing-webhooks



Step 1: Workflow

A workflow should be created on Pulse-IT and the webhook URL extracted from the Start task. 

The URL would look like: http(s)://server_address/workflow_template/webapi/...


Step 2: API User

A dedicated API user should be created in Pulse-IT. 

This user should have a strong password.

This API user should be able to start the created previously workflow. 


Step 3: Build the URL

A trigger URL should be built as follow:

http(s)://api_user:api_password@server_address/workflow_template/webapi/...


This URL should be tested and validated in Postman or similar tool before continuing. 


According to recent tests, if SSL is activated and the URL in h, Pulse-IT should have a proper certificate, not self-signed.


Step 4: Faspex

A new Package Processing trigger should be created in Faspex interface under Admin > Package processing > Create new webhook.



Complex filters on Aspera Faspex side can also be setup.


The webhook payload should look like: 


{
"faspex_pkg_directory":"/package test - 61ae5292-d8ef-496e-8b15-8cdc0379fc4a.aspera-package/PKG - package test",
"faspex_pkg_name":"Test files",
"faspex_pkg_note":"",
"faspex_pkg_id":506,
"faspex_pkg_delivery_id":506,
"faspex_recipient_list":"aspera-recipient-test@ibm.com",
"faspex_recipient_count":1,
"faspex_sender_id":30,
"faspex_sender_name":"aspera-sender-test@ibm.com",
"faspex_sender_email":"aspera-sender-test@ibm.com",
"faspex_pkg_total_bytes":4633,
"faspex_pkg_total_files":1,
"faspex_pkg_uuid":"61ae5299-d8ea-496e-8b15-8cdc0379fc4a",
"faspex_metadata_fields": "{\"_pkg_uuid\":\"61ae5292-d8ef-496e-8b15-8cdc0379fc4a\",\"_pkg_name\":\"Test files\",\"_created_utc\":\"2022-1209T17:47:03.545Z\"}",
"faspex_recipient_0":"aspera-sender-test@ibm.com"
}


Custom payload fields can be found in the faspex_metadata_fields field. 


Step 5: Payload

The fields from the payload are now available in the workflow Pulse-IT as context values. 


Depending on your Pulse-IT version, you might need to do the following conversion to be able to access a _my_custom_source field in the faspex_metadata_fields


import json
faspex_metadata_fields = json.loads(faspex_metadata_fields)
custom_source = faspex_metadata_fields["_my_custom_source"]

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article