Skip to main content
Integrating With Teamwork Using Webhooks

Send Ziflow events to your Teamwork using Webhooks.

Updated over a week ago

Summary: With our Teamwork Webhook integration, you can extend your Ziflow online proofing operations to create and update tasks automatically. You'll see updates in Teamwork in real-time - for new proofs, comments, decisions, and more. This will keep your team up to date with the tools they're already working with.

Available for: Users with Admin rights on Enterprise editions.

Our Webhook Zibot allows you to trigger a flow when the following events occur on a proof:

  • New proof/version: triggers when a new proof is ready for review.

  • Decision: triggers when a decision is made by a reviewer or when a decision is updated on the stage and/or proof.

  • New comment/reply: triggers when a reviewer adds a comment/reply to the proof.

  • Comment resolved: triggers when a comment is marked as resolved.

  • Comment labeled: triggers when a reviewer labels a comment.

  • Proof updated: triggers when the proof folder, setting, or custom property changes.

  • Stage updated: triggers when a stage is started or when a reviewer is added/removed.

  • Comment reaction: triggers when a comment reaction is added on a comment/reply level.


Learn how to:


Create Ziflow Webhook Flow

To integrate Teamwork with Ziflow, you need to click on the Connect tab and then click on the +Create Flow button, choose Ziflow as the Application, and choose which Event (New proof/version, Decision made, New comment/reply, Comment resolved, Comment labeled) you want to trigger the integration.

Create Ziflow Webhook Flow

Set up Flow Event settings

The first step is selecting the event that will trigger your Zibot:

Set up Flow Event settings in Ziflow

Next, you will be presented with the event details page, which will vary depending on which event you select:


New proof/version

New proof/version event settings in Ziflow
  1. Triggered by - select the type of request that will trigger the Zibot.

  2. Created in - select the Ziflow folder that this flow will monitor.

  3. Created by - select the user responsible for this flow activation.


Decision made

Decision made event settings in Ziflow
  1. Triggered by decision made - select what level decision needs to be made to activate the flow.

  2. Type of decision - choose the decision that needs to be made to activate the flow.

  3. Created in - select the Ziflow folder that this flow will monitor.


New comment/reply added

New comment/reply added event settings in Ziflow
  1. Triggered by new comment/reply, choose which option should activate the flow.

  2. Made by - choose if a Zibot should be activated by a specific reviewer or anyone who adds a comment/reply.

  3. Created in - select the Ziflow folder that this flow will monitor.


Comment resolved

Comment resolved event settings in Ziflow
  1. Created in - select the Ziflow folder that this flow will monitor.


Comment labelled

Comment labeled event settings in Ziflow
  1. Comment is labelled as - select which label(s) should trigger a Zibot.

  2. Created in - select the Ziflow folder that this flow will monitor.


Proof updated

Proof updated event settings in Ziflow
  1. Triggered by - select which type of the proof updated event should trigger the Zibot.

  2. Modified in - choose the Ziflow folder that this flow will monitor.


Stage updated

Stage updated event configuration
  1. Triggered by - select which type of the stage updated event should trigger the Zibot. There are three types of stage update events: reviewer added, reviewer removed, stage locked, and deadline changed.

  2. Modified in - choose the Ziflow folder that this flow will monitor.


Comment reaction

Comment reaction event settings
  1. Triggered by - choose if you want to trigger a flow based on reactions added to comments or replies.

  2. Comment reacted with - select what type of reaction should trigger a flow.

  3. Created in - select the Ziflow folder that is going to be monitored by this flow.


Getting your Bearer Token in Teamwork

