Skip To Content

Create jobs with webhooks

License:

This functionality requires a license for the ArcGIS Workflow Manager Server Advanced role.

Webhooks allow applications to send information to other applications and services when a specific action or event occurs. ArcGIS Workflow Manager acts as the receiver of the webhook payload and allows you to process information from an incoming webhook to automatically create a job from the specified job template. You can also save the payload of the incoming webhook as a file and attach it to the job, and configure custom output values that can be used throughout the job.

Create an incoming webhook

Complete these steps to create an incoming webhook:

  1. Access the Workflow Manager web app.
  2. Click the Design tab.

    The Design page appears.

    Note:

    If you don't have sufficient privileges, the Design tab is not available.

  3. Click Job Templates Job Templates.

    The Job Templates panel appears.

  4. Choose the job template for which you want to create an incoming webhook.

    The job template appears in the panel.

  5. Click the Automated Actions tab.

    If you don't have a license for the ArcGIS Workflow Manager Server Advanced role or sufficient privileges, you can't configure automated actions.

  6. In the Webhook Job Creation section, click Add Webhook.

    The Create Webhook dialog box appears.

  7. Provide a name for the webhook in the Name text box.
  8. Provide a username and a password in the Username and Password text boxes to create credentials for the incoming webhook.

    You can also use an ArcGIS Arcade expression in the Username and Password text boxes to dynamically populate these values using encrypted user-defined settings.

    Caution:

    Information that you provide in the Username and Password text boxes is not encrypted. It is recommended that you create encrypted user-defined settings to securely store webhook credentials.

    Tip:

    Click the This input supports Arcade Expressions button This input supports Arcade expressions and choose an ArcGIS Arcade expression to add it to its associated text box.

  9. Optionally, turn on Fallback Username and Password and provide a backup set of credentials in the Fallback Username and Fallback Password text boxes.

    You can also use an ArcGIS Arcade expression in the Username and Password text boxes to dynamically populate these values using encrypted user-defined settings.

    Caution:

    Information that you provide in the Fallback Username and Fallback Password text boxes is not encrypted. It is recommended that you create encrypted user-defined settings to securely store webhook credentials.

  10. Choose a method for authentication in the Header Security section:
    • Simple—Validates an incoming request by matching the defined header and secret

      Provide authentication values in the Header Name and Value text boxes.

    • ArcGIS Webhook—Validates an incoming request by matching a hash function generated from a shared secret key

      Provide a value in the Secret text box.

  11. Optionally, click the Payload tab and turn on Attach Response to save the incoming webhook's payload as a file and attach it to the job.
  12. Optionally, perform these steps to configure the attachment name and folder in which it will be stored:
    1. Provide the name of the folder where the attachment will be stored in the Folder Name text box.

      The folder name can't contain a file system path or special characters. A folder named General is automatically created if a folder name isn't provided.

      Note:

      The folder is contained in the workflow item and is not a file system path.

    2. Choose one of the following Attachment Name options:
      • Autogenerated—Automatically names the attachment using the following syntax: <StepName>_<RunDate>_<RunTime>
      • Custom—Allows a custom attachment name to be provided
  13. Optionally, complete these steps to parse the payload of the incoming webhook and configure custom output values:
    1. If the source of the incoming webhook is a feature service webhook, optionally check Extract Changes to use the extracted changes in your output values.
    2. Click the Test Mode toggle button in the Output Values section.
    3. Paste an example of the incoming webhook's payload in the Sample Response text box.

      Example payload in JSON format:

      {"spatialReference": {
        "wkid": 4326,
        "latestWkid": 4326
      },
      "location": [
        {
          "name": "380 New York Street",
          "extent": {
            "xmin": -117.196701,
            "ymin": 34.055489
          }
        }
      ]}
    4. Click Add Output & Path.
    5. Provide a name for the output value in the Output Value text box.

      This is the value name that is used to obtain the custom output value.

    6. Provide a JSONPath expression in dot notation or bracket notation for the value that you want to store in the Extraction Path text box.

      Example JSONPath in dot notation:

      $location.0.name

      Example JSONPath in bracket notation:

      $['location'][0]['name']

      The value appears in the Sample Result column.

    7. Optionally, repeat substeps c through e to add more custom output values.
  14. Click Save.

    The incoming webhook appears in the Webhook Job Creation section.

  15. Click Save to save the job template.

    The webhook is assigned an ID and a URL.

  16. Hover over the webhook and click Copy URL Copy Step ID to copy the incoming webhook URL to the clipboard and configure it for use in your application.

Edit an incoming webhook

Complete these steps to edit an incoming webhook:

  1. Access the Workflow Manager web app.
  2. Click the Design tab.

    The Design page appears.

    Note:

    If you don't have sufficient privileges, the Design tab is not available.

  3. Click Job Templates Job Templates.

    The Job Templates panel appears.

  4. Choose the job template that contains the incoming webhook that you want to edit.

    The job template appears in the panel.

  5. Click the Automated Actions tab.

    If you don't have a license for the ArcGIS Workflow Manager Server Advanced role or sufficient privileges, you can't configure automated actions.

  6. In the Webhook Job Creation section, hover over the incoming webhook you want to edit and click Edit.

    The Create Webhook dialog box appears.

  7. Update the incoming webhook's settings as necessary.
  8. Click Save to save your changes.
  9. Click Save to save the job template.

    The incoming webhook is updated.

Delete an incoming webhook

Deleting an incoming webhook is permanent and can’t be undone. Complete these steps to delete an incoming webhook:

  1. Access the Workflow Manager web app.
  2. Click the Design tab.

    The Design page appears.

    Note:

    If you don't have sufficient privileges, the Design tab is not available.

  3. Click Job Templates Job Templates.

    The Job Templates panel appears.

  4. Choose the job template that contains the incoming webhook that you want to delete.

    The job template appears in the panel.

  5. Click the Automated Actions tab.

    If you don't have a license for the ArcGIS Workflow Manager Server Advanced role or sufficient privileges, you can't configure automated actions.

  6. In the Webhook Job Creation section, hover over the incoming webhook you want to delete and click Delete Webhook Delete Webhook.
    Caution:

    Deleted incoming webhooks can't be recovered.

  7. Click Save to save the job template.

    The webhook is deleted.

Related topics