AutomationFlowsEmail & Gmail › Weekly AI News Digest with Perplexity AI and Gmail

Weekly AI News Digest with Perplexity AI and Gmail

Original n8n title: Weekly AI News Digest with Perplexity AI and Gmail Newsletter

ByDerek Schatz @derekschatz on n8n.io

This automated workflow delivers a weekly digest of the most important AI news directly to your inbox. Every Monday at 9 AM, it uses Perplexity AI to research the latest developments and organizes them into four key categories: New Technology, Trending Topics, Top Stories, and…

Cron / scheduled trigger★★★★☆ complexity7 nodesHTTP RequestGmail
Email & Gmail Trigger: Cron / scheduled Nodes: 7 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #4412 — we link there as the canonical source.

This workflow follows the Gmail → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "1TrBJJYAdnNO3EjR",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Daily News",
  "tags": [],
  "nodes": [
    {
      "id": "a808eaa1-744e-4a01-98d8-d96428346d11",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -120,
        60
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "702221b3-c127-462a-a4f1-9b32518dd4ea",
      "name": "Set Dates",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        60
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "current-date",
              "name": "currentDate",
              "type": "string",
              "value": "={{ $now.format('yyyy-MM-dd') }}"
            },
            {
              "id": "yesterday-date",
              "name": "lastweekDate",
              "type": "string",
              "value": "={{ $now.minus({days: 7}).format('yyyy-MM-dd') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e4e02799-c6e2-44ce-8015-5fd71ef9a848",
      "name": "Workflow Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -400
      ],
      "parameters": {
        "color": 6,
        "width": 350,
        "height": 400,
        "content": "## Daily AI News Summary Workflow\n\nThis workflow runs every day at 9 AM to:\n\n1. **Fetch Latest AI News**: Uses Perplexity to find recent AI developments\n2. **Categorize Content**: Organizes news into three key areas:\n   - \ud83d\ude80 New Technology (breakthroughs, models, research)\n   - \ud83d\udca1 Tips & Tricks (practical applications, tutorials)\n   - \ud83d\udee1\ufe0f AI Ethics & Security (privacy, safety, regulations)\n3. **Format & Send**: Creates a beautiful HTML email with summaries and links\n\n### Setup Required:\n- Perplexity API credentials\n- SMTP email credentials\n- Update recipient email address\n\n### Customization:\n- Change schedule time in Daily Trigger\n- Modify categories in Perplexity prompt\n- Adjust email styling in Format Email Content node"
      },
      "typeVersion": 1
    },
    {
      "id": "dd06d61f-a4bd-4813-9586-d690e0177dc8",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -280
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 260,
        "content": "\u2699\ufe0f **Configuration Needed:**\n\n1. **Perplexity API**: Add your Perplexity API key to \"perplexity-credentials\"\n\n2. **Email Settings**: \n   - Update SMTP credentials in \"email-credentials\"\n   - Change recipient email in \"Send Email Summary\" node\n   - Update sender email if needed\n\n3. **Timing**: Modify schedule in \"Daily Trigger\" if you want different timing\n\n4. **Content**: Customize the news categories or add more in the Perplexity prompt"
      },
      "typeVersion": 1
    },
    {
      "id": "d1990f1e-04bb-4a64-a3ed-9f4dc01416f3",
      "name": "Perplexity AI News Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        300,
        60
      ],
      "parameters": {
        "url": "https://api.perplexity.ai/chat/completions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"sonar\",\n  \"messages\": [\n    {\n      \"content\": \"Summarize top AI news from the last week for the following categories: \\\"New Tech\\\", \\\"AI Security\\\", \\\"Top Stories\\\", \\\"Trending Topics\\\". Provide Links. \",\n      \"role\": \"user\"\n    }\n  ],\n  \"max_tokens\": 1000,\n  \"temperature\": 0.2,\n  \"top_p\": 0.9,\n  \"return_images\": false,\n  \"return_related_questions\": false,\n  \"search_recency_filter\": \"week\",\n  \"top_k\": 0,\n  \"stream\": false,\n  \"presence_penalty\": 0,\n  \"frequency_penalty\": 1,\n  \"web_search_options\": {\n    \"search_context_size\": \"low\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "492432d5-3c18-4517-85b9-4407c4ed26a3",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        820,
        60
      ],
      "parameters": {
        "sendTo": "",
        "message": "={{ $json.emailHtml }}",
        "options": {},
        "subject": "={{ $json.emailSubject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "9d871937-9d72-40ff-8c26-8680475ae183",
      "name": "Format Email Content1",
      "type": "n8n-nodes-base.code",
      "position": [
        600,
        60
      ],
      "parameters": {
        "jsCode": "try {\n  // Get the Perplexity response - using the correct node reference\n  const perplexityData = $input.first().json;\n  const newsContent = perplexityData.choices[0].message.content;\n  const citations = perplexityData.citations || [];\n  \n  // Get current date from Set Dates node\n  const currentDate = $('Set Dates').first().json.currentDate;\n  \n  // Format the news content into HTML\n  const formattedContent = newsContent\n    .replace(/\\n/g, '<br>')\n    .replace(/## (.*?)\\n/g, '<h2 style=\"color: #2563eb; margin: 25px 0 15px 0; border-bottom: 2px solid #e5e7eb; padding-bottom: 8px;\">$1</h2>')\n    .replace(/\\*\\*(.*?)\\*\\*/g, '<strong>$1</strong>')\n    .replace(/\\*(.*?)\\*/g, '<em>$1</em>')\n    .replace(/- \\*\\*(.*?)\\*\\*:/g, '<div style=\"margin: 15px 0;\"><strong style=\"color: #1e40af;\">\u2022 $1:</strong>')\n    .replace(/\\[\\d+\\]/g, '') // Remove citation numbers for cleaner display\n    .replace(/(https?:\\/\\/[^\\s]+)/g, '<a href=\"$1\" style=\"color: #2563eb; text-decoration: none;\">Read more</a>');\n  \n  // Create citations section if available\n  let citationsHtml = '';\n  if (citations.length > 0) {\n    citationsHtml = `\n      <div style=\"margin-top: 30px; padding: 20px; background-color: #f0f9ff; border-radius: 8px; border: 1px solid #e0f2fe;\">\n        <h3 style=\"color: #0369a1; margin: 0 0 15px 0;\">\ud83d\udcda Sources</h3>\n        <ul style=\"margin: 0; padding-left: 20px;\">`;\n    \n    citations.forEach((citation, index) => {\n      citationsHtml += `<li style=\"margin: 8px 0;\"><a href=\"${citation}\" style=\"color: #2563eb; text-decoration: none;\">${citation}</a></li>`;\n    });\n    \n    citationsHtml += `</ul></div>`;\n  }\n  \n  // Create complete email HTML\n  const emailHtml = `\n    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <title>Daily AI News Summary</title>\n    </head>\n    <body style=\"font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; line-height: 1.6; background-color: #f9fafb;\">\n      <header style=\"text-align: center; margin-bottom: 30px; padding: 30px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 12px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\">\n        <h1 style=\"margin: 0; font-size: 2.5em; font-weight: 700;\">\ud83e\udd16 Daily AI News Summary</h1>\n        <p style=\"margin: 15px 0 0 0; font-size: 1.2em; opacity: 0.9;\">${currentDate}</p>\n        <p style=\"margin: 10px 0 0 0; font-size: 1em; opacity: 0.8;\">Your curated AI news digest</p>\n      </header>\n      \n      <main style=\"background-color: white; padding: 30px; border-radius: 12px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\">\n        <div style=\"margin-bottom: 25px;\">\n          <div style=\"margin: 20px 0; padding: 20px; background-color: #f8fafc; border-radius: 8px; border-left: 4px solid #3b82f6;\">\n            ${formattedContent}\n          </div>\n        </div>\n        \n        ${citationsHtml}\n        \n        <div style=\"margin-top: 30px; padding: 20px; background-color: #ecfdf5; border-radius: 8px; border: 1px solid #d1fae5;\">\n          <p style=\"margin: 0; color: #065f46; font-size: 0.9em; text-align: center;\">\n            <strong>\ud83d\udca1 Tip:</strong> Click on any links to read the full articles and stay ahead of AI trends!\n          </p>\n        </div>\n      </main>\n      \n      <footer style=\"margin-top: 30px; padding: 20px; text-align: center; color: #6b7280; font-size: 0.9em;\">\n        <p style=\"margin: 0;\">Generated by your AI News Workflow</p>\n        <p style=\"margin: 5px 0 0 0;\">${new Date().toLocaleString()}</p>\n      </footer>\n    </body>\n    </html>\n  `;\n  \n  return {\n    emailHtml,\n    emailSubject: `\ud83e\udd16 Daily AI News Summary - ${currentDate}`,\n    rawNewsContent: newsContent,\n    citationCount: citations.length\n  };\n  \n} catch (error) {\n  console.error('Error processing news data:', error);\n  \n  // Get current date safely\n  let currentDate;\n  try {\n    currentDate = $('Set Dates').first().json.currentDate;\n  } catch {\n    currentDate = new Date().toISOString().split('T')[0];\n  }\n  \n  // Get raw response safely  \n  let rawResponse;\n  try {\n    rawResponse = $input.first().json;\n  } catch {\n    rawResponse = 'Unable to retrieve response';\n  }\n  \n  // Fallback email in case of parsing errors\n  const fallbackHtml = `\n    <!DOCTYPE html>\n    <html>\n    <body style=\"font-family: Arial, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px;\">\n      <h1 style=\"color: #dc2626;\">\ud83e\udd16 Daily AI News Summary - ${currentDate}</h1>\n      <div style=\"padding: 20px; background-color: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; margin: 20px 0;\">\n        <h2 style=\"color: #dc2626; margin-top: 0;\">\u26a0\ufe0f Processing Error</h2>\n        <p>There was an issue processing today's AI news. Please check the workflow configuration.</p>\n        <p><strong>Error:</strong> ${error.message}</p>\n        <details style=\"margin-top: 15px;\">\n          <summary style=\"cursor: pointer; font-weight: bold;\">View Raw Response</summary>\n          <pre style=\"background-color: #f3f4f6; padding: 15px; border-radius: 4px; overflow-x: auto; margin-top: 10px; font-size: 12px;\">${JSON.stringify(rawResponse, null, 2)}</pre>\n        </details>\n      </div>\n    </body>\n    </html>\n  `;\n  \n  return {\n    emailHtml: fallbackHtml,\n    emailSubject: `\u26a0\ufe0f AI News Summary Error - ${currentDate}`,\n    error: error.message,\n    rawResponse: JSON.stringify(rawResponse)\n  };\n}\n"
      },
      "typeVersion": 2
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "24396203-6135-419c-a500-c97583f0eb1a",
  "connections": {
    "Set Dates": {
      "main": [
        [
          {
            "node": "Perplexity AI News Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Trigger": {
      "main": [
        [
          {
            "node": "Set Dates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Email Content1": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity AI News Search": {
      "main": [
        [
          {
            "node": "Format Email Content1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This automated workflow delivers a weekly digest of the most important AI news directly to your inbox. Every Monday at 9 AM, it uses Perplexity AI to research the latest developments and organizes them into four key categories: New Technology, Trending Topics, Top Stories, and…

Source: https://n8n.io/workflows/4412/ — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

This workflow is an automated invoice payment tracking and reminder system for the Polish accounting service iFirma.pl. It monitors unpaid and overdue invoices, then automatically sends escalating rem

HTTP Request, Stop And Error, Slack +1
Email & Gmail

Automatically extract structured information from emails using AI-powered document analysis. This workflow processes emails from specified domains, classifies them by type, and extracts structured dat

Gmail, HTTP Request, AWS S3 +1
Email & Gmail

What This Flow Does

Gmail, Google Sheets, HTTP Request +1
Email & Gmail

This n8n template allows you to automatically monitor your company's budget by comparing live Bexio accounting data against targets defined in Google Sheets, sending automated weekly email reports. It

Google Sheets, HTTP Request, Gmail
Email & Gmail

Klaviyo List Decay Detection

HTTP Request, Postgres, Error Trigger +1