Skip to content

⚙️ n8n Workflow Automation

Goal: Trigger your n8n workflow from Ainisa when a user message is received — for example, “Create blog about artificial intelligence”.


🧩 Example Scenario

Let’s say your assistant can send the user’s message to your n8n workflow, which automatically creates a blog draft, updates a database, or triggers another automation.

Example user input:

“Create blog about artificial intelligence.”

Ainisa will send this message to your n8n webhook as a message parameter.


🧠 Step-by-step Setup

1. Create a Webhook in n8n

  1. In your n8n dashboard, add a Webhook node.

  2. Copy the Production URL, for example:

    https://n8n.yourdomain.com/webhook/727c53d2-379e-499f-9181-e26e29417122

  3. Set HTTP MethodPOST.

  4. Add a Response Data field so Ainisa sees a confirmation:

  5. Add a Response Header:
    Name: Content-Type
    Value: application/json

Body Parameters Tab


2. Create a Custom API Action in Ainisa

Go to
https://ainisa.com/business/agents

  • Click AI ActionsCreate Action
  • Choose Action Type: Custom API

Then fill in:

FieldValue
Action NameCreate Blog (n8n)
When To UseWhen user asks to create or generate blog content
Request Method and URLPOST https://n8n.yourdomain.com/webhook/727c53d2-379e-499f-9181-e26e29417122
AuthorizationNone
Enabled✅ Yes

3. Define Body Parameters

Your Ainisa action should send structured data to n8n.
For this workflow, include the user’s message.

Input KeyInput TypeDescription
messagetextThe user’s message (for example “Create blog about artificial intelligence”)

Example payload Ainisa sends to n8n:

json
{  
"message": "Create blog about artificial intelligence",  
"user_email": "john@example.com", // if applicable
"user_id": "827", // if applicable
"user_hash": "adfb13e8d21"  // if applicable
}

4. Test Before Saving

Click Test Before Saving in Ainisa.
If n8n is listening for test events, you’ll immediately see a webhook trigger in your workflow.


5. Example Data Flow

  1. User message: “Create blog about artificial intelligence.”
  2. AI Action triggered → Custom API → POST to your n8n webhook.
  3. n8n receives request and parses body ($json.message = "Create blog about artificial intelligence").
  4. Workflow continues:
    • Generate text with OpenAI or Ainisa API
    • Save to Website, CMS or Notion
    • Send Slack / Telegram notifications
  5. Response from n8n: { "message": "Started to create blog" }
  6. Ainisa replies to user: “✅ Blog creation started!”

6. Example Use Cases

  • Create documents or blog drafts automatically
  • Forward customer messages to CRM or ticket systems
  • Send AI-generated reports to Google Sheets or Airtable
  • Trigger notifications or alerts in Slack, Discord, or Telegram
  • Automate marketing or analytics workflows

✅ Summary

This setup lets Ainisa be the front-end trigger — capturing user requests in chat —
while n8n acts as the back-end automation engine that processes, stores, or reacts to them.

Together they form a seamless AI + automation workflow with zero manual coding.