Then, you can map each of the matched values in the columns in Google Sheets.
You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.
-
Copy the code below by clicking the copy button when you mouseover the top-right of the code block
-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV to paste in the canvas.
-
Click on each imported module and save it. You may need to remap some variables.
Modules JSON Export
{
"subflows": [
{
"flow": [
{
"id": 34,
"module": "util:ComposeTransformer",
"version": 1,
"parameters": {},
"mapper": {
"value": "Invoice no.: 6089856/13/2024/F\nAmount to be paid:\n$424.45\npayment date\n13/02/2024\n\nInvoice no.: 7089856/13/2024/F\nAmount to be paid:\n$324.45\npayment date\n14/02/2024\n\nInvoice no.: 8089856/13/2024/F\nAmount to be paid:\nUSD 224.45\npayment date\n15/02/2024"
},
"metadata": {
"designer": {
"x": -294,
"y": -704
},
"restore": {},
"expect": [
{
"name": "value",
"type": "text",
"label": "Text"
}
]
}
},
{
"id": 35,
"module": "regexp:Parser",
"version": 1,
"parameters": {
"pattern": "Invoice no\\.:\\s+(?<invoice>[^\\n]+)\\s+Amount to be paid:\\s+(?:\\$|USD\\s)(?<amount>\\d[\\d,]+(?:\\.\\d{2})?)\\s+payment date\\s+(?<date>\\d{2}\\/\\d{2}\\/\\d{4})",
"global": true,
"sensitive": true,
"multiline": false,
"singleline": false,
"continueWhenNoRes": false,
"ignoreInfiniteLoopsWhenGlobal": false
},
"mapper": {
"text": "{{34.value}}"
},
"metadata": {
"designer": {
"x": -48,
"y": -702
},
"restore": {
"parameters": {
"multiline": {
"collapsed": true
},
"singleline": {
"collapsed": true
}
}
},
"parameters": [
{
"name": "pattern",
"type": "text",
"label": "Pattern",
"required": true
},
{
"name": "global",
"type": "boolean",
"label": "Global match",
"required": true
},
{
"name": "sensitive",
"type": "boolean",
"label": "Case sensitive",
"required": true
},
{
"name": "multiline",
"type": "boolean",
"label": "Multiline",
"required": true
},
{
"name": "singleline",
"type": "boolean",
"label": "Singleline",
"required": true
},
{
"name": "continueWhenNoRes",
"type": "boolean",
"label": "Continue the execution of the route even if the module finds no matches",
"required": true
},
{
"name": "ignoreInfiniteLoopsWhenGlobal",
"type": "boolean",
"label": "Ignore errors when there is an infinite search loop",
"required": true
}
],
"expect": [
{
"name": "text",
"type": "text",
"label": "Text"
}
],
"interface": [
{
"type": "text",
"name": "invoice",
"label": "invoice"
},
{
"type": "text",
"name": "amount",
"label": "amount"
},
{
"type": "text",
"name": "date",
"label": "date"
},
{
"type": "uinteger",
"name": "i",
"label": "i"
},
{
"type": "any",
"name": "__IMTMATCH__",
"label": "Fallback Match"
}
]
}
},
{
"id": 37,
"module": "google-sheets:addRow",
"version": 2,
"metadata": {
"designer": {
"x": 196,
"y": -702
}
}
}
]
}
],
"metadata": {
"version": 1
}
}