Tutorials‎ > ‎

FreshBooks Integration

FreshBooks is a web based billing App, getting information out of FreshBooks if you are not a developer may be a little tricky, unless you are using Zynk.

Lets write a quick Zynk Workflow to output all the current projects.
  1. Click on Create New Workflow
  2. Drag the HTTP Task from the task Library
    1. Set the URL to https://your-name.freshbooks.com/api/2.1/xml-in ensure you use https in the address 
    2. Set the Output file to projects.xml
    3. Set the Username to your Security Token from Freshbooks e.g. cc4fb8bcfef38922a72223a1a03655a553c6aec
    4. Set the password to X (Yes, just the letter X)
    5. Set the Method to POST
    6. Set the Input to c:\request.xml 
    7. Create a text file called c:\request.xml containing the example code below
  3. Drag over the User Interface and drag over Display Last Output Task
  4. Save and Run your workflow
  5. Your browser (or default XML handler) will then display the XML from the projects list in FreshBooks (see below for example!)

<?xml version="1.0" encoding="utf-8"?>
<request method="project.list"> <!-- Set this to your method call in Freshbooks -->

What Next?
  • Use the Simple Report XSLT to transform the XML data that is output into a report
  • Email the report it to your team, customers or manager
  • Get clever with XSLT and HTML to display a project summary on your own Status / Dashboard like this http://www.panic.com/blog/2010/03/the-panic-status-board/. Click here to find out how.
  • Integrate the FreshBooks data into an another system such as Salesforce, SugarCRM, Sage 50 or Instant Accounts using Zynk
Example Output
The data output is XML format, you can transform XML into HTML very easily

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="http://www.freshbooks.com/api/" status="ok">
  <projects page="1" per_page="100" pages="1" total="8">
      <name>Project X</name>
      <description>Development of new features in Project X</description>
      <hour_budget deprecated="true">140</hour_budget>
      <name>Sample project</name>
      <description>Find a web-based solution to help simplify my business and its paperwork</description>
      <hour_budget deprecated="true">75</hour_budget>