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:
Once the job has been built in the Talend Studio, the
resource_webhook_payload context parameter (lower case) is added with blank values:
The job is then easily published to Talend Integration Cloud from the repository:
The default settings can be used for Publish to Cloud:
Once the job is published as a flow to TIC, click the Open Job Flow link:
This will open the published flow. Click the Go Live icon, which will open Schedule options:
In the Schedule options, select Webhook. Complete the appropriate fields and click Go:
A message will appear which notifies the user to copy the Webhook URL from the Run Details or the Run Schedule:
The Webhook URL will follow the format of:
Using a tool such as Postman, the Webhook can be called using a POST method:
Finally, these calls will appear under the Run History for the flow with a Webhook icon: