But on the topic: I think its a simple problem ultimately, the SF Api (https://developer.salesforce.com/docs/atlas.en-us.api_rest.m...) needs OAuth, which needs a redirect at some point, where I have no idea how to capture it from a livebook instance (easy in a phx app).
This is a reference lib in JS ( https://jsforce.github.io/ ) and there seems to be no maintained alternative on hex.pm unfortunately. So, from scratch it seems, somehow.
Additional insight: many big companies do use salesforce, and its internal tooling to produce reports/insights is rather limited, but there is a SQL-like language to do complicated stuff, but there is no way to execute a handwritten query in SF itself, except via API calls from outside. This... would be a perfect fit fro livebook! query SF + other databases to generate a report ad-hoc thats not easily possible right now without adding some heavyweight data warehouse connection!
If this is something you would like to work on, please reach out, I think it could open up interesting possibilities!
See: https://gist.github.com/Anonyfox/3f36c26fb00a9bc4067d6dc9c9a...
I sound totally dumb now to bitch about it, but glad I could solve it in like 1 hour in a sufficient way