Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@bunnarin/plugin-workflow-endpoint

Description

This plugin extends the @nocobase/plugin-workflow with an Endpoint Trigger and a Response Instruction. It allows you to trigger workflows via HTTP requests and return custom responses directly to the caller.

Features

  • Endpoint Trigger: Execute workflows by calling a specific endpoint URL.
  • Response Instruction: Control the HTTP response (body and status code) from the workflow.

1. Create an Endpoint Workflow

  1. Go to Workflow in the Admin UI.
  2. Click Create Workflow.
  3. Set the Type to Endpoint. (if you don't see it, just docker restart the container)
  4. Give it a unique Title (e.g., My Public API).
  5. Enable the workflow.

2. Configure the Trigger

  1. Add an Endpoint node to your workflow.
  2. Configure the Title to match the workflow title you set above.
  3. (Optional) Configure the Method (GET, POST, PUT, DELETE).

3. Configure the Response

there are only 2 way to set the response node: either hardcode it and use no variable or inject a single variable. so I suggest you use a JSON node or a JS node to create the json and then pass it to the response.

4. Call the Endpoint

Use the following URL format:

/api/workflows.endpoint:execute?title=YourWorkflowTitle

Security

  • By default, endpoints are public (no authentication required).
  • You can use the x-role header to specify a role:
curl -X POST http://localhost:13000/api/workflows.endpoint.execute?title=MyPublicAPI \
  -H "x-role: admin" \
  -H "Content-Type: application/json" \
  -d '{"name": "John"}'

License

MIT

About

a nocobase workflow that is like a webhook but can return response

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages