Automate Campaign Data Extraction and Database Updates
detail.loadingPreview
Streamline your campaign management by automatically extracting lead data from Smartlead and updating your PostgreSQL database. This workflow ensures your campaign information stays current and readily accessible.
About This Workflow
This n8n workflow is designed to automate the process of gathering campaign insights and maintaining an up-to-date database. It begins by fetching all relevant campaigns from your Smartlead account using an API key. The workflow then iterates through each campaign, extracts detailed lead data using another API call, and finally updates your PostgreSQL database with the latest campaign information. This ensures that your operational data accurately reflects your current campaign status and performance, reducing manual effort and potential errors.
Key Features
- Automated Data Extraction: Seamlessly pull campaign lead data from Smartlead.
- Database Synchronization: Keep your PostgreSQL database updated with real-time campaign information.
- API Integration: Leverages Smartlead's API for efficient data retrieval.
- Workflow Automation: Eliminates manual data entry and management tasks.
How To Use
- FETCH ALL CAMPAIGNS: Configure the first
httpRequestnode with your Smartlead API key and the correct API endpoint for fetching campaigns. Ensure theapi_keyparameter is correctly set. - Loop Over Items: Connect the output of the
FETCH ALL CAMPAIGNSnode to theLoop Over Itemsnode. This node will iterate through each campaign fetched. - EXTRACT CAMPAIGN DATA: Connect the
Loop Over Itemsnode to theEXTRACT CAMPAIGN DATAnode. Configure thishttpRequestnode with your Smartlead API key and the campaign-specific export endpoint, using{{ $json.id }}to dynamically reference the current campaign's ID. - UPDATE CAMPAIGN: Connect the output of the
EXTRACT CAMPAIGN DATAnode to theUPDATE CAMPAIGNnode. Configure your PostgreSQL connection and specify thece_campaigntable andoutbound_activitiesschema. Map the incoming campaign data fields (e.g.,name,status,user_id,campaign_id, etc.) to the corresponding database columns. Use={{ $now }}forpsg_last_update_timestampto record the update time.
Apps Used
Workflow JSON
{
"id": "07bd030d-a897-4121-8cff-b17c74552d65",
"name": "Automate Campaign Data Extraction and Database Updates",
"nodes": 28,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 07bd030d-a897...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.