Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Crie um fluxo de trabalho através da Google Cloud consola
Este guia de início rápido mostra como criar, implementar e executar o seu primeiro fluxo de trabalho
usando a Google Cloud consola. O fluxo de trabalho de exemplo envia um pedido a uma API pública e, em seguida, devolve a resposta da API.
Para seguir orientações passo a passo para esta tarefa diretamente na
Google Cloud consola, clique em Orientar-me:
As restrições de segurança definidas pela sua organização podem impedir a conclusão dos
seguintes passos. Para informações de resolução de problemas, consulte o artigo
Desenvolva aplicações num ambiente Google Cloud restrito.
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
A menos que introduza o seu próprio termo de pesquisa, este fluxo de trabalho usa a sua localização para criar um termo de pesquisa, que transmite à API Wikipedia.Google Cloud É devolvida uma lista de artigos da Wikipédia relacionados.
Selecione Implementar.
Execute o fluxo de trabalho
Depois de implementar o fluxo de trabalho com êxito, pode executá-lo pela primeira vez. Após implementar o fluxo de trabalho, é apresentada a página
Detalhes do fluxo de trabalho.
Na página Detalhes do fluxo de trabalho, clique em play_arrowExecutar.
Na página Executar fluxo de trabalho, clique em Executar.
No painel Resultado, são apresentados os resultados do fluxo de trabalho.
Implementou e executou o seu primeiro fluxo de trabalho!
Limpar
Para evitar incorrer em cobranças na sua Google Cloud conta pelos recursos usados nesta página, siga estes passos.
Na Google Cloud consola, aceda à página Fluxos de trabalho:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-20 UTC."],[],[],null,["# Quickstart: Create a workflow by using the Google Cloud console\n\nCreate a workflow by using the Google Cloud console\n===================================================\n\nThis quickstart shows you how to create, deploy, and execute your first workflow\nusing the Google Cloud console. The sample workflow sends a request to a\npublic API and then returns the API's response.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=workflows--workflows_quickstart)\n\n*** ** * ** ***\n\nBefore you begin\n----------------\n\nSecurity constraints defined by your organization might prevent you from completing the\nfollowing steps. For troubleshooting information, see\n[Develop applications in a constrained Google Cloud environment](/resource-manager/docs/organization-policy/develop-apps-constrained-environment).\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n1. Enable the Workflows API.\n\n [Enable the Workflows API](https://console.cloud.google.com/marketplace/product/google/workflows.googleapis.com)\n2. In the Google Cloud console, go to the **Service Accounts**\n page.\n\n [Go to Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts)\n3. Select a project and then click **Create service account**.\n4. In the **Service account name** field, enter a name, such as `sa-name`.\n5. Click **Create and continue**.\n6. To send logs to Cloud Logging, click the **Select a role**\n field and select **Logging \\\u003e Logs Writer**.\n\n To learn more about service account roles and permissions, see\n [Grant a workflow permission to access\n Google Cloud resources](/workflows/docs/authentication).\n7. Click **Done**.\n\n\u003cbr /\u003e\n\nCreate and deploy a workflow\n----------------------------\n\n1. In the Google Cloud console, go to the **Workflows** page:\n\n\n [Go to Workflows](https://console.cloud.google.com/workflows)\n\n \u003cbr /\u003e\n\n2. On the **Workflows** page, click add**Create**.\n\n3. Enter a name for the new workflow, such as `myFirstWorkflow`.\n\n4. Choose **us-central1** for the region.\n\n5. For **service account**, select the service account you created earlier.\n\n6. Select **Next**.\n\n7. In the workflow editor, copy and paste the following workflow:\n\n ### YAML\n\n main:\n params: [input]\n steps:\n - checkSearchTermInInput:\n switch:\n - condition: '${\"searchTerm\" in input}'\n assign:\n - searchTerm: '${input.searchTerm}'\n next: readWikipedia\n - getLocation:\n call: sys.get_env\n args:\n name: GOOGLE_CLOUD_LOCATION\n result: location\n - setFromCallResult:\n assign:\n - searchTerm: '${text.split(location, \"-\")[0]}'\n - readWikipedia:\n call: http.get\n args:\n url: 'https://en.wikipedia.org/w/api.php'\n query:\n action: opensearch\n search: '${searchTerm}'\n result: wikiResult\n - returnOutput:\n return: '${wikiResult.body[1]}'\n\n ### JSON\n\n {\n \"main\": {\n \"params\": [\n \"input\"\n ],\n \"steps\": [\n {\n \"checkSearchTermInInput\": {\n \"switch\": [\n {\n \"condition\": \"${\\\"searchTerm\\\" in input}\",\n \"assign\": [\n {\n \"searchTerm\": \"${input.searchTerm}\"\n }\n ],\n \"next\": \"readWikipedia\"\n }\n ]\n }\n },\n {\n \"getLocation\": {\n \"call\": \"sys.get_env\",\n \"args\": {\n \"name\": \"GOOGLE_CLOUD_LOCATION\"\n },\n \"result\": \"location\"\n }\n },\n {\n \"setFromCallResult\": {\n \"assign\": [\n {\n \"searchTerm\": \"${text.split(location, \\\"-\\\")[0]}\"\n }\n ]\n }\n },\n {\n \"readWikipedia\": {\n \"call\": \"http.get\",\n \"args\": {\n \"url\": \"https://en.wikipedia.org/w/api.php\",\n \"query\": {\n \"action\": \"opensearch\",\n \"search\": \"${searchTerm}\"\n }\n },\n \"result\": \"wikiResult\"\n }\n },\n {\n \"returnOutput\": {\n \"return\": \"${wikiResult.body[1]}\"\n }\n }\n ]\n }\n }\n\n Unless you input your own search term, this workflow uses your\n Google Cloud location to construct a search term, which it passes to\n the [Wikipedia API](https://wikipedia.org/w/api.php). A list of\n related Wikipedia articles is returned.\n8. Select **Deploy**.\n\nExecute the workflow\n--------------------\n\nOnce your workflow has been successfully deployed, you can execute it for the\nfirst time. After deploying the workflow, you'll be taken to its\n**Workflow details** page.\n\n1. On the **Workflow details** page, click play_arrow**Execute**.\n\n2. On the **Execute workflow** page, click **Execute**.\n\n3. In the **Output** pane, your workflow's results are displayed.\n\nYou've deployed and executed your first workflow!\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n1. In the Google Cloud console, go to the **Workflows** page:\n\n\n [Go to Workflows](https://console.cloud.google.com/workflows)\n\n \u003cbr /\u003e\n\n2. From the list of workflows, click a workflow to go to its\n **Workflow details** page.\n\n3. Click delete**Delete**.\n\n4. Type the name of the workflow and then click **Confirm**.\n\nWhat's next\n-----------\n\n- [Update an existing workflow](/workflows/docs/creating-updating-workflow#updating_a_workflow)\n\n- [Control the order of execution in a workflow](/workflows/docs/controlling-execution-order)\n\n- [Sample workflows](/workflows/docs/samples)\n\n- [Workflows syntax reference](/workflows/docs/reference/syntax)"]]