I want to add a webpart to a page in SharePoint online programmatically. I know the page name, but don't the webpartzone id since it is SharePoint online. Is it still possible to add my webpart to the page programmatically? If yes how?
One of the challenges when working with Sandboxed Solutions is how to provision Web Parts instances to pages. If you have done this before in a Farm Solution you know, that in order to add a Web Part to a page programmatically in SharePoint you have to retrieve the instance of the SPLimitedWebPartManager class and use it to add the instance of a Web Part to a page. Unfortunately, as the SDK mentions, the SPLimitedWebPartManager class is not available in Sandboxed Solutions which means that you cannot programmatically add a Web Part to a page from within a Sandboxed Solution.
For more detials check:
What I would do is take a look at the OfficeDev Patterns and Practices project on Github. There are plenty of examples for writing CSOM for SharePoint Online.
All examples are using the new App Model with plenty of helper classes available to do what you need.
Hope these help!