Check a Lightning Node
This guide walks 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-91e075b50225Custom templates are only available to enterprise users. Please reach out if you need access to custom templating features.
Running the workflow
For this walkthrough we’ll run checks against the node Megalith LSP , passing a webhook URL to get notified of the result and an email address to receive the workflow report on failure.
Send the mutation
Call the workflows.runs.create mutation with the template ID and the target pubkey.
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"
}
}
}
}Receive the workflow_run_id
Once started, you’ll receive a workflow_run_id. Use it to query additional information about the run.
{
"data": {
"workflows": {
"runs": {
"create": {
"workflow_run_id": "83a2a29e-d8f5-4f07-a629-17921dbdba9a"
}
}
}
}
}View the result in the dashboard
You can also see the result of the workflow in our dashboard.
