Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community
LIVE

Problem creating a list using Power Automate

Copper Contributor

Hi everyone,

 

I'm trying to automatically create a list through Power Automate using the "Send a HTTP Request to Sharepoint". 

It seems I have some problems with the headers (encabezados) or body (cuerpo):

DiegoQUIBIM_2-1706199644951.png

because I always recieve the following error:

DiegoQUIBIM_1-1706199370126.png

any idea on how to solve this issue?

 

Thanks,

Regards,

Diego.

2 Replies
Hello DiegoQuibim, When creating a list using "Send a HTTP Request to SharePoint" in Power Automate, ensure you're providing the correct headers and body. Here's an example: **Headers:** - Key: Accept, Value: application/json;odata=verbose - Key: Content-Type, Value: application/json;odata=verbose - Key: Authorization, Value: Bearer YOUR_ACCESS_TOKEN Note: Replace YOUR_ACCESS_TOKEN with the actual access token or ensure your HTTP request is authenticated properly. **Body:** You need to define the properties for your list in the body. Here's an example: ```json { "headers": { "__metadata": { "type": "SP.List" }, "AllowContentTypes": true, "BaseTemplate": 100, "ContentTypesEnabled": true, "Description": "Your list description", "Title": "Your List Name" } } ``` Make sure to customize "Description" and "Title" according to your list requirements. Remember, authentication is crucial for SharePoint requests. Ensure that you have the necessary permissions and the access token is valid. If you encounter specific issues or errors, feel free to share more details, and I can provide further assistance. Have a great day DiegoQuibi!
Thank you Elgin for your prompt response!
I believe my problem is with the ACCESS_TOKEN. Do you know how can I get the actual access token?