Instagram Analytics: Scrape Data, Enrich Metrics, and Notify with Apify, Google Sheets, and Slack

This workflow scrapes Instagram for hashtag analytics using Apify’s API, enriches data with engagement metrics, stores results in Google Sheets, and sends notifications via Slack and Datadog. Key nodes include Execute Workflow Trigger for input, Condition for validation, HTTP Request for Apify scraping, Code for data enrichment, Google Sheets for storage, and HTTP Request for notifications. To set up, install n8n from n8n.io for self-hosting or sign up at cloud.n8n.io for cloud hosting. Obtain an Apify API key from apify.com under account settings. Create a Google Sheets OAuth2 credential via console.cloud.google.com. Get a Slack webhook URL from your Slack workspace under Apps > Incoming Webhooks. Obtain a Datadog API key from datadoghq.com. In n8n, import the workflow JSON. Update the Execute Workflow Trigger’s JSON input template (e.g., {hashtag: 'landscaping', resultsLimit: 50, location: 'New York, US', industry: 'landscaping', apiKey: 'your-api-key'}). Replace “YOUR_API_KEY” in HTTP Request nodes (Instagram Scraper Engine, Dataset Retrieval) with your Apify API key. Configure the Google Sheets node with OAuth2 credentials, specifying your spreadsheet ID and sheet name (e.g., “Instagram Analytics”). Update the Slack webhook and Datadog API key in the respective HTTP Request nodes. Ensure the Condition node validates hashtag, API key, and results limit. Test by manually triggering the workflow in n8n with a valid JSON input. Verify the Success Response Formatter outputs a JSON with status: “success”, posts_processed, and analytics_summary. Check Google Sheets for data (e.g., Post_ID, Engagement_Rate). Confirm that Slack and Datadog receive notifications with metrics. Handle errors like HTTP 401 (invalid Apify key), validation errors (short hashtag), or empty results. Regenerate API keys if needed. Deploy by activating the workflow in n8n, ensuring valid inputs. Monitor logs for rate limits or Sheets write failures. Validate output for structured data with execution_id and hashtag_analyzed.

$6.99

Workflow steps: 20

Integrated apps: executeWorkflowTrigger, if, set

Instagram Analytics: Scrape Data, Enrich Metrics, and Notify with Apify, Google Sheets, and Slack preview