Sample Flow With Sharing: Give Guest Users Access to Read Records

In this sample flow, the guest user enters a date range and then views events within that range. The guest user has read access to the records with sharing rules, so the guest user profile determines which fields the flow can access.

Before you give read access to guest users, see Give Guest Users Access to Read Records.

Important

The sample flow with numbered elements

Flow Configuration

Because the guest user has access to the records via sharing rules, set the How to Run the Flow setting to User or System Context—Depends on How Flow is Launched.

Enter Date Range (1)

The first element in the flow is a screen that displays start and end date input fields. The element saves the input dates in the variables Start_Date and End_Date.

Get Events (2)

The next element is a Get Records query that selects events if they match these criteria:
  • The event’s StartDateTime is greater than the Start_Date variable.
  • The event’s EndDateTime is less than the End_Date variable.
  • The event’s isPrivate value is False.
  • The event’s isArchived value is False.

The element saves the selected events in the GetEvents variable.

Loop Records (3)

The Loop element loops over each event in the GetEvents variable.

Inside the loop, the Assignment element appends each event’s StartDateTime, EndDateTime, Subject, and Location to a string.

Show Events (4)

The final element is a screen that displays the string that contains all the events.