web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / GET and POST API Outlo...
Power Automate
Unanswered

GET and POST API Outlook Shared Mailbox to SharePoint

(0) ShareShare
ReportReport
Posted on by 166
Hi,
 
I am exploring to replace section of my flow to be specific the 'apply to each' section to improve efficiency of my flow: 
 
So, my flow goes like this:
 
1. When an email received by shared mailbox then use some filter inside that picks-up email from specific email address with files attached.
2. [For replacement] Get all attachments in an email
3. Get then name of the fist attachment. This is used for naming of the folder in SharePoint later
4. From step 3, it gets first few characters of the file name which is before an underscore
5. Compose preferred folder name in SharePoint which is date today formatted as YYYYMMDD and the result of step 4. Sample: YYYYMMDD_Fund Group
6. Initialize Variable - this is for sharing link
7. Get files properties - this is to check the SharePoint where files will be saved. Location: Shared Documents/Email Attachments
8. Condition - this will check the folder inside SharePoint if step 5 exists or not. If not, create a new folder then generate sharing link. If yes, get sharing link
9. [For replacement] For each file, upload it to the folder defined by step 5.
10. Compose draft - I just posted here the HTML of the email
11. Send an email to recipients and CC'ed persons on the email caused the trigger including output of step 10.
 
I would like to ask if you can give a run through how to build REST API.
 
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    The Graph API has a list attachments method, which you can use in a Send an HTTP request action of the Outlook connector
     
    Might be worth exploring that one as a replacement.

     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
     
  • ComicSansrival Profile Picture
    166 on at
    Thank you @Expiscornovus,
     
    May I ask if you can guide me through to the next steps?
     
    I was able to get the HTTP request but unable to do following steps especially steps 3 and 9.
     
    Step 3 is to get the name of the first file and step 9 is to upload all files from shared mailbox to the defined folder stated on previous steps.
  • ComicSansrival Profile Picture
    166 on at
    Hi,
     
    I was able to achieve the step 2 requirement by using the below steps:
     
    1. Send an HTTP request as shared by @Expiscornovus
    2. Parse JSON
    a. Copy the output of step 1
    b. Using the generate from template, paste here the output of step 1
    3. On the original requirement at step 3, replace the expression to 'body('Parse_JSON')?['value'][0]?['name']' so that it will pick up the first file name.
     
     
    I was able to reduce the run time from 1 minute to 10 seconds using HTTP request for outlook.
     
    I am currently looking for steps on how to upload files from Outlook to SharePoint using HTTP request.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard