Lead-management instructions for Table storage

This article describes how to configure Azure Table storage to manage sales leads. Table storage helps you store and modify customer information.

Configure Table storage

  1. If you don't have an Azure account, create a free trial account.

  2. After your account is active, sign in to the Azure portal.

  3. In the Azure portal, follow these steps:

    1. Select +Create a resource in the pane on the left side. The New pane will open.
    2. In the New pane, select Storage. A Featured list will open on the right side.
    3. Select Storage account. Then, follow the instructions at Create a storage account.

    Create an Azure storage account

    For more about storage accounts, see Quickstart tutorials. For pricing information, see Azure storage pricing.

  4. Wait until your storage account is provisioned, which typically takes a few minutes. Then, access the account from the home page of the Azure portal: Select See all your resources or All resources in the navigation pane.

    Access your Azure storage account

  5. From your storage account pane, copy the storage account connection string for the key. Paste it in the Connection String field for the storage account in the Cloud Partner Portal.

    Example connection string:


    Azure storage key

You can use Azure Storage Explorer or a similar tool to see the data in your table storage. You can also export data from it.

Use Microsoft Flow with Table storage (optional)

You can use Microsoft Flow to automatically send notifications when a lead is added to your table storage. If you don't have a Microsoft Flow account, sign up for a free account.

Lead notification example

This example shows how to create a basic flow. The flow automatically sends an email notification hourly when new leads are added to your table storage.

  1. Sign in to your Microsoft Flow account.

  2. In the navigation pane on the left side, select My flows.

  3. In the top navigation bar, select +New.

  4. From the drop-down list, select +Create from blank.

  5. Under Create a flow from blank, select Create from blank.

    Create a new flow from blank

  6. On the connectors and triggers search page, select Triggers.

  7. Under Triggers, select Recurrence.

  8. In the Recurrence window, keep the default setting of 1 for Interval. From the Frequency drop-down list, select Hour.


    This example uses a one-hour interval. But you can select an interval and frequency that best fits your business needs.

    Set a 1-hour frequency for recurrence

  9. Select +New step.

  10. Search for Get past time, and then select Get past time under Choose an action.

    Find and select the "get past time" action

  11. In the Get past time window, set the Interval to 1. From the Time unit drop-down list, select Hour.


    Make sure that the Interval and Time unit match the interval and frequency that you configured for recurrence (step 8).

    Set the get past time interval


    You can check your flow at any time to verify that each step is configured correctly: Select Flow checker from the Flow menu bar.

In the next set of steps, you connect to your storage table and set up the processing logic to handle new leads.

  1. After the Get past time step, select +New step, and then search for Get entities.

  2. Under Actions, select Get entities, and then select Show advanced options.

  3. In the Get entities window, fill in the following fields:

    • Table: the name of your table storage. The following image shows "MarketPlaceLeads" entered:

      Pick a custom value for Azure table name

    • Filter Query: When you select this field, the Get past time icon is displayed in a pop-up window. Select Past time to use this value as a timestamp to filter the query. Or, you can paste the following function into the field:

      CreatedTime Timestamp gt datetime'@{body('Get_past_time')}'

      Set up the filter query function

  4. Select New step to add a condition to scan your table storage for new leads.

    Use "New step" to add a condition to scan table storage

  5. In the Choose an action window, select Actions, and then select Condition Control.

    Add a condition control

  6. In the Condition window, select Choose a value, and then select Expression in the pop-up window.

  7. Paste length(body('Get_entities')?['value']) in the fx field. Select OK to add this function.

    Add a function to the condition

  8. Set up the action to take based on the result of the condition.

    1. Select is greater than from the drop-down list.
    2. Enter 0 as the value.

    Set up an action based on condition results

  9. If the condition resolves to "If no," don't do anything.

    If the condition resolves to "If yes," trigger an action that connects your Office 365 account to send an email:

    1. Select Add an action.

    2. Select Send an email.

    3. In the Send an email window, enter information in the following fields:

      • To: an email address for everyone who will get the notification.

      • Subject: a subject for the email. For example: New leads!

      • Body: the text that you want to include in each email (optional). Also paste in body('Get_entities')?['value'] as a function to insert lead information.


        You can insert additional static or dynamic data points in the body of the email.

      Set up email for lead notification

  10. Select Save to save the flow. Microsoft Flow will automatically test it for errors. If there aren't any errors, your flow starts running after it's saved.

    The following image shows an example of how the final flow should look.

    Final flow sequence

    (Select the image to enlarge it.)

Manage your flow

It's easy to manage your flow after it's running. You have complete control over your flow. For example, you can stop it, edit it, see a run history, and get analytics. The following image shows the flow-management options.

Flow-management options

The flow keeps running until you select Turn flow off.

If you're not getting any lead email notifications, no new leads have been added to your table storage. You'll get an email like the following example if a flow failure occurs:

Flow failure email notification

Next steps

Configure customer leads