Source: https://eventregistry.org/documentation?tab=n8n_content_research

# Example 1: Content Research Assistant Workflow

This workflow searches for news articles on any topic and emails them in a formatted table. Perfect for content research and monitoring.

## Workflow Steps

1. **Manual Trigger** - Start the workflow manually
2. **Edit Fields** - Set search parameters (topic, dateStart, language)
3. **HTTP Request** - Fetch articles from Event Registry
4. **Split Out** - Separate articles into individual items
5. **HTML** - Format articles as HTML table
6. **Gmail/Email** - Send formatted results via email

## Step-by-Step Node Configuration

**1. Manual Trigger Node:**

1. Add a **Manual Trigger** node from the trigger nodes
2. No configuration needed - this node starts the workflow when you click "Execute Workflow"

**2. Edit Fields Node:**

1. Add an **Edit Fields** node (or **Set** node) after the Manual Trigger
2. Click **Add Value** and configure the following fields:
3. **Field Name:**`topic`, **Value:**`artificial intelligence` (or your search topic)
4. **Field Name:**`dateStart`, **Value:**`2024-01-01` (format: YYYY-MM-DD, or use expression like `{{ $now.minus({days: 7}).toFormat('yyyy-MM-dd') }}` for 7 days ago)
5. **Field Name:**`language`, **Value:**`eng` (or `spa`, `deu`, etc.)
6. Click "**Back to canvas**" in the upper left corner

**3. HTTP Request Node:**

1. Add an **HTTP Request** node after the Edit Fields node
2. Configure the following settings:
3. **Method:** Select `POST` from the dropdown
4. **URL:** Enter `https://eventregistry.org/api/v1/article/getArticles`
5. **Authentication:** Select `Generic Credential Type`
6. **Credential Type:** Select `Custom Auth`
7. **Credential for Custom Auth:** Select your `Event Registry API` credential (created in Overview tab)
8. **Send Body:** Check the box
9. **Body Content Type:** Select `JSON`
10. **Specify Body:** Specify body using JSON
11. **Body:** Enter the following request body JSON:

  ```

              {
    "action": "getArticles",
    "keyword": "{{ $json.topic }}",
    "dateStart": "{{ $json.dateStart }}",
    "lang": "{{ $json.language }}",
    "articlesPage": 1,
    "articlesCount": 10,
    "articlesSortBy": "date",
    "resultType": "articles"
  }
  ```
12. The `{{ $json.topic }}`, `{{ $json.dateStart }}`, and `{{ $json.language }}` expressions reference fields from the Edit Fields node
13. Click "**Back to canvas**" in the upper left corner

**4. Split Out Node:**

1. Add a **Split Out** node after the HTTP Request node
2. Configure the following:
3. **Fields to Split Out:** Enter `articles.results`
4. **Include:** Select `No Other Fields` from the dropdown
5. Click "**Back to canvas**" in the upper left corner

**5. HTML Node:**

1. Add an **HTML** node after the Split Out node
2. Configure the following:
3. **Operation:** Select `Convert to HTML Table`
4. Click "**Back to canvas**" in the upper left corner

**6. Gmail/Email Node:**

1. Add a **Gmail** or **Email** node after the HTML node
2. Configure based on your chosen node type:
  - **For Gmail node:**
    - **Operation:** Select `Send`
    - **To:** Enter recipient email address
    - **Subject:** Enter email subject, e.g., `Content Research Results`
    - **Email Type:** Select `HTML`
    - **Message:** Use expression `{{ $json.table }}` to reference HTML Table from previous node
  - **For Email node:**
    - If you haven't already, configure your email account credentials first
    - **Operation:** Select `Send`
    - **To Email:** Enter recipient email address
    - **Subject:** Enter email subject, e.g., `Content Research Results`
    - **Email Format:** Select `HTML`
    - **Message:** Use expression `{{ $json.table }}` to reference HTML Table from previous node
3. Click "**Back to canvas**" in the upper left corner

## Customization Ideas

- **Change article count:** Modify `articlesCount` (max 100 per request)
- **Filter by date range:** Add `dateEnd` parameter
- **Filter by source:** Add `sourceUri` or `sourceLocationUri` parameters
- **Include sentiment:** Set `includeArticleSentiment: true` in request body
- **Schedule automation:** Replace Manual Trigger with Schedule Trigger for automatic runs

## Additional Resources

- For Gmail/Email node configuration, see [n8n Email Node documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.email/)
- For HTML formatting, see [n8n HTML Node documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.html/)
