Best answer

Appending Emails Body to Google Doc, Problems with Looping and formatting

  • 18 January 2021
  • 7 replies
  • 191 views

Userlevel 1
Badge

hello, 

I am creating an automation that for a given customers stores all emails in a google doc, if the email has an attachment , the attachment is saved in a file in a google drive folder and a link is appended to the text.

Here is the flow : https://zapier.com/shared/c86f2c8fc039186fd8bb70b3949dfff62254bcfc

 

I have a few problems:

  1. i have a list of customers and their name, i want that if the folder for the customer exists the attachment is saved in this folder, else drive needs to create it. do not know how to do this

     
  2. I want the folder where to save the attachment and the google doc is equal to the customer email in the google sheet list. i do not know how ot math this, also remember that in real life we may have more than 4 customers so the loop needs to be longer than the 4 emaisl i have here 

     
  3. When i append the email text to the googlesheet the format is not good, the text is all sequencial without breaks. i have tried formatting the text box in the zap but it does not work
     
  4. last when i had the link to the created file in google doc, the link does not appear as a link, cannot click, unless you do it manually. how to solve this?

     
  5. i wonder if there is a way to eliminate the email signature from the body test because that make the experience to go over the emails unpleasant. 



    anyone can help with details?

  6.  

 

 

icon

Best answer by nicksimard 26 January 2021, 00:59

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +12

Hi @Paolon,

 

Your flow is totally possible! I’ve worked on a few similar projects before!

Does your Zapier plan have paths? That would help get the conditionals into the flow. 

Can you share screenshots of your set up? 

 

Thanks!

 


 

Userlevel 1
Badge

 

Userlevel 1
Badge

@GetUWired  i have given you the screen shots, the problem is have a list of customer and a list of existing forlder, i need to put the attachments and the email text in the right folder and google doc automatically :

 


my account is paid so I have the paid options

Userlevel 1
Badge

@GetUWired  these are some of the connectors i see or use :
 

 

Userlevel 7
Badge +12

If you are on the professional plan, paths would allow you to set up two separate events. 1 for if a folder is found on your Google Sheet, and another path would be if the folder isn’t found and you need to create a new one. 

Userlevel 1
Badge
  1. @GetUWired  at high level i understand that but the core difficulty is  to create a loop that does the following things:

    1 ) loop1 checks all the names of folders against the name on the google sheet , if it does not find it than creates a new folder 

    2) loop2 scans all the folders names and selects the right folder that matches the customer and saves the documents in that folder. 

    this is really where the problem is , how to do these operations. 

     
Userlevel 7
Badge +11

Hi @Paolon,

I think it would be helpful to think of this outside of “loops”. We don’t need to loop through anything, necessarily. Here’s what I envision in a single Zap:

Trigger: Gmail — New Email
Action: Google Sheets — Lookup Spreadsheet Row (look for the email address)

Paths:
Path 1: Continue if found (you should have the ID of the folder as well as the ID of the Google Doc saved in your spreadsheet row)
Action: Google Drive — Upload File (add the attachment to the folder, using custom value and the ID stored in that Google Sheets row)
Action: Google Docs — Append Text (again, use the custom value option and map the ID from your spreadsheet row)

Path 2: If not found, you’ll create the folder and the Google doc, and record it in Google Sheets
Action: Google Drive — Create Folder
Action: Google Docs — Create Document from Text (in the folder you created in the previous step)
Action: Google Sheets — Create Spreadsheet Row (add the information using email address, the Google Drive folder ID, Google Doc ID and whatever else you need.

Let’s see if this makes sense for what you’re trying to accomplish, then we can move onto the formatting and signature issues you mentioned.