Question about automating the sending of PDF proposals from Google Drive and Sheets

Hello, it’s a pleasure to greet you!

I’d like to share a scenario I’ve been struggling with and the solution I eventually implemented, to ask for your thoughts on whether it’s considered a good practice or if there might be a more efficient approach I’ve yet to discover.

The goal:

My aim is to automate the process of sending proposals in PDF format. The ideal flow would be as follows: when I update a specific PDF file in a Google Drive folder (e.g., “Proposal - Juan Perez.pdf”), the system should grab the latest version of that file and email it to the corresponding recipient, whose name and email address are stored in a row of a Google Sheets document.

The first attempt (and the issues):

My initial approach was what seemed most logical:

*Google Drive (Watch Files): Use a trigger to detect when a file is modified in the folder.
*Google Sheets (Search Rows): Look up a row in the sheet where the name matches the one extracted from the PDF file.
*Google Drive (Download a File): Download the detected file.
*Gmail (Send an Email): Send the email to the matched recipient.

What’s the issue now? When the document is sent, the system emails it to everyone on the list instead of just the last person in the Google Sheets row. Additionally, it attaches files that don’t match the person’s name. For example: Name: Juan Pérez; Attached file: Proposal - Daniel Gonzalez.

I honestly don’t know what else to try.

Thank you very much in advance.

1 Like

Hey Carlos,

can you show some screenshots from the modules so we can see the setup?

Hello Stoyan!

I have already solved it :partying_face:

But now I have another problem that I didn’t think of until everything was working. Let me explain:

I have 2 types of proposals (online store and informational website). The idea is for the router to carry the information according to the type of proposal. What’s the detail? I can’t come up with the best way to generate that division from Drive, for example, by folders (which I already have created).

Hello @Carlos_Linares :waving_hand:

Would you be willing to share your solution to this topic? :folded_hands: It could be really helpful for other Makers who might face the same challenge.

Also, for future questions, I recommend creating a new topic for each issue. This usually increases the chances of getting a quick and accurate response. :slight_smile:

Thanks a lot and happy automating! :rocket:

1 Like

Hello @Misha

Yes, of course! I have no problem doing it.

Thanks!

1 Like

Hello @Stoyan_Vatov

Did you see the image? :smiley: