Learn how easy it is to create an event-driven flow in App Connect Designer that when a new event is created in Eventbrite automatically creates a site in Microsoft Sharepoint online, adds a list to the site, and then posts a message in Slack.

Note: This tutorial assumes that you have signed up for free or trial accounts for Eventbrite, Office 365 business online, and Slack, or that you have business accounts.

Additional reference:

Scenario:

Your company is using sites in Microsoft Sharepoint online to store and collaborate on new events, sharing files and lists of information for each event that you manage in Eventbrite. When a new event is created in Eventbrite, you want to automatically create a site for the event in Sharepoint, create a list in the new site, and then post a message in Slack to notify the event team.

Screenshot of the “Create Sharepoint team site for new event” flow tile on the App Connect dashboard

Time required:
If you have already connected Eventbrite, Sharepoint, and Slack to App Connect, the steps to create and test the integration flow in this tutorial should take only a few minutes.

First, find or create everything you need:

  1. Obtain an App Connect on IBM Cloud service. You can use an App Connect service that you already have or can sign up for App Connect.

    In this example, we use a new free App Connect – Lite plan service.

  2. Obtain account details for connecting App Connect to your integrating applications:
    • (If you haven’t already connected App Connect to your Eventbrite account) The email address and password of your Eventbrite account
    • (If you haven’t already connected App Connect to your Sharepoint online account) The SharePoint online URL that provides a direct sign-in to the Microsoft SharePoint service; for example, https://myorganization.sharepoint.com.
    • (If you haven’t already connected App Connect to your Slack account) Your team’s Slack URL.
      Note: If your team isn’t using Slack yet, you can get started with Slack (without charge) and create a Slack workspace at https://slack.com/pricing/free.

Next, create your flow:

Using the IBM App Connect Designer authoring experience, you can create your flow from a template, or from scratch if you want to explore the steps taken to create a flow.

Creating the flow from the template

This enables you to create the flow immediately, and then select each node in the flow to validate the node and select the application accounts that you want to use.

Template name: “Create Sharepoint team site for new event”

After creating a flow from the template, you can continue to start and test your flow.

Creating the flow from scratch

This enables you to explore the steps taken to create the flow from scratch, like to create the template.

