I created an example for you to understand. Let's say I want to store the latest 10 Office 365 invoices into the Invoice folder of my OneDrive.
I start my flow using a manual trigger (this can be anything), then I configure the following actions:
Get emails (V3)
This will get all emails matching certain criteria that you put in. In my case, fetch emails:
- Inside Inbox folder (Folder)
- Sent from Microsoft (From)
- Read and unread messages (Fetch only unread messages)
- Including its attachments (Include attachments)
- The latest 10 emails (Top) - please not that the maximum is 24
- With any importance (Importance)
- Only emails that have attachments (Only with attachments)
- That have 'invoice' in the subject (Subject filter)

Get Attachment (V2)
This will get all attachments for each mail that matches the criteria from your Get emails (V3) action as configured above.
- You need to select the Message Id from the Dynamic Content of your Get emails (V3) action as Message Id.
This will put the action inside an Apply to each container. - After that, you can select the Attachments Attachement Id from the Dynamic Content of your Get emails (V3) action as Attachment Id.
This will put your action inside another Apply to each container, because this action will run on each attachment that is found on each fetched email.

Create file
This action will re-create the attachment inside your OneDrive. Make sure to put this action inside the second Apply to each container (so directly after the Get Attachment (V2) action).
You can select whatever folder you want the attachment to be created in in the Folder Path. In my case, I used the Invoice folder in the root of my OneDrive. You can get the File Name from the Dynamic Content of your Get Attachment (V2) action, which is the Name attribute. The File Content can also be used from the Dynamic Content of your Get Attachment (V2) action, which is the Content Bytes attribute.

With everything in place, your flow should look something like this:
