Integration Service for Twilio Send Message on Unattended Robots

I had a program to send SMS messages: I upgrade to the package “Twilio by UiPath” v4.0.5 for Windows compatibilities with 2022.10.1. I define and now used a connection for Twilio in “UiPath Integration Service”.

The program work fine within Studio or as an Attended process from UiPath Assistant, but will fail if execute as an Un-Attended Robot in Orchestrator. All those tests are executed on the same PC.

Any hints how to fix that?

Job Detail log:

System.AggregateException: One or more errors occurred. (Unable to find a connection of type uipath-twilio-messaging with the specified Id ‘312XXXXX-XXXX-XXXX-XXXX-XXXXXXX6d1c6’.) —> UiPath.IntegrationCore.Utilities.ConnectionException: Unable to find a connection of type uipath-twilio-messaging with the specified Id '312XXXXX-XXXX-XXXX-XXXX-XXXXXXX6d1c6. at UiPath.IntegrationCore.Services.ConnectionService.Connect(IConnectionParameters connectionRequest)

at UiPath.BAF.Activities.BAFAsyncCodeActivity`1.<>c__DisplayClass31_0.<b__1>d.MoveNext()

— End of stack trace from previous location —

at UiPath.BAF.Telemetry.TelemetryServiceBase.OperationContextAsync[T](TelemetryProperties telemetryProperties, Func2 method, IDictionary2 activityTelemetryProperties, BusinessEntity businessEntity)

— End of inner exception stack trace —

at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)

at System.Threading.Tasks.Task`1.get_Result()

at UiPath.BAF.Activities.BAFAsyncCodeActivity`1.Connect(CodeActivityContext context)

at UiPath.BAF.Activities.BAFAsyncCodeActivity`1.SetupScopeActivityContext(CodeActivityContext context)

at UiPath.BAF.Activities.BAFAsyncCodeActivity`1.GetScopeActivityContext(CodeActivityContext context)

at UiPath.BAF.Activities.CrudActivityBase.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)

at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)

at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Hi @mc77101

Would you mind sharing some additional screenshot of how the process is set up and how the integration service connection looks like?

Hi Maciej,

My process is a simple single activity that uses the “Send Message” from the Twilio package 4.0.5. I’m using my Default Twilio connection from the Integration Service:

Integration Services

Connect Twilio

As mentioned, the process works fine if used as an Attended process but will fail if it is called as a Un-Attended process from Orchestrator (Same machine, same ID, … ). At this point I assume that my Twilio connection is properly defined since it works as Attended.

Fail with the “Unable to find a connection of type uipath-twilio-messaging” error.

Hi @mc77101

Is maybe the user different for the two executions? The connections are per user, so to make it work I think you would need to run the unattended session with the same Orchestrator user the one the connection was configured for.

I believe shared connections are an improvement that is on the roadmap.