One of the least exciting parts of my job as a consultant is logging my time. Working for a small consulting firm, we have the flexibility to choose the tools that work best for us which is great because I have found a perfect way to automate my life using Toggl, Zapier and Salesforce.

This idea is thanks to John De Santiago, a fellow Salesforce MVP and colleague of mine at John is also the co-host of the Good Day, Sir! podcast. On episode 97, John mentioned automated time logging using Zapier. Intrigued, I called him up and he shared his setup with me and it works like a champ.

In My Favorite Productivity Tools Revealed, I noted that I look for tools that integrate with one another which is why I’ve moved from Hours to Toggl for time tracking. This move has enabled me to create this automatic workflow integration, saving me 10-15 minutes a day. Over the course of a year, that’s a full 40 hours of savings!

The Use Case

As I mentioned, Toggl is used to track my time throughout the day. Salesforce is our system of record and generates all of our invoices, so, at the end of the day, I would log into Salesforce and manually enter my time from Toggl. Not an awful process, but after a full day of work, it’s the last thing I want to be doing!

The Solution: Integrated Automation

Zapier is a point and click integration tool. Very similar to IFTTT and Workato, it allows you to integrate any two apps to perform specific actions based on a trigger event. They call these Zaps! I chose Zapier over IFTTT or Workato because Zapier is currently the only one to support Toggl.

The setup in Zapier is pretty easy and works similar to Process Builder. My Zap has five components:

  1. A trigger action (new time entry in Toggl)
  2. Data Transformation (get the hours rounded to the correct quarter hour)
  3. Search Salesforce for the related project record
  4. Continue if logic (does the project exist?)
  5. Create action in Salesforce (create the time entry)

Here’s how each of the steps breaks down (with screenshots, of course)!

Step 1: Trigger Action

Toggl is the trigger platform. Based on the action, the Zap kicks off. This of this as the entry criteria for the workflow rule.


Step 2: Format the Hours Duration

Toggl performs rounding of time but only in reporting. Salesforce however, only accepts rounded hour values in the form of 0.25, 0.5, 0.75 and 1. So, in order for the integration to work, I need to convert the duration in Toggl to the appropriate format. Using the Numbers step, I’ll use a spreadsheet style formula to convert the value.


This step works much like Salesforce’s own Flow. I’m essentially creating a variable which we’ll use in a later step. The above calculation will round up or down to the nearest quarter hour based on the Duration Hours field provided through Toggl.

Step 3: Search Salesforce for Project

The next step in the process is going to query Salesforce to find a related project. Since I cannot personalize Toggl with custom fields, and I’m not an Admin in my Salesforce org, I can’t create cross reference fields using Salesforce and Toggl project ID’s so, this step is going to search Toggl’s project name in Salesforce to validate that a project exists.

The key with this step is to ensure that the project name in Toggl matches exactly to Salesforce. In my case, project names are pretty unique so this isn’t an issue. However, I’ll discuss what happens if the project name is changed, or can’t be found in a bit.


I’m suring the Project custom object in my Salesforce org, and I’m looking specifically for the Project Name to match. Using the fields provided by Toggl, I’ll enter the search value as Toggl’s Project Name.

Step 4: Only Continue If

Step three performs a single function: search Salesforce. It does not provide any sort of result on the search. That’s what Step 4 is doing – validate that a Project was found during the search.

If a Salesforce ID exists, continue to the next and final step. If it does not, stop the process.


Step 5: Create the Time Entry in Salesforce

If all of the following steps executed as expected, the last and final step is to create the time entry in Salesforce. This is a related object to the project called Hours. This step is basically a mapping exercise using Toggl’s fields to create the record.


There are a few things to point out on this step. The Hours Logged field in Salesforce has the calculated value we created in Step 2 of this Zap. I’ve also referenced the Project ID found in Step 3. Some other values are defaulted through this step, and I’m mapping some Toggl fields here as well (but couldn’t get the full page in a single screenshot).

The Consensus

I’ve been using this solution for a week, and I can tell you, it works really well! When a project timer is stopped in Toggl, Zapier will process that time and automatically log it against the correct project in Salesforce.

Now, instead of 10-15 minutes logging my time for the day, I spend about 30 seconds to a minute auditing the hours in Salesforce. Generate the report in Salesforce, generate the report in Toggl, ensure the hours match, and move on.

I have had a few instances when Toggl has created a time entry in Salesforce for the next day, but that’s the only issue I’ve run across yet.

Salesforce is a Premium application with Zapier which requires a paid plan to execute any Salesforce related Zaps. Toggl has a free plan which would be sufficient. I’ve paid for a Pro plan which enables time rounding in reports, but a  Pro plan isn’t necessary.

Are you using Zapier, Workato, or IFTTT to automate processes in your professional life? Share them below – I would love to automate even more!

4 thoughts on “ Using Zapier to Automate Time Logging in Salesforce ”

  1. Brent, Great blog! I’ve just discovered it, and have been reading all day! I use a combination of, which integrates with Google calendar, which then integrates with Salesforce via Cirrus Insight. has a free version that allows you to publish a selected calendar, so clients can look at your availability, and reserve time with you for calls, meetings, webinars, etc. When they do, this blocks the time in Gcal. This then syncs with SFDC, creating an event. On the event, you can enter in the Contact, Account (I put this as a custom field) and Project (custom object referenced in the “Related To” (whatis) field. Finally, I have an Invoice custom object that relates all Events for each client within the Invoice period (1st day to last day of the month) to an Invoice. On the first day of the following month, I use S-Docs to create a PDF of that invoice and email it to the Project lead (noted on the Project custom object record). It took some doing, but it works great! And Cirrus Insight is the only part of that that isn’t free to all.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.