Describe the problem/error/question
I am wanting to pull information from a string of data, and have that information flow into a google sheets file (Sheets file is the easy part, and already done).
The data comes from a pager decoder, which then gets emailed and pulled into N8N.
The strings I am pulling, have information that looks similar to the below (Information removed for security)
9999099 07:42:44 06-07-23 (CALS221, CALS223, CALS274, CALS228) STRU (Alarm Type MANUAL/THE) COMPANY NAME (COMMON NAME) BUILDING NAME 14 STREET DR SUBURB NORTH CITY CITY. (XStr STREET RD/) #F1111811 - UNIT
9909999 06:44:42 06-07-23 FI REGION GROUP - STRU 39 STREET RD SUBURB CITY CITY. (XStr STREET WAY/STREET TCE) .CAR FIRE - ENDANGERING HOUSE | TOC 9999 TOA 9999. (x-999999 y-999999) #F1211111 - UNIT
9099999 11:24:49 06-07-23 (CALS221, CALS223, CALS274) STRU BUILDING NAME GRANDSTAND UNKN0695 STREET ST SUBURB CITY CITY. (XStr STREET ST/) .ALARM ACTIVATION - COMMERCIAL. #F1111119 - UNIT
Occasionally this gets part information, usually it will get one that’s full (example 1/3), then a few ones that are part (example 4), I have tried to setup the ‘if’ module to ignore these
9999119 07:42:46 06-07-23 (CALS221, CALS223, CALS274, CALS228) STRU (Alarm Type MANUAL/THE) Company Name (COMMON N-
I currently have this workflow, but some information trips it up, and I get coordinates in the Units field, address in the details field etc. This is due to each pager being different, different lengths etc.
Everything after the date is generally different, usually keeping the format of (Units → type/urgency → building name/address → XStr → FNumber
Things that are common throughout - UNITS there are around 30-40 of these that come through, type/urgancy is usually one of about 6 different options
Just wondering if there is anyway to improve this script to be a bit more reliable / accepting of the different formats that get sent through? At its current state, strings similar to the first example come through pretty well and fit nicely.
Hopefully that all makes sense, and appreciate any assistance anyone can provide
Please share your workflow
(I am aware of all legalities of this, and this is all above board)
Information on your n8n setup
- n8n version: 0.234.0
- Database (default: SQLite): Default
- n8n EXECUTIONS_PROCESS setting (default: own, main): Default
- Running n8n via (Docker, npm, n8n cloud, desktop app): unRaid Docker