Hey everyone,
Alex here from the Developer Success team! I hope your projects are running smoothly
Ever wanted to make a custom API call inside Zapier? Well, I wanted to share a quick guide with you today that explores the 2 following topics:
- How to run a custom API query to monday.com using Zapier;
- How to use that query to get Integration column data (using SalesForce integration column);
As you might be aware, currently, our Zapier integration doesn’t allow you to get integration column values. You might be thinking “the What? Column value?” and I’d love to shed a bit more light on this.
So… what is the integration column?
The Integration Column is a column type that is added for some of the native integrations that monday.com offers, usually for those that are able to sync future changs from the target platform. For example:
This column stores information about the object from your Target platform that was created as part of an integration. This helps the platforms communicate to the correct points of data quickly, as there is a match of a monday.com Item to the ID from the other platform. In the screenshot above, it stores data about the Trello card that led to an item being created on your board. Pretty neat!
Got it! So how do we get those neat values then?
There is a way to get the Integration column data, and you can use the Custom Request and Formatter Modules to get the values you are looking for
So let’s get started!
How to make an API call on Zapier?
First, we’ll need to figure out how to make an APi query to monday.com by using Zapier. We can use the Custom Request module for this. You’ll need to make sure it is set up the following way:
- POST as the method;
- https://api.monday.com/v2 as the URL;
- Headers should include:
- Authorization: [Paste in your API key here];
- Content-Type: application/json;
The Data field is where you’ll insert your API request:
Here is the query that I’ve used in the Data field. You’ll need to make sure your Integration column ID matches the column ID on the platform
{“query”:“{boards (ids:BoardId){items (ids:ItemId) {name column_values(ids:"salesforce_object") { value text}}}}”}
If you have a previous step in Zapier that relates to monday.com, you can also use the Board and Item ID values from that step. In my screenshot example, the first Zap would trigger when an update on monday.com board is posted, and I could then use those IDs to query that specific item’s integration column.
Making those values usable - How to apply Formatter to the output.
The result is a JSON string, and we’ll need to take an extra step here to get the SalesForce object ID that we can work with. We can get the value we are looking for by using Zapier Formatter.
Now, choose the Formatter Module, then the Text Action:
- In the next step, we’re going to want to Split text. This will allow us to use the overall output of the API request to get meaningful chunks of data:
- The input should reflect the data returned by the API Query from earlier:
- As your Separator, use quotes:
- Then, use All (as Separate Fields) as the separation option:
The final output should provide you with the following set of items:
You’ll then be able to use those items in your Zap’s next steps: Good luck!
I hope this helps you if you’re just starting out with Zapier, or already a heavy user and looking to expand on the options we currently provide.