In order to begin integrating Ziflow and Teamwork, it is necessary to acquire a Bearer Token for authentication purposes. Kindly refer to the guide below for instructions on how to obtain your personal Bearer Token in Teamwork.

  1. Go to your developer portal: https://yourteamworkURL.com/developer. Please replace the yourteamworkURL with your company name copied from Teamwork.

  2. Fill out the Publisher Details form (just need Name) and click on Continue.

  3. Click the button to “Create Your First App”:

    1. Name: whatever you want

    2. Redirect URI can just be your company website


  4. After you create the app, click on it and go to the credentials section to find the Client ID and Client secret.


  5. Populate this URL and put it into the browser to authenticate your app

    https://www.teamwork.com/launchpad/login?redirect_uri=XXX&client_id=YYY

    1. XXX = redirect_uri = https://www.ziflow.com

    2. YYY = Client ID = 97501a8555555548c48d6f2a1c49ed636e639e4e

  6. After you go to the URL and log in, you’ll see a code added to the end of the URL on your redirect URI page. Copy and paste that URL and save it.

    This is the URL I got back, you just need the highlighted part (the code).

  7. Make sure to document the following info:

    1. Client ID: e2bd3519cd0555ddb277c9651178575285c1adef

    2. Client secret: a31e5bdddddddddd4144867c05267d0c00221

    3. Token returned in URL aka code: a55ce216-b92a-4fb1-b4f2-0227e4dc510c

  8. Then go to the Postman and create a POST call.

    1. Body = code below updated with the correct code, client secret, and client id.

      {
      "code": "a55ce216-b92a-4fb1-b4f2-0227e4dc510c",
      "client_secret": "a31e5bdddccccccccccccccccc67c05267d0c00221",
      "redirect_uri": "https://www.ziflow.com/",
      "client_id": "e2bd3519cd0555ddb277c9651178575285c1adef"
      }

  9. The response back from the Postman call contains your access token. Save that immediately to some safe location. This is what we’ll reference in the Ziflow webhooks.


Getting Custom Field IDs from Teamwork

To allow passing information from Ziflow to Teamwork, you'll need to have some custom fields that will store information passed from Ziflow. In my case, I want to pass Ziflow proof status to Teamwork:

To get the Teamwork custom field IDs, use the Postman application.

  1. You can get the Teamwork Postman collection here, Custom Fields is in V3. Or you can create your own Postman call.

  2. Select GET and enter the URL, which is “customer domain”/projects/api/v3/customfields.json

    This is how the URL looked in my case: ziflow7.eu.teamwork.com/projects/api/v3/customfields.json

  3. In the Authorization Params, select Bearer Token and add value copied from paragraph number six.

  4. Push the Send button, and in the Response, you’ll have all custom fields, there’s a search on the right of the screen so you can find them by name and then note the ID number (ID for the custom field highlighted below is 1716)


Getting Task List ID in Teamwork

In order to successfully integrate Ziflow with Teamwork and designate where new tasks should be added, obtaining the Task List ID is necessary.

To get the Task List ID, please open the Postman application and send the following GET call:

Call type: GET

URL: https://“customer domain”.teamwork.com/tasklists.json

Authorization: Basic Auth: Email & Password


Create Teamwork tasks based on adding new proofs in Ziflow.

(New proof created trigger is recommended for this type of integration)

Next, choose a Webhook Zibot:

Fill out Webhook Zibot details; this Zibot will create a task in Teamwork and update whichever fields you specify.

  1. Request type - the POST option should be selected as a request type since we want to send data to Teamwork.

  2. Request URL - fill out with Teamwork URL. You'll need to enter a Task List ID where a task should be added on a Teamwork side.

    https://(Domain).teamwork.com/tasklists/(taskListID)/tasks.json


    Follow this guide on getting a Tak List IDs.

  3. Request body - should be filled with JSON body referencing fields that you would like to update in Teamwork with data from Ziflow. In this case, I decided that tasks on the Teamwork side should be created with four fields from Ziflow: Name, Proof Status, Proof Link URL and Version.

    { 
    "todo-item": {
    "content": "{$.proof.name}",
    "customFields": [
    {
    "customFieldId": 10732,
    "value": "In Progress"
    },
    {
    "customFieldId": 10730,
    "value": "{$.proof.public_link}"
    },
    {
    "customFieldId": 10731,
    "value": "V {$.proof.version}"
    }
    ]
    }
    }


    The following fields should match existing fields inside your Teamwork project.

    Teamwork custom fields matching data from Ziflow


    To obtain the IDs required for referencing the distinct custom fields in Teamwork for updates, utilize this GET Postman call.

  4. Headers - inside this section, please enter generated bearer token from Teamwork.

    Teamwork token entered in Zibot configuration for authorization

