Lucy
  • Introduction to Lucy
  • Getting Started
  • Key Components
  • Gallery (Dashboards)
    • Creating a Canvas
    • Editing Properties of a Canvas
    • Searching and Viewing Your Canvases
    • Adding Widgets onto Your Canvas
    • Customising User-created Widgets on a Canvas
    • Adjusting Widget Settings
    • Moving a Widget around a Canvas
    • Resizing a Widget on a Canvas
    • Filtering Data in a Widget
    • Deleting a Widget from Your Canvas
    • Building a Widget from Your Canvas
    • Customising a Canvas
  • My Work (Folders)
    • Creating a New Folder
    • Searching and Viewing Your Folders
    • Adding Notes related to a Folder
    • Databases
      • Understanding Databases
      • Creating and Editing Databases
        • Creating a Database Manually
        • Creating a Database by Importing Data from an External Source
        • Using an External Source as a Database
        • Editing Fields in a Database
      • Editing Data in a Database
      • Using the Database Collection Viewer
      • Searching, Filtering, and Sorting Data in a Database
      • Exporting Data from a Database
      • Utilising Content-aware Autofill to Automatically Fill in Fields in Your Database
      • Entering a Question about Databases within a Folder to Build Your Own Widget
      • Adding Data into a Database
    • User Interfaces
      • Designing a User Interface
        • Designing a User Interface to Visualise Information
        • Designing a User Interface to Capture User Feedback
        • Designing a User Interface from Scratch
      • Working with the Widget Designer
      • Selecting a Widget Template
        • Item List Widget Template
      • Viewing Your User Interfaces
      • Sharing a User Interface
      • Saving a Widget as a Template
      • Exporting a User Interface
      • Enabling Anonymous Access to a User Interface
    • Workflows and Integrations
      • Using the Workflow Editor
      • Creating Workflows
      • Creating a Workflow to Run When New Data is Added to a Database
      • Creating a Workflow to Run When an Email is Received
      • Creating a Workflow to Run When a Message from a Chatbot is Received
      • Creating a Workflow that Runs at Specified Intervals
      • Viewing and Editing Your Workflows
      • Automating Form Submission with Email Notification
      • Automating Form Submission with Slack Message
  • Add-ons
    • Installing a New Add-on in Lucy
    • Visitor Management
    • Monitoring Internal Air Quality (IAQ) at Your Workplace
    • Setting up Occupancy Analytics at Your Workplace
    • Energy Budgeting
    • Water Budgeting
    • Gas Budgeting
    • Carbon Footprint Calculation
    • Weather
  • Mobile App
    • Getting Started
    • Designing Your Mobile App
      • Working with the Mobile App Designer
      • Handling Button Click Events
      • Designing the Login Page
      • Designing the Homepage
      • Designing the Settings Page
      • Choosing a Page Type
      • Adding a New Tab to the Bottom Navigation Bar
      • Launching a Widget on Tab Click
  • Users
    • Registering a User
    • Creating a User Group
    • Searching and Viewing Users
    • Editing User Details
    • Your Profile
  • News Feeds
    • Creating a News Feed
    • Searching and Viewing News Feeds
    • Editing a News Feed
Powered by GitBook
On this page
  • 1) Setting Up Email Forwarding
  • 2) Creating a Database with Content-Aware Autofill Feature
  • Utilising Content-Aware Autofill to Automatically Populate Your Database
  • 3) Creating the Workflow
  • 3) Testing the Workflow
  1. My Work (Folders)
  2. Workflows and Integrations

Creating a Workflow to Run When an Email is Received

Automating tasks can greatly improve workflow efficiency. One effective approach is setting up a workflow that initiates when an email is received.

Learn how to create a workflow to handle incoming emails and save them in a database. To handle incoming emails, we need to forward them to a designated address and then send the data to a database.

For example, we can create a simple workflow to categorise each email we receive from clients as either an 'Order' or an 'Inquiry' and store them in a database.

Here are the basic steps to achieve that.

  1. Setting Up Email Forwarding

  2. Creating a Database with Content-Aware Autofill Feature

  3. Creating the Workflow

  4. Testing the Workflow

1) Setting Up Email Forwarding

