Series: Part 2 of 2 – SharePoint Automation in Power Automate
← Read Part 1: Triggers & Standard Actions
Introduction
Welcome back! In Part 1, you mastered triggers (what starts your flow) and standard actions (pre-built, no-code operations).
But what if you need to:
- Rename a list without using the deprecated action?
- Batch 50 item updates in one call?
- Grant custom permissions to a folder?
- Query data across sites?
Enter the Send an HTTP request to SharePoint action — your golden key to the full SharePoint REST API.
This action gives you 100% control. No more “I wish Power Automate had this action.” If SharePoint’s REST API can do it — you can do it.
In this advanced guide, we’ll:
- Master the HTTP action setup.
- Explore every major REST API endpoint with real Power Automate examples.
- Build pro-level patterns like batching, cross-site calls, and error handling.
Let’s go beyond the standard connector.
Section 1: Getting Started with the HTTP Action
What Is “Send an HTTP request to SharePoint”?
It’s a generic action that sends any HTTP request (GET, POST, PUT, DELETE, etc.) directly to SharePoint’s REST API.

| Input | Required? | Description |
|---|---|---|
| Site Address | Yes | Target SharePoint site URL |
| Method | Yes | GET, POST, PATCH, DELETE, MERGE |
| Uri | Yes | REST endpoint (e.g., /_api/web/lists) |
| Headers | Optional | JSON: Accept, Content-Type, X-RequestDigest |
| Body | Optional | JSON payload for POST/PATCH |
Authentication? Handled automatically via the SharePoint connector.
Step-by-Step: Your First HTTP Request
Goal: Get all lists in a site using REST (no standard action needed).
Flow Steps:
- Trigger: Manually trigger a flow
- Action:
Send an HTTP request to SharePoint- Site:
https://contoso.sharepoint.com/sites/HR - Method:
GET - Uri:
/_api/web/lists - Headers:
{ "Accept": "application/json;odata=verbose" }
- Site:
- Parse JSON (to read results)
- Schema (generate from sample):
{ "type": "object", "properties": { "d": { "type": "object", "properties": { "results": { "type": "array", "items": { /* List object */ } } } } } }
- Schema (generate from sample):
- Apply to each →
results→ Log listTitle
Output: Array of all lists with IDs, titles, item counts, etc.


Critical Headers You’ll Use Every Time
| Header | Value | When to Use |
|---|---|---|
Accept | application/json;odata=verbose | Always (for full JSON response) |
Content-Type | application/json;odata=verbose | POST/PATCH bodies |
X-RequestDigest | From /_api/contextinfo | Required for POST/PATCH/DELETE |
If-Match | * or ETag | Prevent overwrite conflicts |
X-HTTP-Method | MERGE or DELETE | Use with POST to simulate PATCH/DELETE |
How to Get X-RequestDigest (Form Digest)
Must-have for write operations.
Add this action first:
- Method:
POST - Uri:
/_api/contextinfo - Headers:
Accept: application/json;odata=verbose
Extract digest:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['GetContextWebInformation']?['FormDigestValue']
Store in a variable: varDigest

Section 2: All Available SharePoint REST API Calls
Here’s your complete cheat sheet — every major endpoint with:
- Method
- Endpoint
- Purpose
- Power Automate Uri
- Example Body/Headers
- Real Flow Snippet
Use odata=verbose for clarity. Switch to odata=nometadata in production for speed.
1. Site & Web Operations
| Method | Endpoint | Purpose | Uri in Flow | Example |
|---|---|---|---|---|
GET | /_api/web | Get current site info | /_api/web | Returns Title, URL, ServerRelativeUrl |
GET | /_api/site | Root site info | /_api/site | Useful for tenant root |
POST | /_api/web/webinfos/add | Create subsite | /_api/web/webinfos/add | Body below |
Create Subsite Example:
{
"parameters": {
"__metadata": { "type": "SP.WebInfoCreationInformation" },
"Url": "projects",
"Title": "Project Portal",
"Description": "Team project site",
"Language": 1033,
"WebTemplate": "STS#3"
}
}

2. Lists & Libraries
| Method | Endpoint | Purpose | Uri | Notes |
|---|---|---|---|---|
GET | /_api/web/lists | All lists | /_api/web/lists | Filter: $filter=Hidden eq false |
GET | /_api/web/lists/GetByTitle('Docs') | Get by title | /_api/web/lists/GetByTitle('Documents') | Case-sensitive |
POST | /_api/web/lists | Create list | /_api/web/lists | Body: {"__metadata":{"type":"SP.List"},"Title":"Tasks","BaseTemplate":100} |
POST + MERGE | /_api/web/lists/GetByTitle('List') | Update list | Same | If-Match: * |
POST + DELETE | /_api/web/lists/GetByTitle('List') | Delete list | Same | Requires site collection admin |

