How to run a workflow to check a Lightning Node
This tutorial will take you through running a workflow to check a Lightning Node for compliance and risk issues.
You need to have an API key for this tutorial. Check how to authenticate your API calls here.
Template
Reflex provides a template for running checks against a node using OFAC comprehensively sanctioned countries list for IP checks.
Template ID: 57e37de9-101f-41f6-8827-91e075b50225
Custom templates are only available to enterprise users. Please reach out if you need access to custom templating features.
Running the workflow
For this workflow we are going to be running checks against the node Megalith LSP , passing a webhook URL to get notified of the result of the workflow and an email address to get the workflow report if it fails.
Query
mutation Create($input: WorkflowRunInput!) {
workflows {
runs {
create(input: $input) {
workflow_run_id
}
}
}
}
Variables
{
"input": {
"template_id": "57e37de9-101f-41f6-8827-91e075b50225",
"webhook_url": "https://webhookendpoint.com",
"workflow_input": [
{
"name": "PUBKEY",
"value": "038a9e56512ec98da2b5789761f7af8f280baf98a09282360cd6ff1381b5e889bf"
}
],
"notification_settings": {
"emails": [
{
"email": "[email protected]"
}
],
"trigger": {
"type": "STATUS",
"status": "FAILURE"
}
}
}
}
Result
Once we start the workflow we will get the workflow_run_id
. With this ID you can query the API to get additional information about the run.
{
"data": {
"workflows": {
"runs": {
"create": {
"workflow_run_id": "83a2a29e-d8f5-4f07-a629-17921dbdba9a"
}
}
}
}
}
UI
You can also see the result of the workflow in our dashboard.