Save your Zibot configuration by pressing the Next button.

Before continuing with the next step, please create a custom property in Ziflow to hold this Teamwork task ID information. This is how I named the property in Ziflow:

After creating a custom field to store the Teamwork Task ID, proceed to include a new Webhook Zibot to your workflow. This Zibot will be responsible for saving the Teamwork Task ID into the Ziflow custom property. This information will come in handy when updating Ziflow proofs end, i.e., approval status or a new version.

Please read this guide on how to start using Ziflow internal Zibots before you proceed.

Once you finish the flow configuration, please save all settings and activate the flow.

To ensure that the flow is functioning properly, you can create a sample proof in Ziflow and verify if it has added a task in Teamwork. Additionally, it is important to confirm if the proof has been updated with the task ID from Teamwork.


Update Teamwork Task when a new proof version is created or when a proof status is changed

(New proof version or Decision made trigger is recommended for this type of integration)

(New proof version)

New version selected as a flow event

(Decision made)

Next, choose a Webhook Zibot:

Select Webhook as Zibot

Fill out Webhook Zibot details; this Zibot will update a task in Teamwork based on a stored Teamwork Task ID property.

Teamwork Webhook Zibot details
  1. Request type - the PUT option should be selected as a request type since we want to update the Teamwork task with information from Ziflow proof.

  2. Request URL - fill out with Teamwork URL. Please make sure to fill it out with the correct group and property names from your Ziflow account.

    https://ziflow7.eu.teamwork.com/tasks/{$.proof.custom_properties[?(@.properties[?(@.name=='Properties for integration purposes')])].properties[?(@.name=='Teamwork Task ID')].value}.json

    Grup and property names in Ziflow

  3. Request body - should be filled with JSON body referencing fields that you would like to update in Teamwork with data from Ziflow.

    IMPORTANT: When using Teamwork API, you need to include all custom fields, even if they’re not changing.

    Example: If you’re updating the Proof Status when a proof is approved and don’t include the Proof Link or Proof Version in your webhook, then those two fields will blank out when the update is sent

    Body A - The first body is if you’re updating a Task that was created by Ziflow (a task named the same as the proof, so you don’t need a proof name custom field)

    {
    "todo-item": {
    "content": "{$.proof.name}",
    "customFields": [
    {
    "customFieldId": 1716,
    "value": "In Progress"
    },
    {
    "customFieldId": 1717,
    "value": "{$.proof.public_link}"
    },
    {
    "customFieldId": 1718,
    "value": "V {$.proof.version}"
    }
    ]
    }
    }


    Body B - Second body is if your teamwork Task name isn’t the same as the proof name. The task already existed and was associated with the proof when the proof was created in Ziflow, so the task name is potentially different from the Proof Name, and you’d like to use a proof name custom field to display the proof name value.

    {
    "todo-item": {
    "customFields": [
    {
    "customFieldId": 1716,
    "value": "In Progress"
    },
    {
    "customFieldId": 1717,
    "value": "{$.proof.public_link}"
    },
    {
    "customFieldId": 1718,
    "value": "V {$.proof.version}"
    },
    {
    "customFieldId": 1719,
    "value": "{$.proof.name}"
    }
    ]
    }
    }


  4. Headers - inside this section, please enter generated bearer token from Teamwork.

Once you finish the flow configuration, please save all settings and activate the flow.

Save and enable flow configuration in Ziflow

You can now test if the flow works correctly by creating a new proof version or changing the proof status in Ziflow. The flow should send updated information to Teamwork.

Test Ziflow - Teamwork integration


Additional information:


Supporting Material:

Did this answer your question?