Hola a todos,
Llevo tiempo dándole vueltas a un problema que se me presentó con la actividad “Para cada correo electrónico” en la actividad "Utilizar la aplicación Outlook de escritorio.
Resulta que estoy conectándome a un correo e itero cada correo que encuentra con archivos adjuntos en una “Carpeta de búsqueda” con los criterios de fecha de ayer o una fecha que yo elija.
El bot recorre una X cantidad de correos y salta el error de “Contenttype cannot be an empty string”.
He buscado en foros en inglés y español y no he podido encontrar una solución.
Este es es el log de la exception:
RemoteException wrapping System.ArgumentException: The parameter ‘contentType’ cannot be an empty string. (Parameter ‘contentType’)
at System.Net.Mime.ContentType…ctor(String contentType)
at UiPath.Mail.Outlook.OutlookService.<>c__DisplayClass31_0.g__AddAttachment|0(Attachment attachment)
at UiPath.Mail.Outlook.OutlookMailItemExtensions.ForEachAttachment(MailItem mailItemComObject,
Action1 doAction) at UiPath.Mail.Outlook.OutlookService.<>c__DisplayClass31_0.<LoadAttachmentsAsync>b__1(Application outlook) at UiPath.Mail.Outlook.OutlookHelper.RunWithOutlook[T](Func
2 func)
at UiPath.Mail.Outlook.OutlookService.LoadAttachmentsAsync(MailMessage mailMessage,
Func2 filter, CancellationToken cancellationToken) at UiPath.Mail.Activities.Business.ForEachEmailX.<>c__DisplayClass42_0.<WrapWithDownloadAttachments>b__1() at System.Threading.Tasks.Task
1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread,
ExecutionContext executionContext,
ContextCallback callback,
Object state)
— End of stack trace from previous location —
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot,
Thread threadPoolThread)
— End of stack trace from previous location —
at UiPath.Mail.Activities.Business.ForEachEmailX.g__DownloadAttachments|42_0(MailMessage message)
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at UiPath.Shared.Activities.Business.ForEachEnumeratorExtensions.Iterate[T](Variable
1 enumeratorVariable,
NativeActivityContext context,
ActivityInstance completedInstance,
Boolean exitLoop,
Action1 doAction, Action
1 completedAction,
Action`1 exitAction)
at UiPath.Mail.Activities.Business.ForEachEmailX.InternalExecute(NativeActivityContext context,
ActivityInstance completedInstance)
at System.Activities.Runtime.ActivityCompletionCallbackWrapper.Invoke(NativeActivityContext context,
ActivityInstance completedInstance)
at System.Activities.Runtime.CompletionCallbackWrapper.CompletionWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
Espero puedan ayudarme con esto.
Muchas gracias.