pnp / pnpjs

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
https://pnp.github.io/pnpjs/
Other
749 stars 305 forks source link

How to send recurrence emails without using Power Automate? #2928

Closed bhoomesh-spe closed 7 months ago

bhoomesh-spe commented 7 months ago

What version of PnPjs library you are using

3.x

Minor Version Number

3.15.0

Target environment

SharePoint Framework

Additional environment details

SharePoint Online, SPFx

Question/Request

Hello All,

I am using SharePoint Online and I have created one list for store Requests.

This list contains columns like Title, Description, Start Date, End Date, etc..

I have created an SPFx solution for inserting/updating/deleting data from the Requests list.

I have used @pnp/sp/utilities to send an email while inserting/updating items in the Requests list.

There is one column End date in the Request list.

Now, I need to send a reminder email after 2 days of the End Date.

Can anyone suggest a way to send an email without using Power Automate (Flow)?

Thanks

juliemturner commented 7 months ago

Azure Function with a timer trigger.

bhoomesh-spe commented 7 months ago

@juliemturner - Thanks for the quick response. Can I use that in the SPFx React solution? Also, for that do I need to give Admin Concern?

juliemturner commented 7 months ago

Azure functions aren't related to the SharePoint Framework and since there is no UI, ReactJS isn't part of it. Essentially, it's just a bit of code (can be TypeScript/Javascript running on NodeJS, C# running on .NET, PowerShell, and a whole host of other languages) that is triggered on a timer to run. By the name you might infer that it runs in Azure and you would need a subscription, although depending on how frequently you run it and how much it does it would likely be free or next to free. You would authorize the Azure function to access your SharePoint environment through managed identity and a service principal, but you would have to have access enough in Azure to do that or you'd need someone with that level of access to grant it for you.

patrick-rodgers commented 7 months ago

Closing this issue as answered. If you have additional questions or we did not answer your question, please open a new issue, ref this issue, and provide any additional details available. Thank you!

github-actions[bot] commented 7 months ago

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.