Implementing Automateo Workflows in Your Applications
Understanding the Workflow Execution Process
Implementing in Custom Coded Applications
async function triggerWorkflow(inputData) { const url = "https://api.automateo.com/workflow/trigger/{workflow_id}"; const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }; try { const response = await fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(inputData) }); const result = await response.json(); const executionId = result.id; // Store the executionId for later use saveExecutionId(executionId); return executionId; } catch (error) { console.error("Error triggering workflow:", error); } } function saveExecutionId(executionId) { // Implement this function to store the executionId for the current user // This could be in a database, local storage, or state management system }const express = require('express'); const app = express(); app.post('/workflow-result', express.json(), (req, res) => { const executionId = req.body.workflow_execution_id; const outputData = req.body.output; // Process and store the result processWorkflowResult(executionI res.sendStatus(200); }); function processWorkflowResult(executionId, outputData) { // Implement this function to process and store the workflow result // This should match the result with the stored executionId // and update your application state or database accordingly }async function checkWorkflowResult(executionId) { // Implement this function // This could involve querying your database or checking application state const result = await fetchResultFromDatabase(executionId); if (result) { displayResultToUser(result); } else { console.log("Result not available yet") } } function displayResultToUser(result) { // Implement this function to update your UI with the workflow result }
Implementing in No-Code Platforms
Integrating with Bubble.io
Integrating with Zapier
Best Practices for Implementation
Last updated