{
"$schema": "http://json-schema.org/draft-07/schema#",
"$defs": {
"Step": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runJs"
]
},
"script": {
"type": "string"
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"click"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"type"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForElement"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNavigation"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNetworkIdle"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"navigate"
]
},
"url": {
"type": "string",
"description": "The URL to navigate to",
"title": "URL"
},
"waitForNetworkIdle": {
"type": "boolean",
"description": "Whether or not to wait for the network to be idle after navigation",
"title": "Wait for Network Idle",
"default": true
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkElementExists"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkURL"
]
},
"url": {
"type": "string",
"description": "The URL to check against",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"waitForPdfDownload"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForURL"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"dropdownSelect"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"printPdf"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"fields"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"duration"
],
"properties": {
"action": {
"type": "string",
"enum": [
"sleep"
]
},
"duration": {
"type": "number",
"description": "The number of milliseconds to wait for",
"title": "Duration"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"url"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadPdf"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"url": {
"type": "string",
"description": "The URL to download the PDF from",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url",
"variable"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extractNetworkResponse"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"findResponse": {
"type": "string",
"description": "You get a list of all requests & responses. If you want to find a specific response, you can use this to filter the list",
"title": "Find Response"
},
"variable": {
"type": "string",
"description": "The name of the variable to store the response in",
"title": "Variable"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the response",
"title": "Transform"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"base64"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadBase64Pdf"
]
},
"base64": {
"type": "string",
"description": "The base64 encoded PDF content",
"title": "Base64"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"script",
"action",
"forEach"
],
"properties": {
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"selector",
"action",
"forEach"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
}
],
"description": "Extracts a list of data from the page, and runs the given steps for each item",
"title": "Extract All"
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"then",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"then",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false
}
],
"description": "Runs the given steps if the condition is true",
"title": "If"
},
{
"type": "object",
"required": [
"action",
"snippet",
"args"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runSnippet"
]
},
"snippet": {
"type": "string",
"enum": [
"getInvoiceFromStripeUrl",
"getInvoicesFromStripeBillingPortal"
]
},
"args": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "The URL to use in the snippet",
"title": "URL"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"description": "Runs a predefined snippet with the given configuration",
"title": "Run Snippet",
"examples": [
{
"action": "runSnippet",
"snippet": "getInvoiceFromStripeUrl",
"args": {
"url": "https://example.com/invoice"
}
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"config",
"option"
],
"properties": {
"action": {
"type": "string",
"enum": [
"exposeOption"
]
},
"config": {
"type": "string"
},
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"description": "Exposes the given configuration option to the user",
"title": "Expose Configuration Option"
},
{
"type": "object",
"required": [
"action",
"config"
],
"properties": {
"action": {
"type": "string",
"enum": [
"promptOptionSelection"
]
},
"config": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
}
},
"type": "object",
"required": [
"id",
"name",
"startAuth",
"checkAuth",
"getDocuments"
],
"properties": {
"$schema": {
"type": "string",
"description": "The URL of the JSON schema used to validate the plugin",
"title": "JSON Schema"
},
"id": {
"type": "string",
"description": "The unique ID of the plugin",
"title": "Plugin ID"
},
"name": {
"type": "string",
"description": "The unique name of the plugin",
"title": "Plugin Name"
},
"description": {
"type": "string",
"description": "A short summary describing what the plugin does",
"title": "Plugin Description"
},
"homepage": {
"type": "string",
"description": "The URL of the service the plugin is for. Used for linking to the service and for the plugin logo.",
"title": "Plugin Homepage"
},
"userAgentOverride": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Overwrite the user agent of the browser",
"title": "Overwrite User Agent"
},
"autofill": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [],
"properties": {
"username": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [],
"properties": {
"selector": {
"type": "string"
},
"title": {
"type": "string"
}
},
"additionalProperties": false
}
],
"description": "The value to autofill. If set to `true`, the plugin will autofill the field. If set to a string, the plugin will autofill the field with the given value.",
"title": "Autofill Value",
"default": true
},
"password": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [],
"properties": {
"selector": {
"type": "string"
},
"title": {
"type": "string"
}
},
"additionalProperties": false
}
],
"description": "The value to autofill. If set to `true`, the plugin will autofill the field. If set to a string, the plugin will autofill the field with the given value.",
"title": "Autofill Value",
"default": true
},
"otp": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [],
"properties": {
"selector": {
"type": "string"
},
"title": {
"type": "string"
}
},
"additionalProperties": false
}
],
"description": "The value to autofill. If set to `true`, the plugin will autofill the field. If set to a string, the plugin will autofill the field with the given value.",
"title": "Autofill Value",
"default": true
},
"submit": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"required": [],
"properties": {
"selector": {
"type": "string"
},
"title": {
"type": "string"
}
},
"additionalProperties": false
}
],
"description": "The value to autofill. If set to `true`, the plugin will autofill the field. If set to a string, the plugin will autofill the field with the given value.",
"title": "Autofill Value",
"default": true
}
},
"additionalProperties": false
}
],
"description": "Autofill configuration for the plugin. If set to `true`, the plugin will show a Username, Password, and OTP field. If set to an object, you can configure the fields to show and optionally provide selectors for the fields.",
"title": "Autofill",
"default": true
},
"configSchema": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"password"
],
"description": "The type of the property.",
"title": "Type"
},
"title": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"value",
"label"
],
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "A list of options for the property. Only available for dropdowns.",
"title": "Options"
},
"description": {
"type": "string",
"description": "A brief description of what this property is used for",
"title": "Description"
},
"example": {
"type": "string",
"description": "An example value for this property",
"title": "Example"
},
"required": {
"type": "boolean",
"description": "Whether or not this property is required for the plugin to function",
"title": "Required"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The default value for this property",
"title": "Default"
},
"hidden": {
"type": "boolean",
"description": "Whether or not this property is hidden from the user",
"title": "Hidden"
}
},
"additionalProperties": false,
"description": "Defines a single property in the plugin configuration schema",
"title": "Configuration Property",
"examples": [
{
"type": "string",
"title": "Username",
"description": "The username for login",
"required": true
}
]
},
"description": "A list of properties that can be configured for the plugin",
"title": "Configuration Properties"
},
"startAuth": {
"type": "array",
"items": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runJs"
]
},
"script": {
"type": "string"
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"click"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"type"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForElement"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNavigation"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNetworkIdle"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"navigate"
]
},
"url": {
"type": "string",
"description": "The URL to navigate to",
"title": "URL"
},
"waitForNetworkIdle": {
"type": "boolean",
"description": "Whether or not to wait for the network to be idle after navigation",
"title": "Wait for Network Idle",
"default": true
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkElementExists"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkURL"
]
},
"url": {
"type": "string",
"description": "The URL to check against",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"waitForPdfDownload"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForURL"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"dropdownSelect"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"printPdf"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"fields"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"duration"
],
"properties": {
"action": {
"type": "string",
"enum": [
"sleep"
]
},
"duration": {
"type": "number",
"description": "The number of milliseconds to wait for",
"title": "Duration"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"url"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadPdf"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"url": {
"type": "string",
"description": "The URL to download the PDF from",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url",
"variable"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extractNetworkResponse"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"findResponse": {
"type": "string",
"description": "You get a list of all requests & responses. If you want to find a specific response, you can use this to filter the list",
"title": "Find Response"
},
"variable": {
"type": "string",
"description": "The name of the variable to store the response in",
"title": "Variable"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the response",
"title": "Transform"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"base64"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadBase64Pdf"
]
},
"base64": {
"type": "string",
"description": "The base64 encoded PDF content",
"title": "Base64"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"script",
"action",
"forEach"
],
"properties": {
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"selector",
"action",
"forEach"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
}
],
"description": "Extracts a list of data from the page, and runs the given steps for each item",
"title": "Extract All"
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"then",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"then",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false
}
],
"description": "Runs the given steps if the condition is true",
"title": "If"
},
{
"type": "object",
"required": [
"action",
"snippet",
"args"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runSnippet"
]
},
"snippet": {
"type": "string",
"enum": [
"getInvoiceFromStripeUrl",
"getInvoicesFromStripeBillingPortal"
]
},
"args": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "The URL to use in the snippet",
"title": "URL"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"description": "Runs a predefined snippet with the given configuration",
"title": "Run Snippet",
"examples": [
{
"action": "runSnippet",
"snippet": "getInvoiceFromStripeUrl",
"args": {
"url": "https://example.com/invoice"
}
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"config",
"option"
],
"properties": {
"action": {
"type": "string",
"enum": [
"exposeOption"
]
},
"config": {
"type": "string"
},
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"description": "Exposes the given configuration option to the user",
"title": "Expose Configuration Option"
},
{
"type": "object",
"required": [
"action",
"config"
],
"properties": {
"action": {
"type": "string",
"enum": [
"promptOptionSelection"
]
},
"config": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
},
"description": "Steps to authenticate the user",
"title": "Authentication"
},
"checkAuth": {
"type": "array",
"items": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runJs"
]
},
"script": {
"type": "string"
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"click"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"type"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForElement"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNavigation"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNetworkIdle"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"navigate"
]
},
"url": {
"type": "string",
"description": "The URL to navigate to",
"title": "URL"
},
"waitForNetworkIdle": {
"type": "boolean",
"description": "Whether or not to wait for the network to be idle after navigation",
"title": "Wait for Network Idle",
"default": true
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkElementExists"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkURL"
]
},
"url": {
"type": "string",
"description": "The URL to check against",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"waitForPdfDownload"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForURL"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"dropdownSelect"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"printPdf"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"fields"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"duration"
],
"properties": {
"action": {
"type": "string",
"enum": [
"sleep"
]
},
"duration": {
"type": "number",
"description": "The number of milliseconds to wait for",
"title": "Duration"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"url"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadPdf"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"url": {
"type": "string",
"description": "The URL to download the PDF from",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url",
"variable"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extractNetworkResponse"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"findResponse": {
"type": "string",
"description": "You get a list of all requests & responses. If you want to find a specific response, you can use this to filter the list",
"title": "Find Response"
},
"variable": {
"type": "string",
"description": "The name of the variable to store the response in",
"title": "Variable"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the response",
"title": "Transform"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"base64"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadBase64Pdf"
]
},
"base64": {
"type": "string",
"description": "The base64 encoded PDF content",
"title": "Base64"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"script",
"action",
"forEach"
],
"properties": {
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"selector",
"action",
"forEach"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
}
],
"description": "Extracts a list of data from the page, and runs the given steps for each item",
"title": "Extract All"
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"then",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"then",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false
}
],
"description": "Runs the given steps if the condition is true",
"title": "If"
},
{
"type": "object",
"required": [
"action",
"snippet",
"args"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runSnippet"
]
},
"snippet": {
"type": "string",
"enum": [
"getInvoiceFromStripeUrl",
"getInvoicesFromStripeBillingPortal"
]
},
"args": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "The URL to use in the snippet",
"title": "URL"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"description": "Runs a predefined snippet with the given configuration",
"title": "Run Snippet",
"examples": [
{
"action": "runSnippet",
"snippet": "getInvoiceFromStripeUrl",
"args": {
"url": "https://example.com/invoice"
}
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"config",
"option"
],
"properties": {
"action": {
"type": "string",
"enum": [
"exposeOption"
]
},
"config": {
"type": "string"
},
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"description": "Exposes the given configuration option to the user",
"title": "Expose Configuration Option"
},
{
"type": "object",
"required": [
"action",
"config"
],
"properties": {
"action": {
"type": "string",
"enum": [
"promptOptionSelection"
]
},
"config": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
},
"description": "Steps to check if the user is already authenticated",
"title": "Verify Authentication"
},
"getConfigOptions": {
"type": "array",
"items": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"config",
"option"
],
"properties": {
"action": {
"type": "string",
"enum": [
"exposeOption"
]
},
"config": {
"type": "string"
},
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"description": "Exposes the given configuration option to the user",
"title": "Expose Configuration Option"
},
{
"type": "object",
"required": [
"action",
"config"
],
"properties": {
"action": {
"type": "string",
"enum": [
"promptOptionSelection"
]
},
"config": {
"type": "string"
}
},
"additionalProperties": false
}
]
},
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runJs"
]
},
"script": {
"type": "string"
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"click"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"type"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForElement"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNavigation"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNetworkIdle"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"navigate"
]
},
"url": {
"type": "string",
"description": "The URL to navigate to",
"title": "URL"
},
"waitForNetworkIdle": {
"type": "boolean",
"description": "Whether or not to wait for the network to be idle after navigation",
"title": "Wait for Network Idle",
"default": true
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkElementExists"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkURL"
]
},
"url": {
"type": "string",
"description": "The URL to check against",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"waitForPdfDownload"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForURL"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"dropdownSelect"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"printPdf"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"fields"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"duration"
],
"properties": {
"action": {
"type": "string",
"enum": [
"sleep"
]
},
"duration": {
"type": "number",
"description": "The number of milliseconds to wait for",
"title": "Duration"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"url"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadPdf"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"url": {
"type": "string",
"description": "The URL to download the PDF from",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url",
"variable"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extractNetworkResponse"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"findResponse": {
"type": "string",
"description": "You get a list of all requests & responses. If you want to find a specific response, you can use this to filter the list",
"title": "Find Response"
},
"variable": {
"type": "string",
"description": "The name of the variable to store the response in",
"title": "Variable"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the response",
"title": "Transform"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"base64"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadBase64Pdf"
]
},
"base64": {
"type": "string",
"description": "The base64 encoded PDF content",
"title": "Base64"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"script",
"action",
"forEach"
],
"properties": {
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"selector",
"action",
"forEach"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
}
],
"description": "Extracts a list of data from the page, and runs the given steps for each item",
"title": "Extract All"
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"then",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"then",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false
}
],
"description": "Runs the given steps if the condition is true",
"title": "If"
},
{
"type": "object",
"required": [
"action",
"snippet",
"args"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runSnippet"
]
},
"snippet": {
"type": "string",
"enum": [
"getInvoiceFromStripeUrl",
"getInvoicesFromStripeBillingPortal"
]
},
"args": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "The URL to use in the snippet",
"title": "URL"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"description": "Runs a predefined snippet with the given configuration",
"title": "Run Snippet",
"examples": [
{
"action": "runSnippet",
"snippet": "getInvoiceFromStripeUrl",
"args": {
"url": "https://example.com/invoice"
}
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"config",
"option"
],
"properties": {
"action": {
"type": "string",
"enum": [
"exposeOption"
]
},
"config": {
"type": "string"
},
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"description": "Exposes the given configuration option to the user",
"title": "Expose Configuration Option"
},
{
"type": "object",
"required": [
"action",
"config"
],
"properties": {
"action": {
"type": "string",
"enum": [
"promptOptionSelection"
]
},
"config": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
}
]
},
"description": "Additional steps extract configuration options like teams or projects",
"title": "Get Configuration Options"
},
"getDocuments": {
"type": "array",
"items": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runJs"
]
},
"script": {
"type": "string"
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"click"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"type"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForElement"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNavigation"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForNetworkIdle"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"optional": {
"type": "boolean",
"description": "Whether or not the flow should continue if this step fails",
"title": "Optional"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"navigate"
]
},
"url": {
"type": "string",
"description": "The URL to navigate to",
"title": "URL"
},
"waitForNetworkIdle": {
"type": "boolean",
"description": "Whether or not to wait for the network to be idle after navigation",
"title": "Wait for Network Idle",
"default": true
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkElementExists"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"checkURL"
]
},
"url": {
"type": "string",
"description": "The URL to check against",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"waitForPdfDownload"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url"
],
"properties": {
"action": {
"type": "string",
"enum": [
"waitForURL"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"selector",
"value"
],
"properties": {
"action": {
"type": "string",
"enum": [
"dropdownSelect"
]
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"value": {
"type": "string"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"printPdf"
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"variable",
"fields"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extract"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. Defaults to `item`",
"title": "Variable"
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"duration"
],
"properties": {
"action": {
"type": "string",
"enum": [
"sleep"
]
},
"duration": {
"type": "number",
"description": "The number of milliseconds to wait for",
"title": "Duration"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"url"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadPdf"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"url": {
"type": "string",
"description": "The URL to download the PDF from",
"title": "URL"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"url",
"variable"
],
"properties": {
"action": {
"type": "string",
"enum": [
"extractNetworkResponse"
]
},
"url": {
"type": "string",
"description": "The URL to wait for",
"title": "URL"
},
"findResponse": {
"type": "string",
"description": "You get a list of all requests & responses. If you want to find a specific response, you can use this to filter the list",
"title": "Find Response"
},
"variable": {
"type": "string",
"description": "The name of the variable to store the response in",
"title": "Variable"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the response",
"title": "Transform"
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"document",
"action",
"base64"
],
"properties": {
"document": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"date"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the document",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document",
"title": "Document Date"
},
"type": {
"type": "string",
"enum": [
"invoice",
"receipt",
"refund",
"outgoing_invoice",
"other",
"auto"
],
"description": "The type of the document",
"title": "Document Type",
"default": "auto"
},
"total": {
"type": "string",
"description": "The amount of the document, including the currency symbol or code.",
"title": "Document Amount"
}
},
"additionalProperties": false
},
{
"type": "string",
"description": "Shorthand to pass a variable that contains the document data, e.g. `{{invoice}}`. Needs to include required fields `id`, `date`, and `total`",
"title": "Document Variable",
"pattern": "^.*}}$",
"allOf": [
{
"pattern": "^{{"
}
]
}
]
},
"metadata": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
},
"description": "Additional metadata to include in the exported invoice",
"title": "Metadata"
},
"action": {
"type": "string",
"enum": [
"downloadBase64Pdf"
]
},
"base64": {
"type": "string",
"description": "The base64 encoded PDF content",
"title": "Base64"
},
"description": {
"type": "string",
"description": "A human-readable description of what this step does",
"title": "Description"
}
},
"additionalProperties": false
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"script",
"action",
"forEach"
],
"properties": {
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"selector",
"action",
"forEach"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"fields": {
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "object",
"required": [
"selector"
],
"properties": {
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"attribute": {
"type": "string",
"description": "The attribute to get from the element. If not specified, the inner text will be used",
"title": "Attribute"
},
"transform": {
"type": "string",
"description": "A JavaScript function to transform the value",
"title": "Transform",
"examples": [
"(v) => Number(v.replace('$', ''))"
]
}
},
"additionalProperties": false
},
{
"type": "string"
}
]
}
},
"iframe": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"description": "Used to target an `` on the page. If set to `true`, the first `` will be used. If set to a string, it will match the iframe which `src` contains the given string.",
"title": "iFrame",
"examples": [
true,
"iframe.example.com"
]
},
"action": {
"type": "string",
"enum": [
"extractAll"
]
},
"variable": {
"type": "string",
"description": "The name of the variable to store the extracted value in. This is only available inside the forEach step, and represents a single item. Defaults to `item`",
"title": "Variable",
"default": "item"
},
"pagination": {
"type": "object",
"required": [
"selector"
],
"properties": {
"type": {
"type": "string",
"enum": [
"next"
],
"title": "Deprecated. Use behavior instead."
},
"behavior": {
"type": "string",
"enum": [
"paginateThenProcess",
"processThenPaginate"
],
"description": "Defines when forEach is processed during pagination. `processThenPaginate` process all items on the current page, and then paginates. `paginateThenProcess` paginates through all pages, then process all items at once. Defaults to `processThenPaginate`.",
"title": "Pagination Behavior",
"default": "processThenPaginate"
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
},
"waitForSelector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false,
"description": "Defines how to paginate through the results",
"title": "Pagination"
},
"forEach": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
}
},
"additionalProperties": false
}
],
"description": "Extracts a list of data from the page, and runs the given steps for each item",
"title": "Extract All"
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"then",
"script"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"script": {
"type": "string",
"description": "A JavaScript script to run in the page context",
"title": "Script",
"examples": [
"console.log(\"Hello World\");"
]
},
"timeout": {
"type": "number",
"description": "The number of milliseconds to wait for. Defaults to 15s.",
"title": "Timeout",
"default": 15000,
"examples": [
15000
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"action",
"then",
"selector"
],
"properties": {
"action": {
"type": "string",
"enum": [
"if"
]
},
"scopeSelector": {
"anyOf": [
{
"type": "boolean",
"description": "Defaults to true. If set, the selector will be scoped to the parent element",
"title": "Scope Selector",
"default": true
},
{
"type": "null"
}
]
},
"then": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/$defs/Step"
}
},
"selector": {
"type": "string",
"description": "The CSS selector to use to find the element",
"title": "Selector",
"examples": [
"#example"
]
}
},
"additionalProperties": false
}
],
"description": "Runs the given steps if the condition is true",
"title": "If"
},
{
"type": "object",
"required": [
"action",
"snippet",
"args"
],
"properties": {
"action": {
"type": "string",
"enum": [
"runSnippet"
]
},
"snippet": {
"type": "string",
"enum": [
"getInvoiceFromStripeUrl",
"getInvoicesFromStripeBillingPortal"
]
},
"args": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "The URL to use in the snippet",
"title": "URL"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"description": "Runs a predefined snippet with the given configuration",
"title": "Run Snippet",
"examples": [
{
"action": "runSnippet",
"snippet": "getInvoiceFromStripeUrl",
"args": {
"url": "https://example.com/invoice"
}
}
]
},
{
"anyOf": [
{
"type": "object",
"required": [
"action",
"config",
"option"
],
"properties": {
"action": {
"type": "string",
"enum": [
"exposeOption"
]
},
"config": {
"type": "string"
},
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [],
"properties": {},
"additionalProperties": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"description": "Exposes the given configuration option to the user",
"title": "Expose Configuration Option"
},
{
"type": "object",
"required": [
"action",
"config"
],
"properties": {
"action": {
"type": "string",
"enum": [
"promptOptionSelection"
]
},
"config": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
},
"description": "Steps to get all invoices as PDF",
"title": "Collect Invoices"
}
},
"additionalProperties": false,
"description": "Schema definition for a JSON-based plugin",
"title": "JSON Plugin Schema"
}