Defining a Webhook parameter in Talend Studio - Cloud

Talend Cloud API Services Platform Studio User Guide

author
Talend Documentation Team
EnrichVersion
Cloud
EnrichProdName
Talend Cloud
task
Design and Development
EnrichPlatform
Talend Management Console
Talend Studio
You can define a webhook context parameter in a Job to allow the web user to generate unique URLs of tasks from Talend Cloud Management Console. These URLs allow external applications (Salesforce, Box, Dropbox and so on) to trigger the execution of a task on any data change.

Before you begin

  • The Job is open in the Studio and the Contexts tab below the design workspace is selected.

About this task

As an example, we have a Job that retrieves contacts from Salesforce. We want to trigger the execution of the task every time the Salesforce contacts are updated.

Procedure

  1. In the Studio workspace, click the Contexts tab.

    If the Contexts tab does not show in the Studio, click Window > Show view > Talend, and select Contexts.

  2. Click the [+] button at the bottom of the Contexts view to add a line in the table.
  3. Define the webhook context parameter following the pattern resource_webhook_payload, all in lower case.
  4. Set the type of the parameter to String.
  5. Enter the value for the webhook parameter.
    Webhooks must be defined in a JSON format, where:
    • type: media type of the payload taken from Content-Type header, for example, application/json.
    • data: payload data
    The following payload types are supported:
    • application/xml
    • application/json
    • text/plain
    • text/xml
    [ { "type": "text/plain", "data": "Some Data" }, { "type": "application/xml", "data": "<SomeXml/>" } ]
  6. Right-click the Job in the Repository tree view and select Publish to Cloud.