Automation for your Agency

Automation for your Agency

September 25, 2025

Intro

Just recently I covered how to build a quick product with auth + a landing

Also, couple of marketers show me a cool workflow

If you read me for some time already, you are also aware of APIs, Webhooks and automations (not only with n8n)

How can this all be put together?

I mean…a ,custom’ solution that provides out of the box a UI for the final user.

n8n

alt text

alt text

BotPress

alt text

alt text


    

TypeBot

alt text


Conclusions

Use Cases

eBook Creation

Just in case you are aware of Pandoc.

And how to convert .md to cool pdf or even to epub for ebooks.

Real Estate Chat Bot

The FlaskCMS v2 for real estate was a great idea.

But how about if you can just scrap + get the property added for your collaborations?

alt text

Wasnt it cool that vibe coded gradient?

n8n x Github

Sample wf https://github.com/JAlcocerT/Home-Lab/blob/main/n8n/sample-workflows/4-openai-github_posts.json

How to push OpenAI generated .md to github with n8n 🚀

Creating this n8n workflow is straightforward. You’ll use three main nodes: Manual Trigger, OpenAI, and GitHub.

Here is a step-by-step guide to building the workflow.

1. Set Up the Workflow Structure

  1. Create a New Workflow: In your n8n dashboard, click “New” to start a blank workflow.

  2. Add the Trigger Node: Replace the existing Start node with the Manual Trigger node. This lets you manually input data (your message) when you execute the workflow.

    • Search for “Manual Trigger” and add it.

2. Get User Input and Send to OpenAI

Next, you’ll configure the trigger to accept your message and then pass it to OpenAI.

A. Configure Manual Trigger

  1. Click the Manual Trigger node.
  2. In the parameters pane, click “Add Parameter” and select “Prompt List”.
  3. Set the following values:
    • Field Type: Long Text
    • Field Name: input_message
    • Display Name: Your Message to OpenAI

B. Configure OpenAI Node

  1. Add an OpenAI node and connect it to the Manual Trigger node.

  2. Credentials: Select or create your OpenAI API credentials.

  3. Operation: Set to Chat Completion or Generate Text.

  4. Model: Choose a model like gpt-4o or gpt-3.5-turbo.

  5. Messages: This is where you pass your input.

    • Set the Role to User.
    • In the Content field, click the ‘Expression’ button (the gear icon) and select the variable from your trigger node:
      {{ $json.input_message }}
    • (Optional but Recommended): Add a System message above the User message to instruct the model to produce output in Markdown format:
      • Role: System
      • Content: Your task is to generate a comprehensive and well-structured response based on the user's message. Format all output using Markdown.
  6. Push the Markdown File to GitHub

The final step is taking the text output from the OpenAI node and creating a new file in your GitHub repository.

A. Configure GitHub Node

  1. Add a GitHub node and connect it to the OpenAI node.
  2. Credentials: Select or create your GitHub API credentials. (You’ll need a Personal Access Token with repo scope permissions.)
  3. Resource: Set to File.
  4. Operation: Set to Create.

B. Configure File Details

  1. Repository: Enter the name of your GitHub repository (e.g., my-content-repo).
  2. Branch: Enter the target branch, typically main or master.
  3. File Path: Set the path and name for the new file. You can use an expression to generate a unique filename based on the current time and a .md extension:
    output/{{ new Date().toISOString().replace(/:/g, '-') }}.md
    • This creates a file like output/2025-09-25T13-02-21-345Z.md.
  4. Content: Click the ‘Expression’ button to map the Markdown text from the OpenAI node. The path will typically be:
    {{ $json.choices[0].message.content }}
  5. Commit Message: Enter a message for the commit:
    New content generated by OpenAI for "{{ $json.input_message.substring(0, 30) }}..."

Test and Activate

  1. Test Execution: Click the Manual Trigger node and enter a test message (e.g., “Write a short article about self-hosting benefits.”).
  2. Click “Execute Workflow”.
  3. Check the output of each node. The GitHub node should report success.
  4. Verify the new Markdown file appears in your GitHub repository.
  5. Once everything works, click the “Active” toggle in the top right to enable the workflow for future manual use.

Github Personal Access Token

alt text

So writting posts into Github so that the SSG+CI/CD workflow starts be like:

alt text

See what they produce. Sample md

n8n x Scraping

Instead of having this cool streamlit web scrapper… and better than this n8n tg scrap wf

  1. With BS4

  2. Just use…FireCrawl with n8n https://www.npmjs.com/package/@mendable/n8n-nodes-firecrawl

n8n Firecrawl Setup

alt text

Lets use this Example page for re to scrap

What a better chance than this to start trying the when chat message received aka chat trigger node?

#https://n8n.jalcocertech.com/webhook/926db831-364e-4cbf-968b-c4abf21c640b/chat
 curl -X POST https://n8n.jalcocertech.com/webhook/926db831-364e-4cbf-968b-c4abf21c640b/chat -H "Content-Type: application/json" -d '{"message": "Hello, test message", "sessionId": "test-session-123"}'

For the chatbot interface to be rendered into a website:

  1. https://www.npmjs.com/package/@n8n/chat?activeTab=readme
  2. https://github.com/symbiosika/n8n-embedded-chat-interface

Yes, n8n provides a script that can be added to the head of a website to embed an interactive chatbot interface that sends and receives messages from an n8n workflow.

The “N8N Embedded Chat Interface” is a native web component that you can easily integrate on any website with just a few lines of HTML and JavaScript. You include a script tag linking the chatbot interface library from a CDN, then add a custom HTML tag with attributes specifying the webhook URL of your n8n workflow that handles the chatbot logic.

Example snippet to add to your website:

<script src="https://cdn.jsdelivr.net/npm/n8n-embedded-chat-interface@latest/output/index.js"></script>

<n8n-embedded-chat-interface 
  label="My AI Assistant" 
  hostname="https://your-n8n-webhook.com/webhook/:id-of-your-webhook-node" 
  open-on-start="false">
</n8n-embedded-chat-interface>

Your n8n workflow must have a webhook trigger node configured to receive POST requests from this widget, parse incoming chat messages, run your chatbot logic (e.g., calling an AI agent node like OpenAI), and respond with JSON containing the chatbot reply and session info.

The workflow should respond with JSON in this format:

{
  "output": "Chatbot response",
  "sessionId": "session-id"
}

This setup allows you to embed a fully functional conversational chatbot powered by n8n workflows directly into your website, supporting real-time interaction with users without needing separate chatbot hosting.[1][2][3][4][5]

1 2 3 4 5 6 7 8 9 10

n8n x APIFY

alt text

alt text

n8n x leads

Landing ChatBot with KB knowledge