Hello @TimMolleman-2324 - Welcome & thank you for posting on MS Q&A!
You can achieve the end goal just by using the slice()
alone:
slice(triggerBody()?['Title'], 0, 34) // will return "https://sharepoint/sites/test-site"
slice(triggerBody()?['Title'], 34) // will return "/Documents/somereport.pdf"
The two expressions above can be used separately, as-is across any Actions defined below the Trigger in your overall workflow, however, if you must consume their values from a variable, you can absolutely do so as well by running the same expressions above in conjunction with a variable of a specific type (array, string, etc.) of your choosing. For more, please review: Store and manage values by using variables in Azure Logic Apps
I hope this helps - let me know if you have any questions!