Generally, we cannot directly listen to incoming emails. However, we can configure forwarding of incoming emails to another address.

The forwarding email address should follow this format: your name.organization name@inbox.lucyhq.com. For example, collins.eutech@inbox.lucyhq.com.

Ensure it ends with '.organization name@inbox.lucyhq.com'.

Steps to Set up Email Forwarding

  1. Log in to your Gmail account that you want to forward emails from.

  2. In the top right, click Settings and click See all settings.

  3. Click the Forwarding and POP/IMAP tab.

  4. In the "Forwarding" section, click Add a forwarding address.

  5. Enter the email address you want to forward emails to e.g., collins.eutech@inbox.lucyhq.com.

  6. Click Next. Complete the Google verification process.

  7. Click Proceed and Click OK.

  8. A confirmation link will be sent to the email address that you want to forward emails from. Click the link in that message.

  9. Click Confirm. Note: Confirmation is necessary to ensure that incoming emails are redirected to the original email address.

  10. Go back to the settings page for the Gmail account you want to forward messages from, and refresh your browser.

  11. Click the Forwarding and POP/IMAP tab.

  12. In the "Forwarding" section, select Forward a copy of incoming mail to and it will automatically pick your forwarding email address.

  13. Choose what you want to happen with the Gmail copy of your emails. We recommend Keep Gmail's copy in the Inbox.

  14. Click Save Changes.

2) Creating a Database with Content-Aware Autofill Feature

Let's create a simple database.

  1. On the app homepage, go to the My Work tab on the left sidebar.

  2. All the folders you have created, as well as those created by others, will be listed.

  3. Click on the required folder to open it.

  4. Go to the Databases tab.

  5. Click the Plus icon and pick the Create Manually option.

  6. Enter a meaningful name for your database.

  7. Click Continue.

  8. Click Skip this Step.

  9. Add Fields to the database.

  10. Click Go to Next Step. Once you have designed the structure of your database, click Create New Database. An empty database will be created.

Utilising Content-Aware Autofill to Automatically Populate Your Database

After creating the database, insert data into it and activate the content-aware autofill feature.

Refer to this article on how to use content-aware autofill to auto populate your database.

This is an example of the database we created.

3) Creating the Workflow

Next, let's create the workflow.

  1. On the Lucy app homepage, click the My Work tab on the left.

  2. All the folders you have created, as well as those created by others, will be listed.

  3. Click on the desired folder.

  4. Inside the folder, click the Workflows tab.

  5. Click the + icon. Workflow editor page will open.

  6. Select the email trigger and configure it.

    1. Click the How do you want to trigger your workflow? box.

    2. Pick When someone send a email trigger from the list.

    3. Enter the email address that you want to forward emails to, e.g., collins.eutech@inbox.lucyhq.com.

    4. Click Use this email address. The trigger block will be added and displayed on the workflow editor page.

  7. Add the block that defines the action to execute when the workflow is triggered.

    1. Click the + icon of the trigger block.

    2. Click on the Databases and Analytics category and pick Insert into Database block. The selected block will be added and displayed.

      1. Select the Database you wish to insert data you receive.

      2. Once the database is selected, its fields will be displayed.

      3. Add Pills to the required fields. Pills originate from previous blocks added in the workflow, and you can use them in input fields.

        1. Click on a field and a list of pills will appear in a pop-up window. Select required pills from the pop-up to be added in the field.

        2. Customise each field as necessary.

  8. Provide a suitable name for the workflow in the text box on the top left.

  9. Click Save.

All your saved workflows will be listed under the Workflows tab within the respective folder.

3) Testing the Workflow

Each incoming email will be automatically forwarded to the designated address, recorded in the corresponding database, and categorised accordingly.

Watch this video on how to automate handling incoming emails and saving them in a database.

PreviousCreating a Workflow to Run When New Data is Added to a DatabaseNextCreating a Workflow to Run When a Message from a Chatbot is Received

Last updated 9 months ago

Click the arrow icon to open Insert into Database block's properties section.

Utilising Content-aware Autofill to Automatically Fill in Fields in Your Database
Sample database
Activating the content-aware autofill feature
Configuring the Email trigger block
Workflow diagram
Testing the workflow