Question

How to select a particular label in gmail

  • 10 June 2020
  • 4 replies
  • 436 views

Userlevel 2

I am currently working on a zap that incorporates saving gmail attachments to Google Drive and importing into Evernote. I am looking for tips to select a particular label in gmail. Currently the zap is triggered by an email with an attachment, it goes through a few formatter steps to rename the attachment before uploading to Drive and importing into Evernote. The desired file name would be Label_Attachment Name_Month_Year. Where I get stuck is that a handful of other labels come in like UNREAD, CATEGORY and INBOX as well as the desired Label. What is the best way to make sure to only get the desired label? I’ve tried using Line Item to Text in Formatter but the label appears in a different Item under Output for different emails. Would I be better off building a look up table for every email and its matching label?


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

4 replies

Userlevel 7
Badge +12

Hmm, this is a tricky one. 

 

When you say that the labels come in a different item, could you elaborate a bit more? Do you mean that the field that shows the label as line items is different for different emails? 

 

And can I check that you’re using the New Attachment trigger, and if so, I’m assuming that’s because their might be more than one attachment per email, is that right?

 

It may be that your suggestion of creating a lookup table will be the best way forward here, but if you can share a couple more details we can see if we can think of another option 

The above post is also mine, not sure why it logged it me in under different accounts. I am using the New Attachment trigger. There is usually multiple attachments but I only usually need one, typically a PDF (a lot of emails will have a jpg or png that I don’t need) but I think that is a separate issue. The output for the Line item to Text formatter doesn’t always have the label as the same item number. For instance it might have Item_1 as the label I’m looking for like CompanyA but for CompanyB that label might be Item_3. If I was to use a lookup table I’m thinking I would just have a list of emails that would match up to the companies they are from but not sure how to set that up. Any guidance is appreciated. 

 

Userlevel 2

I was able to use a lookup table to accomplish what I needed. It however seems that the attachment name is being incorrectly saved by Zapier. I have the file to be uploaded in Drive renamed as Label_Attachment Name_Month_Year but I get something that looks like its being renamed by Zapier:

Label_https://zapier.com/engine/hydrate/4490539/.eJxNkcmuokAAAP-lzzpB2b2BIArDomzKZNJhaaDZFOmngvHfh1kOc69KKqk3SEuU1rBGI9gwjEixtLgA6bUjqCOQjDcENsACC4C7gcRdiiDOwGbGGJblqAXIMWoy2MXtby4mJE7LdjaH2aif8b0YwOYNWjQMcfFXBSt-LSKRSsVYFDmUJjP5v7f58QZ_OMnSqkwX7YZPqYAEz_KuufswTHN7CG6qcWKKaAqH5rWjkVloPq2gNK2RGk2GcvMwGbuEjNpFOXZRdkFnDdr2nJPJRDuZnrL0R9Z9nARhv610lnBDr3a1zT5zB45KGVCFfRd-PgS9UDovsP1Y776u5MbS1It7YrDswZa8u1yfi5Q0M_diKVLxVy92PNI8bpAUt15z4sdrrTRFxJz4pLHKic9cRaR7otadM6THZZWGYRnkaHsTJJtqqyPbjZc085XO4wWF7zlwJJptJ8mabc01FeqwPT2ijHdbE1lsty6BuVDwyKfQ1hxT11HPdiUrY1nbMU4518YlkrhzPYrSB1vXDF9dhYpZx8pZCg8mSdZWzYHiXYZr_SJOl4NXO_kLmsRS13DfDV9Q5aBreCudYpC_JuMIzzq3-rcTsPpajVt-pWgM_Pz-cXC83CUg:1jl1VJ:udWIoi9u6iHRzUvLdbYB0K8rhNI/_June_2020.jpg 

 

What would be the reason for this? I’ve had the correct attachment name before but now its not working.

Userlevel 7
Badge +8

Hi @kenitafarms ,

Thanks for keeping us posted- that is peculiar! If you are still encountering this issue, could you share a screenshot of your mapping (specifically around the attachment)?