Create Sharepoint team site for new event flow diagram (Click image to view full size.)

  • Details

    1. Log in to App Connect Designer, such as from your IBM Cloud resource list.
    2. Click the Catalog tab, and there connect App Connect to Eventbrite, Sharepoint, and Slack. This enables you to concentrate on configuring the event and actions in the flow editor, using the connection accounts you’ve already created. (You can connect applications in the flow editor, but you should find it more convenient to use the Catalog tab to create and manage connection accounts.)

      The following steps assume that you have used the Catalog tab to connect App Connect to Eventbrite, Sharepoint, and Slack.

    3. From the Dashboard, click New > Event-driven flow.

      Hint: As you progress, App Connect automatically saves your changes. If you navigate away from the flow at any stage, the flow is saved as a draft flow that you can complete at another time.

    4. Enter a name that identifies the purpose of your flow, for example: Create Sharepoint team site for new event
    5. Select Eventbrite as your first application (source).
    6. Select Events > New event as the flow event that will trigger the flow to perform actions in Sharepoint and Slack.
    7. Click the next (+) and then select Microsoft SharePoint as your second application.
    8. Select Sites > Create site.
    9. Configure the Create site action
      • Parent site path: This field is optional.
        • If you leave this field empty, the action will create a subsite of the root site.
        • If you specify any site path (Subsite or SiteCollection) like /sitename/, the action will create a subsite for that Site.

        For the template, we left this field empty, to create a subsite of the root site.

      • Title: This field is required. Specify the title that you want to label the site in Sharepoint.

        For the template, we mapped the event name from Eventbrite:

        1. Click in the Title field, then click the Insert a reference icon
        2. Click Event name from under Event / Name.
      • URL: The name of the site URL to be used after the full path to the parent site. You do not need to end the value with a leading forward slash (“/”).

        For example, a URL value of Sample Event creates a subsite (under the root site) with the full path:

        https://myorganization.sharepoint.com/Sample%20Event

        For the template, we again mapped the event name from Eventbrite; for example, using the type and prompt technique:

        1. Click in the Title field, type event then pause briefly
        2. From the prompt window, click Event name from under Name.

        The Event name value could be sentence style; for example: “Hello World 2020”. You can use JSONata functions to change this, such as to remove space characters to become “HelloWorld2020”; to do this you could use the Insert a function feature or copy and paste the following into the URL field:

        {{$replace($Trigger.name.html, " ", "")}}

      • Web template: This field is required. It specifies the template to be used to create the site.

        The default, STS, is the standard value for Web template for creating sites.

        For the template, we left the default value, STS.

      (Click image to view full size.)

    10. Click the next (+) and then select Microsoft SharePoint as your second application.
    11. Select Sites > Retrieve sites. This gives an example of retrieve actions, and we’ll use some of the data returned about the site that was just created.
    12. Configure the Retrieve sites action to retrieve only the one site we’ve just created.

      Click Add condition. In the Site path field (after “equals”) enter the path in the form /siteurl. Type a forward slash (/) and then map the Event name field (the same mapping you used for URL in the Create site action). You can use either of the techniques as before, or copy and paste the value from the Create site action. This gives a value of /{{$Trigger.name.html}}

      Only one site can have that name, so you do not need to change the “Maximum number of items to retrieve” value. However, change the value to 1, to prevent the retrieve action returning an array and later actions displaying messages about the array.

      Also, if the Create site action had failed, the flow would have stopped at that action, so there is no need to change the “If no items are found:” option.

      (Click image to view full size.)

    13. Click the next (+) and then select Microsoft SharePoint as your second application.
    14. Select Lists > Create list.
    15. Configure the Create list action, to create a list in the site just created.
      Information

      The Site field offers a dropdown list for you to select the name of a subsite that already exists under the root site. To select a subsite under another site or site collection, you can use the advanced mode to edit the action fields.

      For the template we used the advanced mode to map the site path from the Retrieve sites action.

      1. Click the Mapping options menu (⋮) next to the Edit sample data icon, then click “Switch to advanced mode”:

        (Click image to view full size.)

      2. Click in the Site field, type “path”, pause briefly, and then select Site path from under Microsoft SharePoint / Retrieve sites

        If you hover the mouse pointer over the Site path value, you can see the expression used for the value. This can be useful to confirm that you have mapped from the Retrieve sites action, which has the expression: $MicrosoftSharePointRetrievesites.ServerRelativeUrl

      3. In the Allow content types field, select the True option.
      4. Click in the Base template field, then type the number of the list definition type for the list:
        • 100: General list
        • 102: Survey
        • 103: Links list
        • 104: Announcements list
        • 105: Contacts list
        • 106: Events list
        • 107: Tasks list
        • 108: Discussion list
        • 109: Picture library
        • 115: XML forms library

        For the template we entered 105 to create a contacts list.

      5. Click in the Description field, and enter a description for the list. You can type text and map fields from the Eventbrite event and other actions in the flow.

        For the template we entered Attendees for event {{$Trigger.name.html}} You can copy and paste this into the Description field

      6. Click in the Title field, and enter a title for the list to be shown in the Site contents page. You can type text and map fields from the Eventbrite event and other actions in the flow.

        For the template we entered Attendees

      (Click image to view full size.)

    16. Click the (+) and then select Slack as your last application.
    17. Select Message > Create Message as the Slack action.
    18. Select the channel that you want to post the message to. For the purpose of this tutorial I chose general so that everybody can see the message. You can also choose to select a user or multiple users if you have them set up.
    19. Next, in the Text field we specify the message to be posted. To do this, you can type text and map from the Eventbrite event and other actions in the flow.

      For the template, we entered the following text and mappings (Eventbrite event name and start date, and the Retrieved site title and URL):

      Check out the new Sharepoint site created for event {{$Trigger.name.html}} (Start date UTC {{$Trigger.start.utc}}).  Sharepoint site: {{$MicrosoftSharePointRetrievesites.Title}} - {{$MicrosoftSharePointRetrievesites.Url}}

      You can copy and paste this into the Text field.

      (Click image to view full size.)

Start your flow:

You have completed the flow. Although you can start the flow from within the flow editor, let’s return to the dashboard and start the flow from its tile there, where we will then monitor the invocation of the flow.

  1. Click the Dashboard tab.
  2. On the flow tile, click the options menu (⋮) and then select Start.

The flow is now running, waiting to be triggered when a new event is created in your Eventbrite account.

Finally, test your flow:

  1. Log in to Eventbrite, Microsoft Sharepoint online, and Slack with the accounts that you configured in App Connect.
  2. In Eventbrite, create a new event.

    A moment later, you will receive a message in Slack notifying you about the new event.

    (Click image to view full size.)

  3. Return to the App Connect dashboard, where you should see a green tick on the flow tile indicating that the flow completed succesfully.

    (Click image to view full size.)

  4. In Sharepoint, you can check for the new site, and the list within that site; for example:

    (Click image to view full size.)

You can also test individual actions with sample data without starting the flow.

Troubleshooting

If a Sharepoint action fails, it returns an error message “We couldn’t connect to the Microsoft SharePoint instance that you specified” with statusCode: 500. For example, if you try to create a Sharepoint resource with the same name as an existing resource of the same type. Another possible cause is if you have not specified a path with the correct syntax; for example, a site path value in the form /siteurl.

You can check the App Connect log to identify the failing action, and then check the values that you have configured for the action fields. If you want to see more detail in the log, you can enable debug logging.

Join The Discussion

Your email address will not be published. Required fields are marked *