Studio
2024.10
falso
Guia do usuário do Studio
Last updated 28 de jun de 2024

Criação de conexões para serviços em automações codificadas

This section helps you create connections needed to access APIs from services that use connections, such as GSuite.Activities and Excel.Activities within coded automations.

Start by creating a connection in Integration Service. The connections can be accessed within the same organization, and tenant of your coded automation project. Inside the coded automation, use the connections object to access the earlier created connections in Integration Service, and then access the corresponding APIs.

After you complete the automation and publish it to Orchestrator, you can override the original connection configurations set up in code, if needed.

Pré-requisitos

Crie uma conexão no Integration Service:

  1. Go to Integration Service, and select the tenant that your Studio is connected to.
  2. Navegue até Conexões.
  3. Selecione Adicionar conexão e crie uma conexão para um dos seguintes aplicativos:
    • Google Drive
    • Gmail
    • Planilhas Google
    • Microsoft Office 365

Etapas

  1. Open an existing coded automation from the same organization, and tenant where you initially created your connection.
  2. Dentro do corpo Execute(), digite connections e pressione Ctrl + Space para ver as conexões disponíveis.
    Dependendo do aplicativo para o qual você criou anteriormente o connection, você pode escolher entre os seguintes tipos de conexão:
    • GDrive
    • Gmail
    • GoogleSheets
    • Excel
    • OneDrive
    • O365Mail
  3. Further configure your connection by adding the Orchestrator folder name and the desired connection address, separated by underlines.
    For example, a Gmail connection for the My Workspace folder in Orchestrator, and for the john.doe@gmail.com address would be written in code as: connections.Gmail.My_Workspace_john_doe_gmail_com.
    Recomendação
    We recommend you to create your connections in one step to avoid potential errors. We also recommend you to create a variable for the connection. This way, if changes occur in Integration Service, you'll avoid updating every instance of the connection throughout your automation. Use the following approach:
    var myGmailConnection = connections.Gmail.My_Workspace_john_doe_gmail_com;var myGmailConnection = connections.Gmail.My_Workspace_john_doe_gmail_com;
    Avoid creating your connections in two separate steps like:
    var myGmailConnection = connections.Gmail;
    conn.My_Workspace_john_doe_gmail_com;var myGmailConnection = connections.Gmail;
    conn.My_Workspace_john_doe_gmail_com;
  4. Once you've established the connection, you can access the relevant APIs specific to a service through that connection.
    For example, if you have set up a Gmail connection as follows: var myGmailConnection = connections.Gmail.My_Workspace_john_doe_gmail.com, you can use the service's API using myGmailConnection.

Substituição da conexão no Orchestrator

  1. Publique seu projeto no Orchestrator.
  2. Go to the Orchestrator feed where you've published the project.
  3. Go to the published process and select Edit.
  4. Na Configuração do processo, escolha a automação codificada que contém sua conexão configurada como o ponto de entrada.
  5. In Package Requirements, find and select the corresponding connection type for your coded automation.

    Be careful to select the connection type for your coded automation, as connections for XAML files within your project also appear in the list.

  6. Identify and select the account address you plan to associate with the connection when it runs.

Limitação conhecida

The default connection of an exported library will work in other projects, only if the imported project is in the same tenant as the originating library project.

Was this page helpful?

Obtenha a ajuda que você precisa
Aprendendo RPA - Cursos de automação
Fórum da comunidade da Uipath
Logotipo branco da Uipath
Confiança e segurança
© 2005-2024 UiPath. All rights reserved.