mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2025-11-20 17:48:34 +00:00
14 lines
422 B
Python
14 lines
422 B
Python
import requests
|
|
import html
|
|
|
|
def define_env(env):
|
|
"Hook function"
|
|
|
|
@env.macro
|
|
def workflowDemo(workflow_endpoint):
|
|
r = requests.get(url = workflow_endpoint)
|
|
workflow_json = r.content.decode("utf-8")
|
|
print(workflow_json)
|
|
return f"<div class='workflow_preview'><n8n-demo clicktointeract='true' frame='true' collapseformobile='false' workflow='{workflow_json}'></n8n-demo></div>"
|
|
|