Blog

Software tips, techniques, and news.

FileMaker Teamwork Integration

Like the people who run them, every business optimizes its strengths by doing things its own way. And, like people, every business also benefits from pre-packaged software they don't have to build or maintain. Teamwork is a powerful project management tool, built by a responsive and customer-centric team. Teamwork itself is built to be flexible and customizable but, like any ready-to-go solution, still has areas your business has to fit into. Luckily, we have Claris FileMaker to help bridge the gap between the business processes that make you stand out and leveraging new software to improve on it. Whether you're new to Claris FileMaker or not, we'll take a look at how an integration from FileMaker to Teamwork can be set up.

youtube-preview

Setting Up The Integration

Teamwork provides excellent API resources for diving into their available integration options. We'll focus first on authenticating with the API using the "App Login Flow," which uses the secure standard OAuth2.0 authentication method. The first step is to register the integration/app in the Developer Portal. The recommended approach is to use a dedicated user (who is not a person) with access to everything you want your integration to do (create, update, and delete projects, for example). That way, things don't suddenly come to a halt when Joe Developer leaves.

filemaker teamwork integration developer portal create app.

Once you create the app, you'll be able to specify a redirect url and get the client ID and client secret.

example redirect uri.

Retrieving Data

Once we have the access token, we're ready to integrate. Since Teamwork is a project management platform, it will be important to know what our tasks are. Let's start by getting all the Teamwork tasks for a project so that we can use them in our system.

For that, we'll need to set up a GET request to the Task entity in Teamwork.

Instead of pulling all tasks in Teamwork, we can use the parameter "includeCompletedTasks" to return only active tasks.  Depending on your use case, you may not want this, but it provides a very useful way to demonstrate how request filtering works through the Teamwork API and also prevents us from getting old data.

Our URL for this action will look like this: 

https://[mydomain].teamwork.com/tasks.json?includeCompletedTasks=false

If you'd like to limit your query to just one project, you can filter further with a url that looks like this:

https://[mydomain].teamwork.com/projects/[project id]/tasks.json?includeCompletedTasks=false

The accompanying cURL will look something like this. Note that we've included the response headers command so that we have access to view those in FileMaker for additional logging and debugging.

"-X GET" & ¶ &
" -D $responseHeaders " & ¶ &
" --header \"Authorization: Bearer " & $teamworkAccessToken & "\"" & ¶ &
" --header \"Content-Type: application/json\""

The response we get back from Teamwork is very predictable since we can see the example response body right from their documentation!

filemaker teamwork integration task response.

Since tasks are returned in an array, we can speed up FileMaker's processing of each task by deleting the top array value on each parsing loop. That prevents FileMaker from re-parsing the entire array and also reduces the amount of code we need to actually process the loop.

Updating Tasks

Now that we've retrieved our tasks, we can use that information to update them in Teamwork from FileMaker.

The format for this call will be pretty similar to the one we used for getting the tasks. This time, however, we'll send a PUT request and send a task body to tell Teamwork what we'd like to update.

The main difference in our URL, aside from the API version differences, is the use of the task ID at the end of the call to specify which task we're making the request for. So, for example, your URL for the update task call would look like this:

https://[your domain].teamwork.com/tasks/1234.json

It's important to note that you should always check the documentation when pushing data to an API. The structure, names, and JSON type of each data point will have to match in order to either avoid errors or avoid updating nothing. In particular, Teamwork requests dates to be pushed in a YYYY-MM-DD format as a JSON string ( {"due-date":"2023-03-02"} ), which is different than how some other APIs may request a date.

filemaker teamwork integration update documentation.

Instant Updates

While we won't cover in detail how to get instant updates from Teamwork, it's important to know that you can. Teamwork offers a robust suite of webhooks for all kinds of actions that take place on the site, and which you can easily tap into to get near-instant updates about data in Teamwork.

At its simplest, you can set up a single webhook in the language and provider of your choice to listen for updates issued by Teamwork, then pass that data to FileMaker to handle whatever custom workflows you require. Teamwork even has logging tools in the webhook setup to help anticipate what is sent and troubleshoot any problems.

filemaker teamwork integration webhook history example.

Teamwork also lets you set up webhooks by project. So if you had a need to only get updates from a specific or small number of projects, you could easily do so.

filemaker teamwork integration project webhooks.

...And More

This article covers just the beginnings of how you might bring together your current business processes and Teamwork with the help of Claris FileMaker. The important thing is that you can extend the power of your own custom FileMaker solution to leverage pre-made tools with immense value and low cost. It's one more way FileMaker offers a springboard for innovation. 

If you're looking to extend the power of your FileMaker solution by integrating with Teamwork, contact us and let's talk about what we can accomplish together.

Did you know we are an authorized reseller for Claris FileMaker Licensing?
Contact us to discuss upgrading your Claris FileMaker software.

Download the FileMaker Teamwork Integration File

Please complete the form below to download your FREE FileMaker file.

FileMaker Experience *
Terms of Use *
OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This file is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free file, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
nathan kiefer headshot.
Nathan Kiefer

Nathan is a Certified FileMaker Developer and Salesforce consultant with a warm and accommodating approach to delivering high quality results. Personable and empathetic, he is dedicated to being a supportive team member to both clients and colleagues.