This all looks a little flaky. I tried the solution proposed by @jacob1 and couldn’t get that to work. I got error messages about invalid character at line 1 column 3. I tried the solution proposed by @drted and couldnt get that to send anything. So I combined the two methods.
If you are having issues getting this to work try this approach.
-
In the query parameters of your web_api component add parameter app_id. in the value field add your onesignal api id
-
In the headers section add two items:-
(i) Authorisation. In the value field enter the word Basic followed by a space then paste your REST API KEY. Note I spelt authorisation with an "s". I dont know if that is important or if being in the UK, spellcheck did it. (ii) Content-Type. In the value field enter application/json.
Then in the blocks section I have this.
Also of note, the app variable PushToDrivers is a list of driver pushID’s from our database. We check this list each time we send a notification to see who is logged on so we only send to drivers who are working.
This approach appears to work so give it a go if you are stuck.
Cheers