PRO Feature
This workflow is using nodes from the PRO subscription tier. Learn more about PRO
Reddit Post Workflow
This workflow uses AI to gather the latest news, formats it into a Reddit post, validates the structure, and automatically submits it to a subreddit.
- Preview
- JSON
- Node Configuration
This workflow chains a DuckDuckGo-powered AI node to research and draft a Reddit post, a second AI node to reformat the output, a Data Validation node to enforce the correct schema, and finally the Reddit Post node to submit the post.

{
"nodes": [
{
"id": "c94d442b-c03b-4101-a2ab-5d8a8a9b6cb9",
"type": "llm-process",
"position": {
"x": 844,
"y": 231.5
},
"data": {
"title": "AI Data Processing",
"model": "gemma4:e2b",
"prompt": "You are a Reddit post writer.\nGather the latest AI technology news from the last week (you have access to \"duckDuckGoSearch\" tool to search the web - the tool use is mandatory), then create a Reddit text post summary (include the liks) with a catchy title.\nOutput only a single valid JSON object with these exact fields: `subreddit`, `postType`, `postTitle`, `postBody`, `postFlair`, `nsfw`, and `spoiler`.\n- `subreddit` must be `r/test`\n- `postType` must be `self`\n- `postFlair` must be an empty string\n- `nsfw` must be `false`\n- `spoiler` must be `false`\nDo not include any extra explanation, markdown, or text outside the JSON object.\n\nExample JSON output:\n{\n \"subreddit\": \"r/test\",\n \"postType\": \"self\",\n \"postTitle\": post title,\n \"postBody\": post body,\n \"postFlair\": \"\",\n \"nsfw\": false,\n \"spoiler\": false\n}\n",
"message": {},
"format": {
"onSuccess": ""
},
"maxFeedbackLoops": 1,
"maxToolRetries": 3
},
"measured": {
"width": 160,
"height": 40
},
"selected": false,
"dragging": false
},
{
"id": "d442cdaa-15da-4f0b-867b-ae26ee996d8d",
"type": "reddit-post",
"position": {
"x": 1294,
"y": 206.5
},
"data": {
"title": "Reddit Post",
"subreddit": "",
"postType": "self",
"postTitle": "",
"postBody": "",
"postFlair": "",
"nsfw": false,
"spoiler": false,
"clientId": "",
"clientSecret": "",
"postProvidedByUpstream": true
},
"measured": {
"width": 160,
"height": 40
},
"selected": false,
"dragging": false
},
{
"id": "ddd49c73-5b22-44c3-a105-dc2932aefe76",
"type": "ai-tool",
"position": {
"x": 792.5,
"y": 307.5
},
"data": {
"title": "DuckDuckGo Search Tool",
"toolSubtype": "duckduckgo-search",
"userConfig": {
"maxResults": 5,
"requireToolUse": true
},
"userConfigSchema": {
"maxResults": {
"type": "integer",
"description": "Maximum number of results to return",
"default": 5,
"minimum": 1,
"maximum": 20
},
"requireToolUse": {
"type": "boolean",
"description": "Require tool use (forces the LLM to always call this tool)",
"default": true
}
}
},
"measured": {
"width": 120,
"height": 40
},
"selected": false,
"dragging": false
},
{
"id": "a312c98d-1904-4775-a370-7d8cb0640624",
"type": "data-validation",
"position": {
"x": 1086,
"y": 238
},
"data": {
"title": "Data Validation",
"schema": "{\n \"type\": \"object\",\n \"properties\": {\n \"subreddit\": {\n \"type\": \"string\",\n \"const\": \"r/test\"\n },\n \"postType\": {\n \"type\": \"string\",\n \"const\": \"self\"\n },\n \"postTitle\": {\n \"type\": \"string\"\n },\n \"postBody\": {\n \"type\": \"string\"\n },\n \"postFlair\": {\n \"type\": \"string\",\n \"const\": \"\"\n },\n \"nsfw\": {\n \"type\": \"boolean\",\n \"const\": false\n },\n \"spoiler\": {\n \"type\": \"boolean\",\n \"const\": false\n }\n },\n \"required\": [\"subreddit\", \"postType\", \"postTitle\", \"postBody\", \"postFlair\", \"nsfw\", \"spoiler\"],\n \"additionalProperties\": false\n}"
},
"measured": {
"width": 120,
"height": 40
},
"selected": false,
"dragging": false
},
{
"id": "586facaf-6c70-4b30-87ed-604556a11d72",
"type": "llm-process",
"position": {
"x": 1065,
"y": 346
},
"data": {
"title": "AI Data Processing",
"model": "llama3.2:3b",
"prompt": "You need to properly format the data received. Make sure you receive something similar to:\n{\n \"subreddit\": \"r/test\",\n \"postType\": \"self\",\n \"postTitle\": post title,\n \"postBody\": post body,\n \"postFlair\": \"\",\n \"nsfw\": false,\n \"spoiler\": false\n}\n\nIf the data received is not like that, then you need to respond with an error.",
"format": {
"onSuccess": "{\n \"type\": \"object\",\n \"properties\": {\n \"subreddit\": {\n \"type\": \"string\",\n \"const\": \"r/test\"\n },\n \"postType\": {\n \"type\": \"string\",\n \"const\": \"self\"\n },\n \"postTitle\": {\n \"type\": \"string\"\n },\n \"postBody\": {\n \"type\": \"string\"\n },\n \"postFlair\": {\n \"type\": \"string\",\n \"const\": \"\"\n },\n \"nsfw\": {\n \"type\": \"boolean\",\n \"const\": false\n },\n \"spoiler\": {\n \"type\": \"boolean\",\n \"const\": false\n }\n },\n \"required\": [\"subreddit\", \"postType\", \"postTitle\", \"postBody\", \"postFlair\", \"nsfw\", \"spoiler\"],\n \"additionalProperties\": false\n}",
"onError": "{\n \"type\": \"object\",\n \"properties\": {\n \"error\": { \"type\": \"string\" }\n },\n \"required\": [\"error\"]\n}"
},
"maxFeedbackLoops": 0,
"maxToolRetries": 3
},
"measured": {
"width": 160,
"height": 40
},
"selected": false,
"dragging": false
},
{
"id": "d6dbd8d2-b017-486f-bdbf-a310b994d497",
"type": "data-flow-spy",
"position": {
"x": 1293,
"y": 317
},
"data": {
"title": "Data Flow Spy"
},
"measured": {
"width": 120,
"height": 40
},
"selected": false,
"dragging": false
}
],
"edges": [
{
"type": "smoothstep",
"animated": false,
"source": "ddd49c73-5b22-44c3-a105-dc2932aefe76",
"sourceHandle": "right-source",
"target": "c94d442b-c03b-4101-a2ab-5d8a8a9b6cb9",
"targetHandle": "tools-target",
"id": "xy-edge__ddd49c73-5b22-44c3-a105-dc2932aefe76right-source-c94d442b-c03b-4101-a2ab-5d8a8a9b6cb9tools-target"
},
{
"type": "smoothstep",
"animated": false,
"source": "586facaf-6c70-4b30-87ed-604556a11d72",
"sourceHandle": "right-source",
"target": "a312c98d-1904-4775-a370-7d8cb0640624",
"targetHandle": "left-target",
"id": "xy-edge__586facaf-6c70-4b30-87ed-604556a11d72right-source-a312c98d-1904-4775-a370-7d8cb0640624left-target"
},
{
"type": "smoothstep",
"animated": false,
"source": "d442cdaa-15da-4f0b-867b-ae26ee996d8d",
"sourceHandle": "right-source",
"target": "d6dbd8d2-b017-486f-bdbf-a310b994d497",
"targetHandle": "left-target",
"id": "xy-edge__d442cdaa-15da-4f0b-867b-ae26ee996d8dright-source-d6dbd8d2-b017-486f-bdbf-a310b994d497left-target",
"selected": false
},
{
"type": "smoothstep",
"animated": false,
"source": "c94d442b-c03b-4101-a2ab-5d8a8a9b6cb9",
"sourceHandle": "right-source",
"target": "586facaf-6c70-4b30-87ed-604556a11d72",
"targetHandle": "left-target",
"id": "xy-edge__c94d442b-c03b-4101-a2ab-5d8a8a9b6cb9right-source-586facaf-6c70-4b30-87ed-604556a11d72left-target"
},
{
"type": "smoothstep",
"animated": false,
"source": "a312c98d-1904-4775-a370-7d8cb0640624",
"sourceHandle": "right-source",
"target": "d442cdaa-15da-4f0b-867b-ae26ee996d8d",
"targetHandle": "left-target",
"id": "xy-edge__a312c98d-1904-4775-a370-7d8cb0640624right-source-d442cdaa-15da-4f0b-867b-ae26ee996d8dleft-target"
}
]
}
- AI Data Processing (Writer)
- Model:
gemma4:e2b - Prompt: Instructs the AI to search for the latest AI technology news using DuckDuckGo and output a single JSON object with the Reddit post fields.
- Max Feedback Loops:
1 - Max Tool Retries:
3
- Model:
- DuckDuckGo Search Tool
- Max Results:
5 - Require Tool Use:
true
- Max Results:
- AI Data Processing (Formatter)
- Model:
llama3.2:3b - Prompt: Reformats and validates the JSON structure from the writer node.
- Format on Success: JSON schema enforcing the Reddit post object shape.
- Format on Error: JSON schema returning an
errorfield. - Max Feedback Loops:
0 - Max Tool Retries:
3
- Model:
- Data Validation
- Schema: Enforces
subreddit,postType,postTitle,postBody,postFlair,nsfw, andspoilerfields.
- Schema: Enforces
- Reddit Post
- Client ID: (your Reddit app Client ID)
- Client Secret: (your Reddit app Client Secret)
- Post Provided by Upstream:
true
- Data Flow Spy
- Inspects the Reddit Post node output for debugging.
Steps
- Search and draft the post
- The first AI Data Processing node uses the DuckDuckGo Search tool to gather the latest AI technology news, then drafts a Reddit post as a JSON object.
- Reformat the output
- A second AI Data Processing node (llama3.2:3b) receives the draft and ensures the JSON strictly conforms to the expected shape, returning an error object if it does not.
- Validate the structure
- The Data Validation node applies a JSON schema to guarantee all required fields are present and correctly typed before the post is submitted.
- Submit to Reddit
- The Reddit Post node reads the upstream JSON and submits the post using the configured OAuth credentials.
- Inspect the result
- The Data Flow Spy node captures the Reddit Post node output for debugging and verification.
Common Use Cases
- Automated news summaries: Publish periodic AI-generated news digests to a subreddit.
- Content pipeline testing: Use
r/testas a sandbox to validate the full post pipeline before switching to a real subreddit. - Research-to-post automation: Chain any research source to the formatter and post the results to Reddit automatically.
Best Practices
- Authenticate before sharing: Complete the Reddit OAuth flow in the Reddit Post node settings before running or exporting this workflow.
- Use
r/testfirst: Always test withr/testto avoid unintended posts to real subreddits. - Never commit credentials: The
clientId,clientSecret, andaccessTokenfields are intentionally left empty in this template — fill them in at runtime only. - Tune the writer prompt: Adjust the writer node's prompt to target a different topic, subreddit, or post format.
- Increase
maxFeedbackLoops: If the writer model frequently produces malformed JSON, raising the feedback loop count gives it more attempts to self-correct.
Troubleshooting
- Post not submitted: Verify that the Reddit OAuth flow has been completed and the access token is valid. Re-authenticate if needed.
- Validation fails: Check the Data Validation node schema and ensure the formatter node's output exactly matches the required fields (including
postFlair: ""). - AI returns malformed JSON: Increase
maxFeedbackLoopson the writer node or switch to a larger/more instruction-following model. - Missing news results: Confirm the DuckDuckGo Search tool has
requireToolUse: trueand that the writer prompt explicitly instructs tool usage. clientId/clientSecretnot persisted after save: These fields are sanitized on workflow export by design — enter them directly in the node settings each session.