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.
Set up Flow Event settings
The first step is selecting the event that will trigger your Zibot:
Next, you will be presented with the event details page, which will vary depending on which event you select:
New proof/version
Triggered by - select the type of request that will trigger the Zibot.
Created in - select the Ziflow folder that this flow will monitor.
Created by - select the user responsible for this flow activation.
Decision made
Triggered by decision made - select what level decision needs to be made to activate the flow.
Type of decision - choose the decision that needs to be made to activate the flow.
Created in - select the Ziflow folder that this flow will monitor.
New comment/reply added
Triggered by new comment/reply, choose which option should activate the flow.
Made by - choose if a Zibot should be activated by a specific reviewer or anyone who adds a comment/reply.
Created in - select the Ziflow folder that this flow will monitor.
Comment resolved
Created in - select the Ziflow folder that this flow will monitor.
Comment labelled
Comment is labelled as - select which label(s) should trigger a Zibot.
Created in - select the Ziflow folder that this flow will monitor.
Proof updated
Triggered by - select which type of the proof updated event should trigger the Zibot.
Modified in - choose the Ziflow folder that this flow will monitor.
Stage updated
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.
Modified in - choose the Ziflow folder that this flow will monitor.
Comment reaction
Triggered by - choose if you want to trigger a flow based on reactions added to comments or replies.
Comment reacted with - select what type of reaction should trigger a flow.
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.
Go to your developer portal: https://yourteamworkURL.com/developer. Please replace the yourteamworkURL with your company name copied from Teamwork.
Example: https://ziflow7.teamwork.com/developer
Fill out the Publisher Details form (just need Name) and click on Continue.
Click the button to “Create Your First App”:
After you create the app, click on it and go to the credentials section to find the Client ID and Client secret.
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
XXX
= redirect_uri = https://www.ziflow.comYYY
= Client ID = 97501a8555555548c48d6f2a1c49ed636e639e4e
This is the URL in this example: https://www.teamwork.com/launchpad/login?redirect_uri=https://ziflow.com&client_id=e2bd3519cd0555ddb277c9651178575285c1adef
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).
Make sure to document the following info:
Client ID: e2bd3519cd0555ddb277c9651178575285c1adef
Client secret: a31e5bdddddddddd4144867c05267d0c00221
Token returned in URL aka code: a55ce216-b92a-4fb1-b4f2-0227e4dc510c
Then go to the Postman and create a POST call.
Request URL = https://www.teamwork.com/launchpad/v1/token
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"
}
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.
You can get the Teamwork Postman collection here, Custom Fields is in V3. Or you can create your own Postman call.
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
In the Authorization Params, select Bearer Token and add value copied from paragraph number six.
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.
Request type - the POST option should be selected as a request type since we want to send data to Teamwork.
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.
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.
To obtain the IDs required for referencing the distinct custom fields in Teamwork for updates, utilize this GET Postman call.Headers - inside this section, please enter generated bearer token from Teamwork.
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)
(Decision made)
Next, choose a Webhook Zibot:
Fill out Webhook Zibot details; this Zibot will update a task in Teamwork based on a stored Teamwork Task ID property.
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.
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
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}"
}
]
}
}
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.
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.
Additional information:
The Ziflow-Teamwork Integration requires you to generate a Teamwork bearer token.