Issue with "Telegram - Send Media Group" when some cells are empty in Google Sheets

Hi everyone,

I’m facing an issue with the “Telegram - Send Media Group” module in Make, and I’d appreciate your help!

Here’s the context:

  • I have a Google Sheet where each row contains 2 to 10 image links, stored in separate columns (e.g., “Link 1”, “Link 2”, …, “Link 10”).
  • I’m using the “Google Sheets - Search Rows” module to select a random row (already working fine).
  • Then, I’m trying to send these images as an album to Telegram using the “Telegram - Send Media Group” module.

The problem:
I’ve set up the “Telegram - Send Media Group” module with 10 items in the “Media” field, each referencing a corresponding column (e.g., {{4.value.Link_1}}, {{4.value.Link_2}}, …, {{4.value.Link_10}}). However, some rows in my Google Sheet have fewer than 10 links (e.g., only 5 links), so the remaining cells (e.g., “Link 6” to “Link 10”) are empty. When this happens, the scenario fails with the error:

Missing value of required parameter ‘httpUrl’

My question:
How can I dynamically send only non-empty image links from my Google Sheet row to Telegram as an album? Is there a way to filter out empty cells directly in the “Media” field of the “Send Media Group” module, or do I need to preprocess the links? If preprocessing is required, what’s the simplest way to create an array of non-empty links and pass it to the module?

Any advice or examples would be greatly appreciated!

Welcome to the Make community!

“Looping” Through Array Items

When you see an ARRAY, think ITERATOR module.

Then,

Combining Bundles Using Aggregators

Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Read this:

Mapping a Specific Structure Into a Complex Field

The Array Aggregator module is very powerful because it allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

This is done using the “Target structure type” field in an Array Aggregator module.

Here is an example:

As you can see, the “Map” toggle on complex fields are used when you have an array. You can easily build an array variable to map to a future module’s field, by using an Array Aggregator module and select the “Target Structure Type” as the future module’s field you have mapped the array into.

Example

Here is an example of how your scenario could look:
Screenshot_2025-03-18_200308

This is just an example. Your final solution may or may not look like this depending on your requirements and actual input data.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

I’m sorry, but I still don’t understand what I have to do to get it to work right. :sob:
Here’s my scenario:

Here are my settings step by step

https://prnt.sc/UwFLyGOMcYnk

https://prnt.sc/HjxEFOGYrgi_

https://prnt.sc/z8pVdmzm59-G


I fill out all 10 items. But sometimes they have a blank value and then I get an error. This works well only when all 10 references are present in the table.

Please help me to customize the scenario so that it works even if the table has less than 10 links.

Turn on the Map toggle on the entire “Media” attachment field.

This was clearly shown in my screenshots above.

If you want to ignore some items, create a filter before the aggregator.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Can you please tell me what conditions I need to set to filter out empty cells?

“Basic Operators: Exists” should do it.

I’m sorry, but it doesn’t work.