I have a list of gmail folders/labels (of client names) and the corresponding folders in g-drive. These values are the same. e.g. If gmail folder/label is Joe Citizen then the corresponding folder in g-drive is Joe Citizen.
What I'm wanting to automate is that when I move an email with Attachments to a gmail folder/label it uploads these attachments to the corresponding folder in g-drive.
I have found a template between gmail and gdrive however it takes attachments and pushes it into 1 folder in gdrive. I'm unsure how to create a rule to consider the name of the gmail folder/label and find the corresponding folder in gdrive.
That's exactly what the add-on I wrote does! Check out the code: https://github.com/ellaqezi/archiveByLabel
You'll set label to e.g. Joe Citizen and query to label:joe-citizen to archive all attachments of messages labeled Joe Citizen to the same directory on Drive
Related
I am currently receiving an email with 2 email attachments. I only care about pulling in one of those attachments "Delivery Sales" and I don't care if I pull in or disregard the other.
My workflow should be: Run when new email is detected > Grab attachments > Push attachment to Blob > Archive Email.
I can get all of these to work (and it even archives the email) but it will error out on the archive step because it seems to fire it off twice (once for each attachment it seems).
So how can I pull in the email, throw the attachment to blob, and then archive the email into another outlook folder?
Below is my current setup. I have tried moving the email move to outside the loop (still fails), I have also added a condition to look at the attachment names, true/false, still fails.
The email arrives in a shared email box, the move now seems to take a while and times out with a status of "BadGateway"
My issue appeared to be in the move toe mail folder I had selected an "Archive" folder that was on the same level as my inbox. My Outlook for whatever reason didn't like that. So I clicked on Inbox and navigated to "Archive". I then re-ran and it worked just fine.
For example: Email arrives with subject "Report for domaina.com". It has an attachment. I want to setup the recipe to save domainareport.pdf to Dropbox under /reports/Domaina. I'd then create similar recipes for domainb, domainc, etc. Seems like this is possible, but I'm a total IFTTT nub. Thanks!
Create a trigger on gmail using email from search and typing in this
Create an action using Dropbox and it will have automatically filled
out everything EXCEPT the folder path edit the folder path so it looks like this
Hope this helps :)
I'm just getting started with the Outlook REST API. My baseline is the tutorial that uses node-outlook.
First order of business is to retrieve all of the folders in my mail account.
So I issue this REST request:
GET https://outlook.office.com/api/v2.0/Me/MailFolders
Instead of returning all of my folders, it only returns the "well known" folders:
Clutter
Deleted Items
Drafts
Inbox
Junk Email
Outbox
Sent Items
Trash
Am I missing a query parameter or something that says, "no, really, all of them please"?
UPDATE
I tried a different email account, and I also don't get all of my actual folders, but I get a different subset (some of which are well-known, others aren't).
I am implementing the paging protocol (using the #nextLink parameter) so it's not a matter of page sizes. I am getting these 8 folders on one account, and 18 folders on another.
So there must be something that decides what folders will be returned.
UPDATE 2
I changed to doing a folder sync instead using the "beta" API. In this case, I also get an unnamed folder in the list, which is the parent of the other folders. It comes along with a ChildFolderCount which is accurate. However, when I do a child folder request on that folder id I get the same list.
UPDATE 3
Here's the request url I'm using when I attempt to read the child folders of the one folder that comes back with a non-zero ChildFolderCount.
GET https://outlook.office.com/api/beta/Me/MailFolders/AAMkADRmMzFmNjZmLWU3MjctNGZiNi1iZTg4LTRmNGQwYTVhMDgxYgAuAAAAAAB8IxaZ5KGbQom4EPywGCSdAQDVy0eYwAzLS63k5pohzykCAAAAAAEJAAA=/childfolders
Here's what appears to define what folders are returned by this API and what are not:
If I create a folder in office365 directly on outlook webmail, it shows up in this query.
If I create a folder in Mac Mail, it does not.
Mac Mail accesses the service using EWS, so I would expect a folder created by it would be like any other folder.
So there is something about folders created on Mac Mail that prevents them from being returned by this API.
Folders created in Mac Mail DO show up in web mail and vice versa.
Folders created on an iPhone DO show up, so in my limited testing it looks like Mac Mail may be the only app suffering from this problem. The problem I have is most of my folders were created in Mac Mail and I have no easy way of rebuilding them.
I'm thinking this is just a BUG in the API. At any rate, this answers my original question and should help anyone out there trying to use the new API.
If I find a workaround I'll post it here.
After I OAuth my google account I can connect to it via the IMAP protocol. Listing folders lists all the "labels" plus "[Gmail]" which isn't selectable.
Is there any way to list ALL mail and/or at least get into the trash? Also what about archived - those don't show up in the INBOX folder
I did some digging around and tried this:
var_dump($storage->getFolders('[Gmail]'));
which doesn't list anything... but this does:
var_dump($storage->getFolders('[Gmail]/Trash'));
How can I list all those folders
[Gmail]/All Mail contains all of your messages in Gmail, including your sent and archived messages. Any messages that you see in your inbox will also appear in the [Gmail]/All Mail folder.
I'm using python imaplib to read Gmail messages from the [Gmail] All Mail folder.
For most accounts, the all mail folder is named "[Gmail] All Mail". However, a couple accounts have it as: "[Gmail]/&BBIEQQRP- &BD8EPgRHBEIEMA-"
It seems to be related to an account in a foreign language.
Does anyone recognize the encoding?
Is there a way to figure out which folder is the "All Mail" folder?
Alternatively, is there a systematic way of getting all the possible names of the All Mail folder so I can search for it?
GMail supports an XLIST function to get the localized name of the folder.
See Gmail IMAP Extensions