Atividades
Mais recente
falso
Atividades de produtividade
Last updated 1 de jul de 2024

Conexões

Esta seção ajuda você a configurar as conexões necessárias para acessar APIs de serviços que usam conexões.

Para configurar essa conexão, comece criando uma conexão no Integration Service. As conexões que você cria no Integration Service são acessíveis dentro da mesma organização e tenant que sua automação codificada onde você estiver trabalhando. Você pode usar o objeto connections para acessar as conexões que você criou anteriormente no Integration Service e, em seguida, acessar as APIs correspondentes.

Depois de concluir a automação e publicá-la no Orchestrator, você tem a opção de substituir as configurações de conexão iniciais que você realizou no código.

Pré-requisitos

Crie uma conexão no Integration Service:

  1. Vá para o Integration Service e navegue até Conexões.
  2. Selecione Adicionar conexão e crie uma conexão para um dos seguintes aplicativos:
    • Google Drive
    • Gmail
    • Planilhas Google

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 + Espaço 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:
    • Drive
    • Gmail
    • GoogleSheets
  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.
  • Pré-requisitos
  • Etapas
  • Substituição da conexão no Orchestrator

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.