Mastering Array Processing in Make Webhooks

Have you ever faced a situation where you're creating an array by iterating through a list of Google Calendar event attendees and aggregating their details to JSON, but when that array is sent to a Make webhook via a HTTP request, each item in the array is processed as a separate bundle? This can be quite a challenge, especially when you want the contents of the HTTP request to be processed all at the same time.

Problem

When sending an array to a Make webhook via a HTTP request, each item in the array is processed as a separate bundle. This can be problematic when you want to iterate over each item in the array and respond to the HTTP request with the result of all those iterations.

Solution

There are a few ways to solve this problem:

  • Use JSON pass-through so you'll get a JSON string instead of being split into bundles.
  • Use an aggregator immediately after the webhook.
  • Wrap the array with a collection object brackets {} and give the array a property key, so you can reference the array instead.

For instance, you can update your request content and disable JSON pass-through. Now you can iterate over the array.

Troubleshooting Tips

If you're still facing issues, here are a few things you can try:

  • Check if you need to add a Parse JSON step to convert the string back into an array so that you can iterate over it.
  • If you can't access the array to process it with the iterator because the webhook's output is individual bundles, try using an aggregator immediately after the webhook.

Conclusion

By using JSON pass-through, an aggregator, or wrapping the array with a collection object, you can ensure that the contents of the HTTP request are processed all at once, rather than each item in the array being processed as a separate bundle. This can make your work with Make webhooks much more efficient and effective.

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.