Download specific gmail attachment using IMAP

So what I’ve done here (after running my IMAP node and have it fetch an email with a suitable attachment) is this:

  1. Added a new IF node and connected it to the IMAP node
  2. Added a String condition in the IF node:
    image
  3. In the Value 1 field added a new expression:
    image
  4. In the expression editor clicked my way down from Current Node to the respective attachment’s filename:
  5. After closing the expression editor I have then simply selected Ends With as my Operation and typed in unsplash.jpg in the Value 2 field like so:
    image

Now whenever the workflow runs for a new email it would check if the first attachment has a name that ends with unsplash.jpg (you can, of course, change that to anything else - unsplash is simply where I got my test file from).

In a workflow, this would look like so:

Example Workflow

Hope this helps!