Automatically creating projects, tasks, and clients in a time-tracking app like Harvest is a great addition to any onboarding workflow. It will help you to save some time and make your onboarding process much more consistent, as clients and projects are created instantly.
In this post, weâll give you an overview of what you can automate in Harvest with Make, and show you an example of a scenario you could build.
Automate Nearly any Harvest Action with Make
Nearly anything you can do in Harvest can be automated in Make.Â
If you open up Make and create a Harvest module, you can see a huge list of options for creating and editing data.
You can work with clients, contacts, projects, invoices, expenses, time entries, and users.Â
And if the action you want to automate isnât listed here, itâs most likely covered by the last option in the list: make an API call.
With an API call module, you can query Harvestâs API to perform any action that it allows. It takes a little more work than using the prebuilt modules, but you can easily find the information you need to set up this module in Harvestâs API docs.
And in the rare case that your actions arenât supported by the API call module either, you can always create an HTTP request to automate an action.
But for the vast majority of cases, the prebuilt modules and API calls will be all that you need.Â
Example scenario: Create a Client and a Project with Airtable Data
Now, weâll walk you through building an example scenario that automates some Harvest actions in Make.
This scenario will take data from Airtable and use it to create a new client and a new project associated with that client. Then, weâll add a little conditional logic to the scenario so it can either find an existing client, or create a new one as needed.Â
Get Data from Airtable (or Another Source)
First, you need to get some data for your scenario to work with. In our example, weâll use an Airtable base, but you could also use a CRM or any other data source you prefer.
This Airtable view shows new Projects recently added to the base. Make will watch this view and run whenever thereâs a new entry.
You just need to indicate the base, table, and view you want to use. Test this initial step by selecting âChoose where to startâ, âchoose manuallyâ, and picking a record.Â
Then, click run once, and you should see that Make found a record. Throughout this tutorial, you can keep using this same method to test the scenario.Â
Create a Client
Next, create a new Harvest module, and select âCreate a Clientâ. There are only three options we need to fill out here: Name, Address, and Currency.
Fill in Name and Address with Data from Airtable, andl set currency to always be USD by typing âUSDâ into the field.
Thereâs one more option hidden behind âshow advanced settingsâ. You can set the client as Active, Archived, or Empty.Â
Once this step is configured, test again. Open up Harvest, and you can confirm that the new client is there.Â
Before you proceed to the next step, delete the client to avoid any duplicates or errors.Â
Create a Project with an API Call Module
Next, weâre going to have our scenario create a new project. We could use the âCreate a Projectâ module, but we might want to set some projects to Fixed Fee. Â
In the pre-built âCreate a Projectâ module, thereâs no option for that. So instead, weâre going to select âMake an API callâ.
Whenever making an API call or using the HTTP module, refer to the relevant docs to find out what information you need to provide. You can find Harvestâs API docs here, and you can generally find API docs for any app with a quick Google search.
With the documentation handy, you can start filling in the API call module. You can also refer to the screenshot below for an example of a completed module.Â
Â
URL and Method
As the helper text in Make indicates, you just need to add a relative path in the URL field, rather than a full URL. Enter âprojectsâ, and select POST as the method.
Headers
In the headers, you should see that a key-value pair for âContent Typeâ is already filled in. You can leave that as-is, and add a new key-value pair for authorization.
The key will be âAuthorizationâ, and the value will be âBearerâ, followed by an access token. To get your harvest access token, go to the âDevelopersâ section of your Harvest account, create a new token, and copy it.Â
Then paste it in after âBearerâ. Just be sure to leave one space between âBearerâ and the start of your token.
Query String
If we were making a GET request, we could use a Query String to filter the results, but we can just leave it blank in this POST request. So weâll skip that for now and fill out the body of our request.
Body
The text here needs to follow JSON formatting, and include every required attribute. To see which fields are required for the âProjectâ object, we can check Harvestâs API docs.Â
As youâre filling out the body, you can use data from previous steps for dynamic content. So in this case, our Scenario will fill in the unique Client ID and project name each time it runs, rather than using a static value.Â
Finally, weâll add the two optional attributes that we couldnât access in the prebuilt module: âIs_fixed_feeâ , and âfeeâ. Weâll fill in both of those with data from Airtable. Test the scenario again to make sure everything looks good.Â
Over in Harvest, we should see that the project was created, and itâs already set to âfixed feeâ.
Optional: Add a Router to Improve Your Scenario
This scenario is a good start, but itâs not very flexible. What happens if we add a new project to this Airtable base for an existing client?
The automation will try to create the client again, and encounter an error. We need to add logic to handle likely use cases, and thereâs a very easy way to do this.
After the âcreate a clientâ step, add a module to update the Airtable record that triggered the automation to run. Then, add the Harvest ID into this âHarvest IDâ column.Â
Then, add a router from the âflow controlâ menu. Set one path to run if the Harvest ID field in Airtable is blank, and have it create a new client accordingly.Â
If the ID field is not empty, then the automation should run the second path, using the provided ID to find the correct client.
Conditional logic like this can be a little tedious to set up, but it makes your automations much more useful in the real world.
Automate Your Onboarding with Make and Harvest
Now youâre all set to start automating your Harvest projects in Make. Between Makeâs pre-built modules and customizable API calls, you can automate nearly any workflow you want.Â
If youâd like to learn more about building no-code and low-code automations, check out our blog or our YouTube channel. You can also follow XRay on Twitter, Facebook, or LinkedIn.