how many instances of s are there in:
q: how to create workflow based on expiry date? i have a custom list on which all members will upload some document with some expiry date, now i need to create a workflow that warns the user before x number of days from the expiry date with some custom message?
note: i have some restrictions on spd in my office, so answers which dont involve spd are preferred.

a: you will find below an image how you can do it using visual studio : 

in this exemple the workflow will send email daily.
in delay you specify the duration time you wish to wait before checking again.
timespan.fromdays(1)

a: this will not work 100% in office 365 since the timer service that triggers the workflow only runs once per week. if youre ok with a bit of a delay in some cases (for o365) or youre on-prem and have access to change timer job settings, read on.
what youre looking for is under:
list settings > information management policy settings > (select content type, e.g. document) > (check) enable retention > add a retention stage...
at this point, youll need to get creative if you cant use sharepoint designer, since setting it to run a custom workflow that sends an email is the simplest option. ive never done it but you should be able to transfer to another location and have an alert setup in that location whenever something is added? again, i havent tried that approach.
as i mentioned, something thats required to make this work is to ensure the timer service that triggers these retention policies runs daily. the two timer jobs youre looking for are information management policy and expiration policy. by default they each run once per week. this isnt something you can change in office 365, however.

user
There are 82 "s"s in the text you provided.
assistant