I have an process that reads from an excel (CSV) file the text numbers, and text message. Then uses the UiPath.IntegrationService.Activities.RuntimeActivities.ConnectorActivity Send Message to send a text message with Twilio messaging service. If I run the process in Studio, it all works fine. If I run it in Assistant or Orchestrator, then I get the error:
Object reference not set to an instance of an object.
When it is trying to load up the Twilio Integration Service connection.
The only workaround I found was adding a 30 second per text message delay, but that only works if I run it in Assistant. It still won’t work if I run it in Orchestrator.
From my understanding the Integration Service connection should be available at Tenant level, which means I should not have to configure anything for it to run in Orchestrator. Any ideas on how to fix this without adding a large delay? Right now, it is taking hours to send out text messages in Assistant due to the 30 second delay per text message. I have also tried adding a retry scope, which does not help at all.
Hi, @BotMasterJ you need to explicitly initialize the connection at the start use Connect Activity from UiPath Integration Service and Set Service = Twilio and Connection Name (exactly as in Orchestrator). Save output to a variable e.g. twilioConnection.
Use the variable in Send Message: Set Connection = twilioConnection instead of relying on default.
Remove the 30s delay.
Add optional small retry scope (3 retries, 3–5s delay) only if network is unstable.
I understand what the theory behind what you are asking me to do, but this is programmed in VB using the Send Message Activity for Twilio created by UiPath, which does not have a connect activity option. When I search thru all the options in UiPath, I don’t see a connect activity option at all. Any other options?
@BotMasterJ You are right, my bad There is no separate Connect activity for Twilio it’s handled in Orchestrator. Just make sure the Twilio connection shows as Connected in Integration Service then re-select that same connection in the Send Message activity in Studio and republish. That usually fixes the error in Assistant/Orchestrator.
I added a fake http request call before trying to send the text messages. Again this code worked fine in studio. I tried to run it in Orchestrator and this is the error I got: Twilio HTTP Request: Failed to retrieve connection. Consider using a different connection. - User ‘XXXX’ does not have Connections.View permissions in [Connection: XXXX] Error code: DAP-GE-3000. Is there anywhere to setup permissions for this? I thought permissions for the connection was at the tenant level.