This workflow follows the Chainllm → 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 →
{
"name": "CNA Mastodon.SG",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"triggerAtMinute": 6
}
]
}
},
"id": "18afae20-b01b-4308-9c6b-9191e011957a",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.1,
"position": [
200,
320
]
},
{
"parameters": {
"url": "https://mastodon.sg/@ChannelNewsAsia.rss",
"options": {}
},
"id": "0fbcb220-eab3-4f73-8ead-1def46090499",
"name": "RSS Read",
"type": "n8n-nodes-base.rssFeedRead",
"typeVersion": 1,
"position": [
600,
200
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "be0abf24-9acf-4765-ae1f-8cd8bd5ffbfe",
"leftValue": "={{ $('RSS Read').item.json.pubDate.toDateTime().toLocal() }}",
"rightValue": "={{ $('Get Last Execution Time').item.json.result.records[0].time.toDateTime().toLocal() }}",
"operator": {
"type": "dateTime",
"operation": "afterOrEquals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "5a417b07-a14f-4b7e-9219-983d16323a18",
"name": "Latest Content only",
"type": "n8n-nodes-base.filter",
"typeVersion": 2,
"position": [
820,
200
],
"alwaysOutputData": false
},
{
"parameters": {
"options": {}
},
"id": "0d671754-136a-4082-a6c5-47b4c80a99b2",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
2100,
580
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "39591ef1-1326-4962-8a98-6d09ce6a9ee6",
"leftValue": "={{ $json.relevance }}",
"rightValue": "={{ 0.5}}",
"operator": {
"type": "number",
"operation": "gte"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "1a14995e-71ac-444b-8feb-2261f94125ce",
"name": "Filter",
"type": "n8n-nodes-base.filter",
"typeVersion": 2,
"position": [
1900,
320
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "ad0d452f-70d9-4baa-bc7f-34fa634f5d9d",
"name": "relevance",
"value": "={{ $json.output.relevant }}",
"type": "number"
},
{
"id": "b0a6772b-d4a5-4003-99d4-17545c352d9a",
"name": "content",
"value": "={{ $('Get Readable Content').item.json.textContent }}",
"type": "string"
},
{
"id": "68b0168b-e55f-40c7-be79-8b28c8eeaae2",
"name": "published_date",
"value": "={{ $('RSS Read').item.json.pubDate }}",
"type": "string"
},
{
"id": "ca5ddd3b-4d0d-4c03-813b-39beea107eec",
"name": "source_link",
"value": "={{ $('HTML').item.json.source_link }}",
"type": "string"
},
{
"id": "f5eed3a2-a283-47e3-8fce-0fe3294eaa73",
"name": "title",
"value": "={{ $('Get Readable Content').item.json.title }}",
"type": "string"
}
]
},
"options": {}
},
"id": "c064c9ca-3cdc-4a77-8e23-2a422f6c0d54",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1720,
320
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "c0365d13-78d2-403f-8dc1-1c9f82eb17c6",
"name": "summary",
"value": "={{ $json.text }}",
"type": "string"
},
{
"id": "ffc05d90-f484-4578-99b2-d12f98c9b7ab",
"name": "content",
"value": "={{ $('Filter').item.json.content }}",
"type": "string"
},
{
"id": "802df1d8-4297-456b-bd72-e6553ba32030",
"name": "published_date",
"value": "={{ $('Filter').item.json.published_date }}",
"type": "string"
},
{
"id": "4e41d71b-f2d3-4eb3-8718-bb9925c311a0",
"name": "source_link",
"value": "={{ $('Filter').item.json.source_link }}",
"type": "string"
},
{
"id": "f55c7133-3437-4c42-ad14-f6ac58f071ea",
"name": "title",
"value": "=CNA: {{ $('Filter').item.json.title }}",
"type": "string"
},
{
"id": "8a0bd129-5583-475b-bb8b-cb7f9bc19adb",
"name": "source",
"value": "Channel News Asia",
"type": "string"
}
]
},
"options": {}
},
"id": "d7cfef22-d883-42dd-8f7d-216ee3ca843b",
"name": "Set fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
2500,
320
]
},
{
"parameters": {
"method": "POST",
"url": "https://ckan.zeeker.sg/api/action/resource_create",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={ \n \"package_id\": \"singapore-law-news-articles\",\n \"url\": {{ $json[\"source_link\"].quote() }},\n \"description\": {{ $json[[\"summary\"]].replaceAll(\"\\n\", \"\").quote() }},\n \"name\": {{ $json[\"title\"].quote() }}\n}",
"options": {
"batching": {
"batch": {
"batchSize": 2
}
}
}
},
"id": "78452d99-ce3e-492c-bb01-aaf17bfce1b1",
"name": "Create CKAN Resource",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
2740,
320
],
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "6c0a96d3-47cf-48f8-ba40-49d370c0ee2b",
"name": "zeeker_url",
"value": "=https://ckan.zeeker.sg/dataset/singapore-law-news-articles/resource/{{ $json.result.id }}",
"type": "string"
},
{
"id": "439f8bf1-d574-45c1-8919-0d46dff2443c",
"name": "title",
"value": "={{ $('Set fields').item.json.title }}",
"type": "string"
},
{
"id": "31f3408f-c09b-409d-828c-238f7480a067",
"name": "content",
"value": "={{ $('Set fields').item.json.content }}",
"type": "string"
},
{
"id": "cd18b2f6-24c6-412b-80a3-72e410a7d0dd",
"name": "resource_url",
"value": "={{ $('Set fields').item.json.source_link }}",
"type": "string"
},
{
"id": "6119a24e-263f-4c58-af1f-fee1aaee4727",
"name": "date_published",
"value": "={{ $('Set fields').item.json.published_date }}",
"type": "string"
},
{
"id": "20330efb-95b0-43cc-bb0c-fc553ee2868e",
"name": "source",
"value": "={{ $('Set fields').item.json.source }}",
"type": "string"
},
{
"id": "9c138ac6-f759-4de0-b6dc-642fca894626",
"name": "summary",
"value": "={{ $json.result.description }}",
"type": "string"
}
]
},
"options": {}
},
"id": "1d7a4141-43e0-4f62-8307-f90f9def0b5c",
"name": "Get resource id",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
2980,
320
]
},
{
"parameters": {
"url": "https://ckan.zeeker.sg/api/action/datastore_search",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "resource_id",
"value": "f5e54f59-0be0-42f1-a7df-6b2c1e831889"
},
{
"name": "q",
"value": "{\"name\":\"cna\"}"
}
]
},
"options": {}
},
"id": "e9182c5f-3270-4c5b-92b6-dd83730c0c2a",
"name": "Get Last Execution Time",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
380,
200
],
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=As an AI expert in legal affairs, your task is to provide concise, yet comprehensive summaries of legal news articles for time-constrained attorneys. \nThese summaries should highlight the critical legal aspects, relevant precedents, and implications of the issues discussed in the articles. Despite their complexity, the summaries should be accessible and digestible, written in an engaging and conversational style. Accuracy and attention to detail are essential, as the readers will be legal professionals who may use these summaries to inform their practice. \n\n### Instructions: \n1. Begin the summary with a brief introduction of the topic of the article. \n2. Outline the main legal aspects, implications, and precedents highlighted in the article. \n3. End the summary with a succinct conclusion or takeaway. \nAim for summaries to be no more than five sentences, but ensure they efficiently deliver the key legal insights, making them beneficial for quick comprehension. The end goal is to help the lawyers understand the crux of the articles without having to read them in their entirety.\n\n### This is the article:\n{{ $('Get Readable Content').item.json[\"textContent\"] }}\n###\n\nStart with \"This article"
},
"id": "8b52edd5-06a3-4753-a051-2459a0d6ab82",
"name": "Summarize content",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.4,
"position": [
2120,
320
],
"onError": "continueRegularOutput"
},
{
"parameters": {
"operation": "extractHtmlContent",
"dataPropertyName": "=content",
"extractionValues": {
"values": [
{
"key": "source_link",
"cssSelector": "a"
}
]
},
"options": {
"cleanUpText": true
}
},
"id": "9fec52e3-68f9-4b3e-b620-5ed100cfd90f",
"name": "HTML",
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
1000,
200
]
},
{
"parameters": {
"method": "POST",
"url": "https://faas-sgp1-18bc02ac.doserverless.co/api/v1/namespaces/fn-304098ea-3920-4499-a898-1a6629b4d9f7/actions/misc_functions/get_readable_webpage",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "blocking",
"value": "true"
},
{
"name": "result",
"value": "true"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Basic MDg1MTEzMjAtMDRkMS00YWEwLWE5NzgtYjQwNzAzNmY5Y2RkOjdtTlBwRGp4SFBsNXY2V2RvNkNDcDdFR2NjR3lJd05tNDJqcUxkWXkxd240YlpFeW1pcWZycGxOOHBmOFlTSlc="
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "source_url",
"value": "={{ $json.source_link }}"
}
]
},
"options": {
"batching": {
"batch": {
"batchSize": 5
}
}
}
},
"id": "770c5718-c87a-4241-8cd5-ba3e85cde18f",
"name": "Get Readable Content",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
1180,
320
]
},
{
"parameters": {
"method": "POST",
"url": "https://ckan.zeeker.sg/api/action/datastore_upsert",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"resource_id\": \"f5e54f59-0be0-42f1-a7df-6b2c1e831889\",\n \"method\": \"update\",\n \"force\": \"True\",\n \"records\": [\n {\n \"name\": \"cna\",\n \"time\": {{ $('Schedule Trigger').item.json.timestamp.quote() }}\n }\n ]\n} ",
"options": {}
},
"id": "37b59cd8-7e06-469f-b994-cf6fcfd99ef6",
"name": "Post Last Execution Time",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
840,
480
],
"executeOnce": true,
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://ckan.zeeker.sg/api/action/datastore_upsert",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"resource_id\": \"104e12b1-aa30-4f61-af3a-02a5d2206dc9\",\n \"method\": \"insert\",\n \"force\": \"True\",\n \"records\": [\n {{ $json[\"data\"] }}\n ]\n} ",
"options": {
"batching": {
"batch": {
"batchSize": 1,
"batchInterval": 2000
}
}
}
},
"id": "7028478f-2be0-4c34-ac41-d7d1e31d09da",
"name": "Create DataStore Record",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
3520,
320
],
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"options": {}
},
"id": "3110ba99-ed30-4c73-b295-5a4e8565ffd8",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
3200,
320
]
},
{
"parameters": {
"promptType": "define",
"text": "=Analyze the following news article title: \"{{ $json[\"title\"] }}\"\n\n**Consider the following factors and assign a relevance score (0-1) for each:**\n\n* **Legal keywords:** Does the title contain keywords related to Singaporean law, legal concepts, or specific court cases? (e.g., defamation, contract dispute, Intellectual Property, Court of Appeal)\n* **Government/regulatory keywords:** Does the title mention Singaporean government agencies, ministries, or regulatory bodies relevant to legal matters? (e.g., Ministry of Law, Monetary Authority of Singapore, Singapore Police Force)\n* **Singapore focus:** Does the title explicitly mention Singapore or suggest the situation applies within the Singaporean context?\n* **Business/finance keywords:** Are there keywords suggesting business or financial issues that could have legal implications in Singapore? (e.g., merger, bankruptcy, data breach)\n\n**Overall relevance score:**\n\nCalculate a weighted average of the individual scores, with a higher weight for \"Legal keywords\" and a lower weight when the article does not contain any keywords relating to legal, business or financial issues. \n\n**Example:**\n\n**Input:** Title: \"New Singapore Law Aims to Combat Online Hate Speech\"\n\n**Output:**\n\n* Relevance score: 0.8 (High)\n* Justification: The title mentions a new law in Singapore (Singapore focus) related to a legal concept (hate speech).\n\n**Input:** Title: \"Free skin, body & hair treatments at Jurong Point Roadshow from Apr. 8 - 14, 2024\"\n\n**Output:**\n\n* Relevance score: 0.1 (Low)\n* Justification: There are no legal keywords or issues suggested by the title and the suggestion of an offer is not relevant to legal professionals.\n",
"hasOutputParser": true
},
"id": "9d2cbefc-7a79-4a07-bd3f-c5c24704ad18",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.4,
"position": [
1360,
320
]
},
{
"parameters": {
"jsonSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Title of the source article\"\n },\n \"relevant\": {\n \"type\": \"number\",\n \"description\": \"This indicates the probability of the article being relevant to Singaporean legal professionals.\"\n },\n \"justification\": {\n \"type\": \"string\",\n \"description\": \"Briefly explain why the article received this score based on the factors considered.\"\n }\n }\n}"
},
"id": "bfeba67a-e000-4418-bb03-4137f2b80175",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.1,
"position": [
1700,
520
]
},
{
"parameters": {
"options": {}
},
"id": "edb5dd68-53ed-4a3a-a5e7-6c9e2151603d",
"name": "Anthropic Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.1,
"position": [
1360,
540
],
"credentials": {
"anthropicApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Get Last Execution Time",
"type": "main",
"index": 0
}
]
]
},
"RSS Read": {
"main": [
[
{
"node": "Latest Content only",
"type": "main",
"index": 0
},
{
"node": "Post Last Execution Time",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Summarize content",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Filter": {
"main": [
[
{
"node": "Summarize content",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Create CKAN Resource": {
"main": [
[
{
"node": "Get resource id",
"type": "main",
"index": 0
}
]
]
},
"Get resource id": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Set fields": {
"main": [
[
{
"node": "Create CKAN Resource",
"type": "main",
"index": 0
}
]
]
},
"Get Last Execution Time": {
"main": [
[
{
"node": "RSS Read",
"type": "main",
"index": 0
}
]
]
},
"Latest Content only": {
"main": [
[
{
"node": "HTML",
"type": "main",
"index": 0
}
]
]
},
"Summarize content": {
"main": [
[
{
"node": "Set fields",
"type": "main",
"index": 0
}
]
]
},
"HTML": {
"main": [
[
{
"node": "Get Readable Content",
"type": "main",
"index": 0
}
]
]
},
"Get Readable Content": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Create DataStore Record",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Basic LLM Chain",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Anthropic Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true,
"callerPolicy": "workflowsFromSameOwner"
},
"versionId": "74f4b85d-2592-49f1-88fb-58dd856595bc",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "yeMVNI5JxNel4CjT",
"tags": [
{
"createdAt": "2024-04-06T11:40:44.245Z",
"updatedAt": "2024-04-06T11:40:44.245Z",
"id": "ro2EFohmBvXuWGAQ",
"name": "zeeker"
}
]
}
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.
anthropicApihttpHeaderAuthopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
CNA Mastodon.SG. Uses rssFeedRead, lmChatOpenAi, httpRequest, chainLlm. Scheduled trigger; 19 nodes.
Source: https://github.com/houfu/zeeker-func/blob/1dfd4b3369ef732fc452c6a90f6b6d2e0675fdf3/n8n-workflows/CNA_Mastodon_SG.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is designed for Japanese-speaking professionals, and learners who want to efficiently stay up to date with practical productivity, lifehack, and efficiency-related insights from Japanese
公認資格ワークフロー. Uses rssFeedRead, chainLlm, lmChatGoogleGemini, outputParserStructured. Scheduled trigger; 25 nodes.
Complete PostgreSQL-backed system: Keyword scoring → AI research → Multi-part content generation → fal.ai Nano Banana image generation → WordPress publishing
auto_post_wordpress_. Uses rssFeedRead, lmChatOpenAi, textClassifier, agent. Scheduled trigger; 90 nodes.
blog writing automation. Uses rssFeedRead, lmChatOpenAi, textClassifier, agent. Scheduled trigger; 90 nodes.