Gmail Acessor 1
by actual_zip
Opens on Apify.com
About Gmail Acessor 1
What does this actor do?
Gmail Acessor 1 is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.
Key Features
- Cloud-based execution - no local setup required
- Scalable infrastructure for large-scale operations
- API access for integration with your applications
- Built-in proxy rotation and anti-blocking measures
- Scheduled runs and webhooks for automation
How to Use
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
gmail-accessor # 📧 Gmail Attachment Processor and Text Extractor This Apify Actor connects to a user's Gmail account using the Google API, searches for emails based on a flexible query, and extracts text content from specific attachments (e.g., PDFs). It is purpose-built for automation workflows, such as extracting structured data from documents like Rate Confirmations, Invoices, or Purchase Orders to feed into an LLM or another system. ----- ## ✨ Key Features * Secure OAuth 2.0: Uses a long-lived Refresh Token (GMAIL_CREDENTIALS_JSON) to access the Gmail API without storing passwords. * Flexible Filtering: Leverages the full power of Gmail search operators (e.g., subject:, from:, after:) via the gmailQuery input. * Targeted Extraction: Processes only attachments matching the specified attachmentMimeTypes. * PDF to Text Conversion: Utilizes the pdfminer.six library to robustly convert PDF attachments into clean, searchable plain text. * LLM-Ready Output: Stores the extracted text in a structured dataset, ready for AI and data analysis. ----- ## ⚙️ Input Configuration The Actor requires the following JSON input fields. Note the exact casing for the mandatory credential field. | Field Name | Type | Required | Description | Default Value | | :--- | :--- | :--- | :--- | :--- | | GMAIL_CREDENTIALS_JSON | String | Yes | The full, unedited JSON string containing the Gmail OAuth 2.0 refresh token. Critical for authentication. | - | | gmailQuery | String | No | A standard Gmail search query to filter messages. Example: subject:"invoice" after:2024/01/01. | 'subject:"Rate Confirmation for order #" has:attachment from:@scotlynn.com' | | attachmentMimeTypes | Array<String> | No | A list of MIME types for attachments to target. The Actor processes the first matching attachment found in an email. | ['application/pdf'] | ### Example Input JSON json { "GMAIL_CREDENTIALS_JSON": "YOUR_FULL_OAUTH_JSON_STRING_HERE", "gmailQuery": "subject:invoice after:2024/02/01 before:2024/03/01 has:attachment", "attachmentMimeTypes": ["application/pdf"] } ----- ## 🔒 Authentication Setup (How to get GMAIL_CREDENTIALS_JSON) The GMAIL_CREDENTIALS_JSON is an OAuth 2.0 token object required for the Actor to access your Gmail. You must generate this object once outside of Apify. ### 1. Google Cloud Console Setup 1. Navigate to the Google Cloud Console and create or select a project. 2. Enable the Gmail API service for your project. 3. Go to APIs & Services > Credentials and click Create Credentials > OAuth client ID. 4. Select Application type: Desktop app (this is the simplest type for generating the refresh token locally). 5. Save your generated Client ID and Client Secret. ### 2. Token Generation Script A local Python script must be run to generate the final token string. This process guides you through authorizing your application with Google and ensures a long-lived refresh token is issued. The resulting script output is a single, complete JSON string containing the client_id, client_secret, and the required refresh_token. This entire output JSON string is the value you must provide for the GMAIL_CREDENTIALS_JSON input field. ----- ## 📊 Output Dataset Structure The Actor pushes one record to the default dataset for every email attachment successfully processed and converted to text. | Field Name | Type | Description | | :--- | :--- | :--- | | messageId | String | The unique ID of the Gmail message. | | subject | String | The subject line of the email. | | date | String | The date the email was received. | | attachmentName | String | The file name of the extracted attachment. | | gmailQueryUsed | String | The search query used for this run. | | targetMimes | Array<String> | The MIME types the Actor was configured to search for. | | attachmentContentText | String | The full, extracted plain text content of the attachment (ready for downstream processing). | ### Example Dataset Item json { "messageId": "19028a314b1f...", "subject": "Rate Confirmation for order #1296137", "date": "Fri, 5 Dec 2025 10:00:00 -0500", "attachmentName": "order_confirmation_1296137.pdf", "gmailQueryUsed": "subject:\"Rate Confirmation for order #\"...", "targetMimes": ["application/pdf"], "attachmentContentText": "Rate Confirmation\n\n1296137\n\nSCOTLYNN\n\nScotlynn USA Division V24.2\n 9597 Gulf Research Lane..." }
Categories
Common Use Cases
Market Research
Gather competitive intelligence and market data
Lead Generation
Extract contact information for sales outreach
Price Monitoring
Track competitor pricing and product changes
Content Aggregation
Collect and organize content from multiple sources
Ready to Get Started?
Try Gmail Acessor 1 now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- actual_zip
- Pricing
- Paid
- Total Runs
- 9
- Active Users
- 2
Related Actors
Web Scraper
by apify
Cheerio Scraper
by apify
Website Content Crawler
by apify
Legacy PhantomJS Crawler
by apify
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support