Starting Flows Using Webhooks

This post will demonstrate the easy use of Webhooks within Talend Integration Cloud (TIC) which allows flows to be started automatically by an external source such as a third party scheduler.

Notice: As of Winter ’17, the recommended approach to starting or terminating flows is using the Talend Integration Cloud Public API.

Webhooks inside TIC allow flows to be scheduled through an external URL. For a flow to be Webhook enabled, the start action or flow in TIC must be built with a webhook context parameter. For this example flow, a job will be created in Talend Studio which copies files between AWS S3 buckets:

Talend Integration Cloud Webhook Studio Job

Once the job has been built in the Talend Studio, the resource_webhook_payload context parameter (lower case) is added with blank values:

Talend Integration Cloud Webhook Context Parameters

The job is then easily published to Talend Integration Cloud from the repository:

Talend Integration Cloud Webhook Job Publish Menu

The default settings can be used for Publish to Cloud:

Talend Integration Cloud Webhook Job Publish Window

Once the job is published as a flow to TIC, click the Open Job Flow link:

Talend Integration Cloud Webhook Job Publish Success

This will open the published flow. Click the Go Live icon, which will open Schedule options:

Talend Integration Cloud Webhook Flow Go Live

In the Schedule options, select Webhook. Complete the appropriate fields and click Go:

Talend Integration Cloud Webhook Flow Schedule Options

A message will appear which notifies the user to copy the Webhook URL from the Run Details or the Run Schedule:

Talend Integration Cloud Webhook Flow Scheduled Success

Talend Integration Cloud Webhook Flow Scheduled

The Webhook URL will follow the format of:

Using a tool such as Postman, the Webhook can be called using a POST method:

Talend Integration Cloud Webhook Postman

Finally, these calls will appear under the Run History for the flow with a Webhook icon:

Talend Integration Cloud Webhook Flow Run History

Leave a Reply

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

%d bloggers like this: