cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JosuOte
Frequent Visitor

Creating all day event in sharepoint

Hi,

 

Im trying to create an all day event after an item is created in sharepoint with the "send a request http to sharepoint" block but no event is getting created. I've tested a couple of different things found on the forum but none seemed to help me. The variable that is being declared before the block takes the date of a created item and adds 'X' days to that date. The expression works, I've been using it in another flow. The expression looks like this:

 

addDays(triggerOutputs()?['body/Nueva_x0020_columna1'], 2, 'yyyy-MM-dd')
 
Where 2 is the amount of days added to the inital date.
 
I'll leave an image of how the flow looks.
http request.PNG
 
If more information is needed, feel free to ask,
 
Thanks in advance,
 
JosuOte
4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @JosuOte,

 

Can you try and use the following body without the metadata? The headers in this example are slightly different.

 

Headers

{
  "Accept": "application/json;odata=nometadata",
  "Content-Type": "application/json;odata=nometadata"
}

 

Body

{
"Title": "All Day Event Test",
"EventDate": "@{variables('Date')}",
"fAllDayEvent": true
}

 

eventlisttest.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus,

 

Thank you very much for the response,

 

I tried what you said and it doesnt seem to work in my side, I can show you the entire flow. The block on the left just creates an event on the calendar using a "date" field in a list and adds "X" days(im using this to know that the flow has run and to compare).

full-flow.PNG

 

But as you can see in the next image, the event is created by default at 1:00(with the left block).

calendario.PNG

 

If there is anything else you would try, please let me know.

 

Thank you very much in advance,

 

Josu

 

Expiscornovus
Super User
Super User

Hi @JosuOte,

 

For your variable I would use the following expression. I don't think you will need formatting.

addDays(triggerOutputs()?['body/Nuevacolumn1'], 2)

 

Btw, can you also share a screenshot of your flow run? Specifically of the Send an HTTP Request to SharePoint action? I am interested to see what the EventDate value is, the flow is trying to input.

 

eventdate_inputs.png

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus,

 

Thanks,

 

I will be using that expression now. Here you have the screenshot. I noticed there is no time value nor in the flow run nor the actual column in the list.

flow run.PNG

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,516)