Mastering JSON API Automation with Make.com
Have you ever found yourself in a situation where you have a JSON API with thousands of job ad records and you want to get notified on Telegram whenever a new job is posted? Well, you're not alone. This is a common challenge that many Make.com users face. But don't worry, we've got a solution for you.
The Problem
The main issue here is creating a scenario where changes in the JSON act as a trigger for the next steps. The goal is to get details of the job ad where changes in the 'createdAt' column were made. The initial attempt was to make an HTTP request with Basic Authorization in headers, then search for rows where the date in the 'createdAt' column was later or equal to now. This was set to be triggered every 15 minutes. However, this didn't work as expected. The trigger wasn't activated when there was a new record in the JSON, and when there was no new job ad, it kept sending the same job ads every 15 minutes.
The Solution
After some trial and error, the solution turned out to be quite simple. The trick was to make a simple HTTP request every hour and set a filter on 'publishedAt' Datetime operators: Later or equal to addMinutes(now;60). This worked because the server had a different time zone than the website (two hours difference).
Step-by-Step Guide
- Make a simple HTTP request every hour.
- Set a filter on 'publishedAt' Datetime operators: Later or equal to addMinutes(now;60).
Troubleshooting Tips
If you're still having trouble, make sure to check the time zone of your server and your website. If they're different, this could be causing the issue. Also, ensure that your HTTP request and filter are set up correctly.
Conclusion
In conclusion, setting up a scenario where changes in a JSON act as a trigger for the next steps can be a bit tricky, but with the right approach, it's definitely doable. Remember to check your time zones and set your filters correctly. We hope this guide has been helpful. Happy automating!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.