Find Gmail Filter
Definition
The "Find Gmail Filter" action retrieves a specific filter set up in a Gmail account within a Google Workspace environment. This action allows users to retrieve and inspect filters that have been created to automatically organize, label, or manage emails based on specific criteria. It enables the automation of email management by applying filters such as sender/recipient, subject, message content, attachments, and size to help streamline workflows. The action is designed to retrieve specific filter details and make them accessible for further automation tasks.
Key capabilities:
- Retrieves specific Gmail filters from a user's mailbox.
- Provides detailed filter parameters such as sender, recipient, subject, attachments, and more.
- Allows for querying based on predefined filter criteria like size, labels, and keywords.
Example Use Cases
1. Organize Emails by Sender or Subject
Automatically retrieve filters set up to organize incoming emails based on specific senders or subject lines. This helps ensure that emails from important contacts are automatically sorted into designated folders for easy access.
2. Filter Emails with Attachments
Retrieve filters that sort emails with attachments, enabling users to quickly manage and locate emails that contain files or documents, helping to streamline the handling of email attachments.
3. Apply Labels to Specific Emails
Retrieve filters that automatically apply specific labels to emails based on keywords, senders, or subject content. This ensures that emails are tagged appropriately for easy identification and later retrieval.
4. Manage Email Size and Storage
Retrieve filters that automatically flag or sort large emails based on their size to help manage inbox storage and prevent unnecessary accumulation of large files.
5. Forward Specific Emails
Retrieve filters set up to forward certain emails to other addresses, making it easier to track or share important information without manual intervention.
Inputs
1. Connection
A Google Workspace Administration connection used to authenticate and authorize the action. You must upload a service account credential JSON file that has domain-wide delegation enabled. This connection allows Zenphi to securely interact with your Google Workspace environment.
2. User Email
The email address of the user whose Gmail filters you want to retrieve. This specifies which Gmail account the action will interact with for fetching filter data.
3. Mailbox Filter ID
The unique identifier (ID) of the filter that you want to retrieve. This ID specifies the filter to fetch from the user's Gmail account. Each Gmail filter has a unique ID assigned by Google when created.
Outputs
1. Id
The server-assigned ID of the filter.
Explanation: This is a unique identifier assigned by Google to each filter. It allows you to reference and interact with the specific filter in subsequent operations, ensuring that the correct filter is fetched or modified.
2. From
The sender's display name or email address.
Explanation: This field specifies the sender's address or name used as a condition in the filter. The filter will apply to emails that meet the "from" criteria, such as a specific email address or domain.
3. To
The recipient's display name or email address.
Explanation: This field specifies the recipient’s address or name that was used as a condition for the filter. It applies to emails sent to particular recipients or email addresses.
4. Subject
A case-insensitive phrase found in the message's subject.
Explanation: This field contains the keyword or phrase in the subject line that the filter is looking for. Any email that contains this subject phrase will match the filter.
5. Has the words
Only return messages matching the specified query (Gmail search box format).
Explanation: This condition allows you to set a search query (similar to Gmail’s search bar) that matches specific words or phrases in the email body, subject, or other metadata. The filter will apply only to emails containing these words.
6. Doesn't have
Only return messages not matching the specified query.
Explanation: This is the opposite of "Has the words." It filters out emails that do not contain the specified query, based on Gmail’s search format.
7. Size
The size of the entire RFC822 message in bytes, including all headers and attachments.
Explanation: This specifies the size of the email message (in bytes) and can be used to filter emails based on their size (e.g., you might only want to apply the filter to large attachments).
8. Size Comparison
How the message size in bytes should be in relation to the size field.
Explanation: This field specifies the comparison rule for the size field, such as greater than, less than, or equal to the value set in the size field. It helps filter messages based on their size.
9. Has Attachment
Description: Whether the message has any attachment.
Explanation: This boolean field determines whether the filter applies to emails with attachments. If enabled, the filter only applies to emails that contain at least one attachment.
10. Forward
The email address that the message should be forwarded to.
Explanation: If the filter action includes forwarding, this field will specify the email address where messages matching the filter criteria will be forwarded.
11. Add Labels
List of labels to add to the message.
Explanation: This specifies which labels should be added to messages that match the filter criteria. Labels help categorize and organize emails within Gmail.
12. Remove Labels
List of labels to remove from the message.
Explanation: This specifies which labels should be removed from messages that meet the filter criteria. It allows you to modify the labels on emails after they’ve been filtered.
Example of using
Automatically Forward and Label Customer Support Emails
Imagine you are managing a customer support team and want to automate the process of handling incoming support emails. You can set up a Gmail filter using the "Find Gmail Filter" action to automatically forward emails from customers and apply relevant labels.
Step-by-Step Example:
-
Goal: You want to automatically forward any email received from [email protected] to your team’s support email ([email protected]) and label it as “Customer Support.”
-
Input Fields Setup:
- Connection: A valid Google Workspace Administration connection with the required service account credentials.
- User Email: Your email address (e.g., [email protected]), as you want the filter to apply to your account.
- Mailbox Filter Id: You can fetch the filter you want to update or retrieve.
-
Output Fields Setup:
- From: [email protected] (Only emails from this address will match the filter).
- Forward: [email protected] (All matching emails will be forwarded to this email).
- Add Labels: Customer Support (This label will be added to all matching emails).
-
**Execution:**Once the filter is applied, any email from [email protected] will be automatically forwarded to [email protected] and labeled as “Customer Support,” ensuring your team can easily find and handle all support-related emails.
This filter simplifies the process of managing support emails, reduces manual handling, and ensures better organization for your team.
Updated 7 days ago