Skip to content

Commit 1d00384

Browse files
Merge pull request #1 from MattCollins-Jones/MattCollins-Jones-OutLookLunch
Uploaded Outlook check Lunch solution
2 parents d7c23c5 + 9e5b082 commit 1d00384

File tree

9 files changed

+88
-0
lines changed

9 files changed

+88
-0
lines changed
29 KB
Loading
19.3 KB
Loading
36 KB
Loading
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Outlook - Check if meeting conflicts with lunch
2+
3+
## Summary
4+
5+
This flow checks when new appointments are added to your outlook calendar. If checks to see if an existing appointment titled "Lunch". If the appointment that was sent clashes with the Lunch appointment you have in your Outlook Calendar, it sends a reply to the person. This is configurable to the domain the person sent it from. In this sample, it rejects the appointment if it's sent by someone internally and tentatively accepts if sent externally. Both have configurable messages to each of the replies.
6+
7+
![Collapsed Flow](assets/CollapseFlow.png)
8+
![Check Conditions](assets/CheckConditions.png)
9+
![Whole Flow](assets/WholeFlow.png)
10+
11+
## Applies to
12+
13+
* [Microsoft Power Automate](https://docs.microsoft.com/power-automate/)
14+
* [Microsof Outlook](https://learn.microsoft.com/en-us/outlook/)
15+
16+
## Compatibility
17+
18+
![Premium License](https://img.shields.io/badge/Premium%20License-Not%20Required-green.svg "Premium license not required")
19+
![On-Premises Connectors](https://img.shields.io/badge/On--Premises%20Connectors-No-green.svg "Does not use on-premise connectors")
20+
![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-Not%20Required-green.svg "Does not use custom connectors")
21+
22+
## Authors
23+
24+
Solution|Author(s)
25+
--------|---------
26+
folder name | [Matt Collins-Jones](https://github.com/MattCollins-Jones) ([@D365Geek](https://github.com/MattCollins-Jones))
27+
28+
## Version history
29+
30+
Version|Date|Comments
31+
-------|----|--------
32+
1.0|Feburary 11, 2022|Initial release
33+
34+
## Features
35+
36+
This sample demonstrates:
37+
38+
* Triggering a flow from an Outlook Appointment being receieved
39+
* Filtering an Outlook Calendar to and retrieving entries using the time from the trigger and a keyword "Lunch"
40+
* Replying to the appointment
41+
* Customisable message for people internal or external to the company you work but this can be customised further for specific email domains
42+
43+
44+
## Minimal Path to Awesome
45+
46+
* [Download](./solution/Sample.zip) the `.zip` from the `solution` folder
47+
* Within **Power Automate Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
48+
49+
## Using the Source Code
50+
51+
You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps::
52+
53+
* Clone the repository to a local drive
54+
* Pack the source files back into a solution `.zip` file:
55+
```bash
56+
pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps
57+
```
58+
Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder)
59+
* Within **Power Automate Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
60+
61+
## Disclaimer
62+
63+
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
64+
65+
## Help
66+
67+
68+
We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
69+
70+
If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/powerautomate-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=YOURSAMPLENAME&authors=@YOURGITHUBUSERNAME&title=YOURSAMPLENAME%20-%20).
71+
72+
For questions regarding this sample, [create a new question](https://github.com/pnp/powerautomate-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=YOURSAMPLENAME&authors=@YOURGITHUBUSERNAME&title=YOURSAMPLENAME%20-%20).
73+
74+
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerautomate-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=YOURSAMPLENAME&authors=@YOURGITHUBUSERNAME&title=YOURSAMPLENAME%20-%20).
75+
76+
## For more information
77+
78+
- [Create your first flow](https://docs.microsoft.com/en-us/power-automate/getting-started#create-your-first-flow)
79+
- [Microsoft Power Automate documentation](https://docs.microsoft.com/en-us/power-automate/)
80+
81+
82+
<img src="https://telemetry.sharepointpnp.com/powerautomate-samples/samples/readme-template" />
83+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"shared_office365":"837008d6-4f3a-404d-93fd-25a549106e30"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"shared_office365":"0fa648b9-1075-4002-a0bb-42ae542e5f9d"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"48d115e6-4a29-414f-9649-baf73a9d11ce","id":"/providers/Microsoft.Flow/flows/48d115e6-4a29-414f-9649-baf73a9d11ce","type":"Microsoft.Flow/flows","properties":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_logicflows","displayName":"Outlook - Check if Conflicts with Lunch","definition":{"metadata":{"workflowEntityId":null,"processAdvisorMetadata":null,"flowclientsuspensionreason":"None","flowclientsuspensiontime":null,"creator":{"id":"bc9b2c30-f572-4c08-848c-5b610d19d918","type":"User","tenantId":"93ae279c-fe6d-4b8e-a851-aa4463187a47"},"provisioningMethod":"FromDefinition","failureAlertSubscription":true,"clientLastModifiedTime":"2022-02-14T17:15:33.675471Z"},"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"},"$authentication":{"defaultValue":{},"type":"SecureObject"}},"triggers":{"When_an_event_is_added,_updated_or_deleted_(V3)":{"splitOn":"@triggerOutputs()?['body/value']","metadata":{"operationMetadataId":"7c94f170-e23b-4daf-a43a-45c49c619de3"},"type":"OpenApiConnectionNotification","inputs":{"host":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_office365","connectionName":"shared_office365","operationId":"CalendarGetOnChangedItemsV3"},"parameters":{"table":"AAMkADFmNmZkZDgyLWJmYzctNGI1Mi04YTM3LTQ0OTAwZjI5NDg2MABGAAAAAABEx8r0d0KLT5HwlNDHZMznBwBvo3hxj5iHS7nzuFP6_9VyAAAAAAEGAABvo3hxj5iHS7nzuFP6_9VyAAACq97NAAA=","incomingDays":300,"pastDays":50},"authentication":"@parameters('$authentication')"},"conditions":[{"expression":"@not(equals(triggerOutputs()?['body/ActionType'], 'deleted'))"}],"description":"This filters Deleted events, just update the calendar to be the right calendar."}},"actions":{"Terminate":{"runAfter":{"Check_if_lunch_exists_at_this_time":["Succeeded"]},"metadata":{"operationMetadataId":"04a354d5-3de5-447a-8f7c-77da0e696abc"},"type":"Terminate","inputs":{"runStatus":"Succeeded"}},"Get_event_(V3)":{"runAfter":{},"metadata":{"operationMetadataId":"cd66ec51-a995-4815-9609-1855bbafbe67"},"type":"OpenApiConnection","inputs":{"host":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_office365","connectionName":"shared_office365","operationId":"V3CalendarGetItem"},"parameters":{"table":"AAMkADFmNmZkZDgyLWJmYzctNGI1Mi04YTM3LTQ0OTAwZjI5NDg2MABGAAAAAABEx8r0d0KLT5HwlNDHZMznBwBvo3hxj5iHS7nzuFP6_9VyAAAAAAEGAABvo3hxj5iHS7nzuFP6_9VyAAACq97NAAA=","id":"@triggerOutputs()?['body/id']"},"authentication":"@parameters('$authentication')"}},"Get_calendar_view_of_events_(V3)":{"runAfter":{"Get_event_(V3)":["Succeeded"]},"metadata":{"operationMetadataId":"1998a542-e971-4e36-92d0-570bbcd3ffba"},"type":"OpenApiConnection","inputs":{"host":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_office365","connectionName":"shared_office365","operationId":"GetEventsCalendarViewV3"},"parameters":{"calendarId":"AAMkADFmNmZkZDgyLWJmYzctNGI1Mi04YTM3LTQ0OTAwZjI5NDg2MABGAAAAAABEx8r0d0KLT5HwlNDHZMznBwBvo3hxj5iHS7nzuFP6_9VyAAAAAAEGAABvo3hxj5iHS7nzuFP6_9VyAAACq97NAAA=","startDateTimeUtc":"@addMinutes(triggerOutputs()?['body/start'],1)","endDateTimeUtc":"@addMinutes(triggerOutputs()?['body/end'],-1)","search":"Lunch"},"authentication":"@parameters('$authentication')"}},"Check_if_lunch_exists_at_this_time":{"actions":{"Check_if_internal_or_external_contact":{"actions":{"Send_Decline_to_Internal_Contact":{"runAfter":{},"metadata":{"operationMetadataId":"0f89f3d9-eccb-4926-8a5f-07a02cf7925f"},"type":"OpenApiConnection","inputs":{"host":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_office365","connectionName":"shared_office365","operationId":"RespondToEvent_V2"},"parameters":{"event_id":"@triggerOutputs()?['body/id']","response":"decline","body/Comment":"You have tried to schedule an event during my lunch hours, please reschedule else I will not be in attendance.","body/SendResponse":true},"authentication":"@parameters('$authentication')"}}},"runAfter":{},"else":{"actions":{"Send_Polite_Tentative_Accept":{"runAfter":{},"metadata":{"operationMetadataId":"6127e02c-134c-46c9-97d3-42c1cb1e859b"},"type":"OpenApiConnection","inputs":{"host":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_office365","connectionName":"shared_office365","operationId":"RespondToEvent_V2"},"parameters":{"event_id":"@triggerOutputs()?['body/id']","response":"tentativelyAccept","body/Comment":"Hello\n\nI'm afriad you have sent me an invite that clashes with my lunch. I hope you can appreciate we all needs breaks. If you could re-arrange that would be great, if not please let me know and I will try and take my break at another time if possible, but I cannot gaurentee my attendance.\n\nKind Regards","body/SendResponse":true},"authentication":"@parameters('$authentication')"}}}},"expression":{"contains":["@triggerOutputs()?['body/organizer']","companyEmail.com"]},"metadata":{"operationMetadataId":"ee2cb2a4-0178-41a7-b2fb-50f60601a91b"},"type":"If"}},"runAfter":{"Get_calendar_view_of_events_(V3)":["Succeeded"]},"expression":{"equals":["@length(outputs('Get_calendar_view_of_events_(V3)')?['body/value'])",1]},"metadata":{"operationMetadataId":"ff894bfb-eb9f-4b2e-ad59-bc0df570fe67"},"type":"If"}},"outputs":{}},"connectionReferences":{"shared_office365":{"connectionName":"shared-office365-c8abcb91-e34c-454b-97d1-546648006876","source":"Embedded","id":"/providers/Microsoft.PowerApps/apis/shared_office365","tier":"NotSpecified"}},"flowFailureAlertSubscribed":false}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"packageSchemaVersion":"1.0","flowAssets":{"assetPaths":["04e61882-79fa-4668-803e-b26699ee94ab"]}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schema":"1.0","details":{"displayName":"Outlook - Check if Conflicts with Lunch V1.1","description":"","createdTime":"2022-02-14T17:27:21.7475124Z","packageTelemetryId":"2e29b6d7-10d1-4501-be24-80e3f254f983","creator":"N/A","sourceEnvironment":""},"resources":{"04e61882-79fa-4668-803e-b26699ee94ab":{"type":"Microsoft.Flow/flows","suggestedCreationType":"New","creationType":"Existing, New, Update","details":{"displayName":"Outlook - Check if Conflicts with Lunch"},"configurableBy":"User","hierarchy":"Root","dependsOn":["837008d6-4f3a-404d-93fd-25a549106e30","0fa648b9-1075-4002-a0bb-42ae542e5f9d"]},"837008d6-4f3a-404d-93fd-25a549106e30":{"id":"/providers/Microsoft.PowerApps/apis/shared_office365","name":"shared_office365","type":"Microsoft.PowerApps/apis","suggestedCreationType":"Existing","details":{"displayName":"Office 365 Outlook","iconUri":"https://connectoricons-prod.azureedge.net/releases/v1.0.1538/1.0.1538.2621/office365/icon.png"},"configurableBy":"System","hierarchy":"Child","dependsOn":[]},"0fa648b9-1075-4002-a0bb-42ae542e5f9d":{"type":"Microsoft.PowerApps/apis/connections","suggestedCreationType":"Existing","creationType":"Existing","details":{"displayName":"[email protected]","iconUri":"https://connectoricons-prod.azureedge.net/releases/v1.0.1381/1.0.1381.2096/office365/icon.png"},"configurableBy":"User","hierarchy":"Child","dependsOn":["837008d6-4f3a-404d-93fd-25a549106e30"]}}}

0 commit comments

Comments
 (0)