All Collections
Integrations
Native integrations and automation
Native Gmail integration for incoming emails
Native Gmail integration for incoming emails

Create automation in Streak from incoming emails

Amanda avatar
Written by Amanda
Updated over a week ago

In this article:

Streak is designed to work seamlessly with Gmail, so an incoming email automation is a no-brainer to organize the emails you receive each day with the pipelines you already have created. If you’re familiar with Gmail filters, this integration works similarly to that feature.

You can use the incoming email trigger to automatically create new boxes, add contacts, move boxes to a new stage, send a notification to Slack, and much more.


How to create an incoming email flow

1. Click on the 3-dot menu from the pipeline to open the Integrations & Automation page

2. Select Create native integrations from scratch

3. Click on the Add trigger dropdown button to select Google -> Incoming message

4. Configure the Filter field to specify which emails will start this automation flow. Click here to see more filter search options.

5. Configure the Ignore replies? field to false if you want the flow to trigger on every email (including replies), or true if you want the flow to ignore email replies in the same thread.

6. Add an action step from the Add step button to specify what action will occur when the incoming email arrives.

7. Click Create to save the automation.

Note: The incoming email trigger does not automatically add the email to a box unless the automatic email share feature is enabled. To add the email to a box in the flow, you will need to add a step to “Add Gmail thread to box” or if you’re creating a contact from the flow, you can enable auto email sharing.


Filter search options

In the Filter field of the incoming email trigger, you can customize the filter using the following filter options:

Filter options

Search parameters

Examples

Filter by sender

from:

from:amy

Filter by recipient

to:

to:david

Filter by cc and bcc recipients

cc:

bcc:

cc:david

Subject line

subject:

subject:Order #12345

Messages with a Gmail label

label:

label:Billing

Messages with attachment

has:attachment

has:attachment

Attachments with a certain name or file type

filename:

filename:pdf

filename:homework.txt

Important, starred, snoozed, unread, or read messages

is:important

is:starred

is:snoozed

is:unread

is:read

is:starred is:unread

Note: To ignore specific filter options, you can add a “-” before the search parameter. For example, if your current filter is from:(streak.com), you can add -from:(notifications@streak.com) to ignore specific emails from that address, but include all other emails from the domain streak.com. The result of the filter would be:

from:(streak.com) -{notifications@streak.com}

Using multiple filter options

To filter for incoming emails with multiple conditions, separate each filter option with a space.

In the example above, the flow will only trigger incoming emails from notifications@streak.com with “task” in the subject line.

💡 Pro Tip: You can use Gmail’s advanced search options to help you create your desired filter. For example:

Once you complete the search, you can copy and paste the search details into Streak’s Filter field in your automation flow.


How to parse text from the email body

You can use a formula to extract important information from incoming emails and add it as box or contact data.

The screenshot below is an example of an email with information that can be added to a Streak box or contact.

Here are some sample formulas that can be used in your automation flow to extract the values:

Company value:

{{ (match = /Company:\s+([^\n]+)/.exec(incomingMessage.body)) ? match[1] : 'No match' }}

Customer First Name value:

{{ (match = /Customer First Name:\s+([^\n]+)/.exec(incomingMessage.body)) ? match[1] : 'No match' }}

Customer Last Name value:

{{ (match = /Customer Last Name:\s+([^\n]+)/.exec(incomingMessage.body)) ? match[1] : 'No match' }}

Email Address value:

{{ (match = /Email Address:\s+([^<\n]+)/.exec(incomingMessage.body)) ? match[1].trim() : 'No match' }}

Phone Number value:

{{ (match = /Phone Number:\s+([^\n]+)/.exec(incomingMessage.body)) ? match[1] : 'No match' }}

Bean Type value:

{{ (match = /Bean Type:\s+([^\n]+)/.exec(incomingMessage.body)) ? match[1] : 'No match' }}

Using the formulas above, here’s an example of what the automation flow would look like with the parsed email data:

If you need help creating this flow or parsing the data in your email data in a custom formula, feel free to reach out to us at support@streak.com or start a chat with us using the Help button at the bottom right corner of this page.

Did this answer your question?