Automatically Add Gmail Sender Contacts to MySQL Database
This workflow processes emails received in Gmail and adds the sender's name and email address to a MySQL database.
Use Cases: A sales or marketing agency can use this to automatically save client contact info to a database to build a list of leads Companies can use this to automatically save contacts to a database in case of Gmail data loss / losing access to their Gmail account Companies can build mailing lists to automatically send promotions to all of the clients who have contacted them in a given time period
Before using, you need to have: Gmail credential MySQL database credential A Table in the MySQL database to store your contacts The table should have a "name" column, which allows NULL values The table should have an "email" column, which should be UNIQUE
How it works: The Gmail Trigger will listen for a new email every minute For each email, the code node will extract the name and email address of the sender. If there is no name, it will return null The MySQL node will insert the new contact into a table in your database If the contact email already exists in your database, the MySQL node will update the contact name
How to use: Please set up the MySQL node by selecting the correct table to store contacts in Please choose your "email" column to match on Please choose your "name" column to store names
Customizing this Workflow: You can customize this workflow to save more data to MySQL. Here are some examples: In the MySQL node, click "Add Value", and choose one of the fields from the Gmail node to save in your database column. You can try saving the following items: Subject line MessageID ThreadID Snippet Recipient Info
Related Templates
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments