Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

JS automation to send data to FreshBooks API

Topic Labels: Automations
1151 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Dinos_Papoulias
4 - Data Explorer
4 - Data Explorer

Hey all,

I need to write an automation for the following scenario:

  1. New record comes into a View (a potential customer is “Qualified”)
  2. Send data from that record to my estimating/invoicing system FreshBooks to create a new client.

They have an API where this is possible – just need to figure out how to write the JS code to call the API. I’ve written some automation code before with AirTable in JS – so I’m familiar with writing JS in and of itself…its just the calling the API part that I need some assistance with.

Thoughts?

Thank you, everyone,
Dinos

1 Reply 1

Welcome to the community, @Dinos_Papoulias! :grinning_face_with_big_eyes: You’ll need to dig into the FreshBooks API documentation to see what’s required for such an API request, namely the method (GET/POST/PATCH???), the authentication process, required headers, and the type and format of the data (probably JSON). You’ll end up using the fetch command to execute the request. If you look in the documentation for the fetch command in Airtable’s scripting API reference, there are examples that can probably take you in the right direction. If you run into any issues, feel free to ask for help here.