Gmail Filter Attachments and Send in New Mail

Hey there!

Essentially, I want to forward emails with attachments to a set of recipients.
Since forwarding does not seem to work, I will send a new email and map the attachments.

Today, I received an email where the attachment did not have a name (an inline image) - here is the data:

What is the best approach to filtering attachments that don’t have a filename?

I tried using the attachment iterator and filtering each attachment based on whether the filename exists. However, this seems to require sending out an email for each attachment. I also have a final step that I am performing, which would have to wait for all send operations to finish so I don’t apply it multiple times.

Is there a way to map the attachments from the original email to a new one while filtering out attachments that don’t have a filename? If not, is there a way to join the operations if I have to use the attachment iterator and send an email for each attachment? Thanks!

Welcome to the Make community!

You can filter by mime type or check if content id exists instead.

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.

Thanks! I already know how to apply a filter. It is the consolidation part that I am struggling with:
I want to filter all attachments and only attach the records that pass the filter to a new email, ideally without using an iterator.

Nope, this isn’t possible. You will need an iterator.

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.

Thanks again! I just figured out the array aggregator was the missing piece. It works now as expected.

1 Like

No problem, glad I could help!

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

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.