Google API in OpenRPA

Hi everyone,

I’m looking for guidance on integrating Google APIs (Gmail, Sheets, Drive, etc.) with OpenRPA.
I already have the Google API project and credentials created, but since OpenRPA doesn’t have a built-in Google connector, I’m unsure about the recommended way to authenticate and call these APIs.

Is the correct approach to use Python activities (via RunPython / RunScript) and handle OAuth / service-account authentication manually?
If so, any examples or best practices for:

  • Loading credentials (service account)

  • Handling token refresh

  • Making API calls inside an OpenRPA workflow

would be very helpful.

Thanks in advance for any guidance!

Originally, OpenRPA was meant to ONLY be RPA, and all API integration would be done from NodeRED. The idea was you “orchestrate” the automation from NodeRED, and that could also involve calling a robot to do something.
Nowadays, you primarily drive the automation using work item queues, where each queue is then linked to either an OpenRPA workflow, real code on an agent, or a NodeRED workflow.

You can run Python/VB/C# in OpenRPA, but it was never meant for “real” code. It is a convenient way to quickly write some code when it would be too complex to do in a workflow. For more complex code or use of external modules, the idea is to use an agent (see more here: Agent Quick Start Guide | OpenIAP Documentation). If all you need is to consume a few Google services, there is a Google node in NodeRED that supports all three authentication methods towards Google’s APIs for easy integration. However, I know there are multiple people who have successfully made integrations with Google Sheets from OpenRPA and Python in Invoke code though.

OpenCore allows you to encrypt any sensitive data by adding property names to the _encrypt array. For a “getting started” solution, if you only need to store usernames and passwords, you can use the Credentials tab in OpenCore, which does this for you and saves the values in the openrpa collection. For NodeRED, all credentials are automatically encrypted by the storage provider, so you can safely use any credential/password field in Node’s mode and be assured they are stored safely. We don’t have a way to encrypt files, but Google’s credentials file is just JSON, so you can easily store that in a text field in NodeRED or as a document in the database (remember to use the _encrypt property).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.