3. Items (CRUD)
| Method | Endpoint | Purpose | Uri Example |
|---|---|---|---|
GET | /_api/web/lists/GetByTitle('Tasks')/items | All items | Add $top=100, $filter=Status eq 'Open' |
POST | /_api/web/lists/GetByTitle('Tasks')/items | Create | Body: {"__metadata":{"type":"SP.Data.TasksListItem"},"Title":"Fix bug"} |
GET | /_api/web/lists/GetByTitle('Tasks')/items(5) | Get by ID | — |
POST + MERGE | /_api/web/lists/GetByTitle('Tasks')/items(5) | Update | If-Match: * |
POST + DELETE | /_api/web/lists/GetByTitle('Tasks')/items(5) | Delete | — |
Update Item with Dynamic Type:
{
"__metadata": {
"type": "SP.Data.TasksListItem"
},
"Status": "In Progress"
}
How to get __metadata.type?
Do a
GETon one item → copy from response.

4. Files & Folders
| Method | Endpoint | Purpose | Uri | Notes |
|---|---|---|---|---|
GET | /_api/web/GetFileByServerRelativeUrl('/sites/HR/Docs/report.pdf') | File metadata | Use encoded path | |
GET | /_api/web/GetFileByServerRelativeUrl('/...')/$value | Download file | Binary output | Use Compose + base64ToBinary |
POST | /_api/web/GetFolderByServerRelativeUrl('/Docs')/files/add(url='new.docx',overwrite=true) | Upload small file | Body: binary content | < 2MB |
PUT | /_api/web/GetFileByServerRelativeUrl('/Docs/big.pdf')/$value | Upload large file | Binary body | Use chunkedUpload for >10MB |
POST | /_api/web/folders | Create folder | Body: {"__metadata":{"type":"SP.Folder"},"Name":"2025"} | Nested OK |
Upload File via HTTP (Small < 2MB):
- Method:
POST - Uri:
/_api/web/GetFolderByServerRelativeUrl('/Documents')/files/add(url='@fileName',overwrite=true) - Body:
body('Get_file_content')(from previous action)

5. Permissions & Sharing
| Method | Endpoint | Purpose | Example |
|---|---|---|---|
GET | /_api/web/lists/GetByTitle('Docs')/items(1)/roleassignments | View permissions | — |
POST | /_api/web/lists/GetByTitle('Docs')/items(1)/breakroleinheritance(copyRoleAssignments=true) | Break inheritance | — |
POST | /_api/web/lists/GetByTitle('Docs')/items(1)/roleassignments/addroleassignment(principalid=12,roledefid=1073741827) | Grant Edit | roledefid: 1073741826=Read, 1827=Edit, 1829=Full |
6. Cross-Site & Batch Requests
Cross-Site Call
Use SP.AppContextSite(@target):
/_api/SP.AppContextSite(@target)/web/title?@target='<https://othersite.sharepoint.com/sites/Team>'
Batch Requests (Run 100 ops in 1 call)
Structure:
--batch_{guid}
Content-Type: multipart/mixed; boundary=changeset_{guid}
--changeset_{guid}
Content-Type: application/http
Content-Transfer-Encoding: binary
POST /_api/web/lists/GetByTitle('Tasks')/items HTTP/1.1
{ "Title": "Task 1" }
--changeset_{guid}--
--batch_{guid}--
Use Compose action to build full batch body.
See full example: MS Docs Batch
7. Search, Social, Fields & More
| Endpoint | Purpose |
|---|---|
/_api/search/query?querytext='contract' | Site search |
/_api/web/lists/GetByTitle('Tasks')/fields | Get all columns |
/_api/social.following/followed | Followed sites |
/_api/web/Lists/GetByTitle('List')/ContentTypes | Content types |
Section 3: Advanced Tips & Real-World Examples
Example 1: Batch Create 50 List Items
Use batch + changeset → 1 HTTP call instead of 50
Example 2: Auto-Provision Project Site
- HTTP: Create subsite
- HTTP: Create “Tasks” list
- HTTP: Grant access to the project team
- HTTP: Upload template files
Example 3: Sync Metadata Across Sites
- Trigger: File created
- HTTP (cross-site): Update item in central tracker
Troubleshooting Cheat Sheet
| Error | Cause | Fix |
|---|---|---|
403 Forbidden | Permissions | Run as site owner or check path (in uri – /sites not sites) |
400 Bad Request | Wrong __metadata.type | Copy from GET response |
411 Length Required | Missing digest | Add X-RequestDigest |
429 Too Many Requests | Throttling | Add Delay or reduce concurrency |
Invalid JSON | Malformed body | Use json() expression |
412 ETag Value | missing If-Match: * in Header | Add If-Match: * in Header |
Conclusion & Next Steps
You now own the full SharePoint REST API in Power Automate.
You Can Now:
Call any SharePoint endpoint
Batch hundreds of operations
Work cross-site
Replace deprecated actions
Build enterprise-grade automations
Your Action Plan
- Try this now: Use HTTP to create a list called
TestList_{{utcNow}} - Build a batch flow for bulk item creation
- Replace one deprecated action in an old flow
- Join the community: Share your HTTP flow on the Power Automate Community
Resources
- Official REST API Docs
- OData Query Cheat Sheet
- Batch Requests Guide
- Postman Collection for SharePoint REST
What will you build with HTTP actions?
Comment below — let’s feature your flow in the next post! 🔥

Leave a comment