diff --git a/Workflow/AI-Nodes/Content-Moderation.mdx b/Workflow/AI-Nodes/Content-Moderation.mdx new file mode 100644 index 0000000..35e6990 --- /dev/null +++ b/Workflow/AI-Nodes/Content-Moderation.mdx @@ -0,0 +1,299 @@ +**Category:** AI +**Type:** Analysis + +--- + +## Overview + +The **Content Moderation** node automatically detects and flags inappropriate or unsafe content using AI. +It can analyze both **text** and **image** inputs to determine whether they contain offensive, harmful, or restricted material before allowing the workflow to proceed. + +--- + +## Description + +This node uses an AI moderation model to evaluate content for categories such as sexual content, harassment, hate speech, violence, and more. +You can use it to ensure that user-generated content, uploaded files, or messages meet your platform’s safety and compliance requirements. + +It supports both **text moderation** and **image moderation**, making it suitable for chat systems, social media workflows, or content upload platforms. + +--- + +Here’s your **Input Parameters** section rewritten in clear bullet-point format — consistent with your official documentation style and easy for beginners to follow: + +--- + +## Input Parameters + +The **Content Moderation** node accepts flat key-value pairs that specify the content to analyze and the type of moderation to perform. + +* **attachments** + Comma-separated list of file IDs or variable references to the content that needs moderation. + This is used primarily for **image** or **multimedia** moderation. + Example: + + ``` + file1.jpg,file2.png + ``` + + or + + ``` + {{nodeId.output.image}} + ``` + +* **moderationType** + Defines the type of moderation to perform. + Supported values: + + * `"text-moderation"` – for analyzing written content such as messages or posts. + * `"image-moderation"` – for analyzing uploaded or generated images. + + +* **moderationText** + The text string to be analyzed for moderation. + Use this parameter when reviewing written or user-generated text. + Example: + + ``` + This is a test message. + ``` + +**Instructions:** + +Provide all input parameters as flat key-value pairs. +For multiple file inputs, separate file IDs or variable references with commas. Example: + +``` +file1.jpg,file2.jpg +{{nodeId.output.file1}},{{nodeId.output.file2}} +``` + +Access input values within the workflow using: + +``` +{{nodeId.input.}} +``` + +--- + +## Output Parameters + +After execution, the **Content Moderation** node returns the AI’s analysis of the submitted content along with moderation details and confidence scores. + +* **flagged** + Indicates whether the content was flagged for any policy violations. + Returns `true` if one or more moderation categories were triggered. + +* **flaggedCategories** + A comma-separated list of the categories that were flagged during moderation. + Example: `"violence,hate,harassment"` + +* **processingTime** + The total time taken by the AI to analyze the content, returned in ISO timestamp format. + Example: `"2025-10-27T10:45:12Z"` + +* **processingId** A unique identifier assigned to the moderation request. + Useful for tracking and debugging purposes. + +* **categories.sexual** + Confidence score (ranging from 0 to 1) representing the likelihood of **sexual or adult content** being present. + +* **categories.harassment** + Confidence score (0–1) indicating potential **harassment or bullying** language. + +* **categories.hate** + Confidence score (0–1) for **hate speech** or **discriminatory** expressions. + +* **categories.illicit** + Confidence score (0–1) showing the presence of **illegal, restricted, or drug-related content**. + +* **categories.self-harm** + Confidence score (0–1) for **self-harm, suicide, or unsafe behavior** mentions. + +* **categories.violence** + Confidence score (0–1) measuring the presence of **violent or graphic content**. + + +--- + +**Instructions:** +You can access output results using: + +``` +{{nodeId.output.flagged}} → true / false +{{nodeId.output.flaggedCategories}} → "violence, hate" +{{nodeId.output.categories.sexual}} → 0.05 +{{nodeId.output.processingTime}} → "2025-10-27T10:30:45Z" +``` + +--- + +## Output Type + +The output type must **always** be exactly: + +``` +"text-moderation/image-moderation" +``` + +This identifies the node as handling both text-based and image-based moderation tasks. + +--- + +## Example Usage + +### Example 1: Text Moderation + +```json +{ + "moderationType": "text-moderation", + "moderationText": "I hate you!" +} +``` + +**Expected Output:** + +```json +{ + "output": { + "flagged": true, + "flaggedCategories": [ + "harassment" + ], + "categories": { + "harassment": true, + "harassment/threatening": false, + "sexual": false, + "hate": false, + "hate/threatening": false, + "illicit": false, + "illicit/violent": false, + "self-harm/intent": false, + "self-harm/instructions": false, + "self-harm": false, + "sexual/minors": false, + "violence": false, + "violence/graphic": false + }, + "processingTime": "1.417", + "processingId": "modr-3438" + } +} +``` + +--- + +### Example 2: Image Moderation + +```json +{ + "moderationType": "image-moderation", + "attachments": "file123.jpg" +} +``` + +**Expected Output:** + +```json +{ + "flagged": false, + "flaggedCategories": "", + "processingTime": "2025-10-27T10:46:55Z", + "categories.violence": 0.10, + "categories.sexual": 0.05 +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Content Moderation Node** + Drag and drop the node into your workflow canvas. + +2. **Choose the Input Type** + + * Use `moderationText` for moderating text messages or comments. + * Use `attachments` for moderating images or file uploads. + +3. **Set the Moderation Type** + Choose `"text-moderation"` or `"image-moderation"` as needed. + If left empty, the node will handle both automatically. + +4. **Connect Inputs** + Link the output from a previous node (like file upload or text generation) to the `attachments` or `moderationText` fields. + +5. **Access Outputs** + Use variable references to pass results to other nodes, such as conditional checks or notifications. Example: + + ``` + {{contentModeration.output.flagged}} + {{contentModeration.output.flaggedCategories}} + ``` + +6. **Set Conditions (Optional)** + You can create conditional branches in your workflow to stop or flag content automatically if `flagged = true`. + +--- + +## Best Practices + +* Always verify that uploaded files are properly connected before moderation. +* For text moderation, keep inputs under 5,000 characters for optimal performance. +* Combine both `moderationText` and `attachments` to analyze mixed media submissions. +* Review flagged outputs manually for high-risk content before taking automated action. +* Store `processingId` values for tracking or audit purposes. + +--- + +## Example Workflow Integration + +**Use Case:** A user uploads an image with a comment. + +* The **File Upload Node** provides an image file reference. +* The **Content Moderation Node** checks both the uploaded image and the user’s text comment. +* If `flagged = true`, the workflow sends a warning message through a **Notification Node**. +* If `flagged = false`, the workflow continues to publish the content. + +**Workflow Connection Example:** + +``` +{{fileUpload.output.fileUrl}} → {{contentModeration.input.attachments}} +{{chatInput.output.text}} → {{contentModeration.input.moderationText}} +{{contentModeration.output.flagged}} → Used in condition check +``` + +--- + + +## Common Errors + +Below are common issues that may occur while using the **Content Moderation** node, along with their causes and recommended solutions. + +* **"Missing attachments"** + **Cause:** No file or variable reference was provided for moderation. + **Solution:** Add a valid image or file reference in the `attachments` field. + Example: + + ``` + {{fileUpload.output.image}} + ``` + +* **"Missing moderationText"** + **Cause:** The text moderation input field was left empty. + **Solution:** Provide a valid text string or connect text from a previous node for analysis. + +* **"Invalid moderationType"** + **Cause:** An incorrect or unsupported moderation type was entered. + **Solution:** Use only the supported values — `"text-moderation"` or `"image-moderation"`. + +* **"Empty output"** + **Cause:** The AI model returned no response or incomplete data. + **Solution:** Retry the workflow with a valid input or check if the AI moderation service is available. + +* **"File not accessible"** + **Cause:** The referenced image file could not be loaded or retrieved. + **Solution:** Verify that the file exists, has the correct permissions, and was properly generated or uploaded by a previous node. + +--- diff --git a/Workflow/AI-Nodes/Image-analysis.mdx b/Workflow/AI-Nodes/Image-analysis.mdx new file mode 100644 index 0000000..c525cf3 --- /dev/null +++ b/Workflow/AI-Nodes/Image-analysis.mdx @@ -0,0 +1,285 @@ +**Category:** AI +**Type:** Image Understanding and Analysis + +--- + +## Overview + +The **Image Analysis Node** uses advanced AI models to interpret and analyze images. It can describe objects, scenes, and actions in an image or provide targeted answers to specific questions about it. + +This node is ideal for workflows that involve **image understanding**, such as detecting objects, summarizing visual content, generating image captions, or answering user-defined questions about uploaded or generated images. + +It is fully designed for **no-code workflows**, enabling users to perform complex visual AI analysis without writing any code. + +--- + +## Description + +Use the **Image Analysis Node** to extract insights from images using AI. +You can upload or reference one or more images through the `attachments` field. The AI will automatically analyze them and generate a response. + +If you provide a **question**, the AI tailors its analysis to that query (e.g., “What type of vehicle is in this image?”). +If no question is given, the AI produces a **general description** of the image’s contents. + +--- +## Input Parameters + +The **Image Analysis** node accepts flat key-value inputs that define which images to analyze and what kind of information the AI should extract. + +* **analysisType** + Must always be set to `"image-analysis"`. + This specifies that the node will use an AI model designed for image understanding and description. + +* **attachments** + Comma-separated list of image file IDs or variable references representing the images to be analyzed. + You can use syntax such as: + + ``` + file1.png,file2.jpg + ``` + + or dynamic references like: + + ``` + {{nodeId.output.image}} + ``` + or each images can be added by browsing locally. + + Each file represents one image input for the analysis. + +* **question** + A specific question or instruction about the image content. + Examples: + + * “What is the person holding?” + * “Describe the background.” + * “Identify the main objects in this image.” + If left empty, the AI provides a general summary or description of the image. + +**Instructions:** +Provide all inputs as flat key-value pairs. +Dynamic variables can be referenced using `{{nodeId.output.}}` syntax to link outputs from previous nodes. + +--- + + +**Instructions:** +Provide all values as flat key-value pairs. +Access variable references dynamically using: + +``` +{{nodeId.input.}} or {{nodeId.output.}} +``` + +--- + + +## Output Parameters + +After execution, the **Image Analysis** node provides the AI’s interpretation of the image along with processing details. + +* **content** *(string)* + The AI-generated description or analytical response about the image. + Contains a complete, readable interpretation of the visual content — such as objects, people, scenes, or actions detected in the image. + +**Instructions:** +Access the generated description in your workflow using: + +``` +{{nodeId.output.content}} +``` + +--- + +Access the main AI result using: + +``` +{{nodeId.output.content}} +``` + +--- + +## Output Type + +**Type:** `text` +This node always outputs **textual AI analysis results** about one or more images. +Do not modify this type — it ensures the output is recognized properly in downstream workflow nodes. + +--- + +## Example Usage + +### Example 1 — Image Analysis Description + +**Input:** + +```json +{ + "analysisType": "image-analysis", + "attachments": "file123.jpg", + "question": "Describe the image." +} +``` + +**Output:** + +```json +{ + { + "output": { + "content": "### Detailed Description of the Image\n\nThis is a warm, well-lit indoor scene capturing a young Black woman studying at a wooden desk in what appears to be a cozy home office or living room. The overall atmosphere is serene and focused, with soft natural sunlight streaming in from a large window on the left, casting gentle shadows and highlighting the subject's concentration...", + "processingTime": "6.272", + "processingId": "xai-grok-1761734286842", + "processingCount": 533 + } +} +} +``` + +--- + +### Example 2 — Face Detection + +**Input:** + +```json +{ + "analysisType": "image-analysis", + "attachments": "{{imageGenNode.output.image}}", + "question": "What expressions are the detected faces showing?" +} +``` + +**Output:** + +```json +{ + "output": { + "data": [ + { + "age_range": { + "high": "27", + "low": "21" + }, + "beard": { + "value": false, + "confidence": "96.11174774" + }, + "emotions": { + "happy": "0.00216166", + "calm": "48.06826782", + "surprised": "0.00394881", + "fear": "0.03886223", + "angry": "0.01629591", + "confused": "0.17070770", + "sad": "45.47851563", + "disgusted": "0.01695156" + }, + "eyeglasses": { + "confidence": "99.99996185", + "value": false + }, + "eyes_open": { + "confidence": "99.99046326", + "value": false + }, + "face_occluded": { + "confidence": "77.87515259", + "value": false + }, + "gender": { + "confidence": "99.94132233", + "value": "Female" + }, + "mouth_open": { + "confidence": "89.24304962", + "value": false + }, + "mustache": { + "confidence": "99.77437592", + "value": false + }, + "quality": { + "brightness": "44.11880493", + "sharpness": "78.64350128" + }, + "smile": { + "confidence": "99.94223022", + "value": false + }, + "sunglasses": { + "confidence": "99.99991608", + "value": false + } + } + ], + "number of faces": 1, + "processingTime": "1526.65667700", + "processingId": "05389043-9541-4218-9674-7ece28f16bdf", + "processingCount": 1 + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Node:** Drag and drop the **Image Analysis Node** into your workflow. +2. **Provide Attachments:** Connect the output of an image-generating or image-uploading node to the `attachments` field. +3. **Set Analysis Type:** Always use `"image-analysis"` for the `analysisType` field. +4. **Add an Optional Question:** Enter a specific question (e.g., “Is this food vegetarian?”) or leave it blank for a general analysis. +5. **Run the Workflow:** The node will analyze the provided image(s) and generate a text-based interpretation. +6. **Use Output:** Access the result using `{{nodeId.output.content}}` in downstream nodes like *Text Generation*, *Reporting*, or *Notifications*. + +--- + +## Best Practices + +* Always ensure **attachments contain valid image files or variable references**. +* Keep the **question** short and specific for better results. +* If analyzing multiple images, use comma-separated references for consistent results. +* Combine this node with **Text Generation** or **Report Creation** nodes to turn image insights into summaries or structured reports. +* Use **high-quality images** for more accurate AI interpretation. + +--- + +## Example Workflow Integration + +**Scenario:** +Automatically analyze an AI-generated image and describe it for user documentation. + + +1. **Image Generation Node:** Creates an image based on a prompt. +2. **Image Analysis Node:** Examines the generated image and describes it. +3. **Text Generation Node:** Uses the analysis result to generate a caption or description paragraph. + +--- + +Here’s your **Common Errors** section rewritten in bullet-point format for the **Image Analysis** node — clear, concise, and beginner-friendly: + +--- + +## Common Errors + +Below are common issues that may occur while using the **Image Analysis** node, along with their causes and suggested solutions. + +* **"Missing attachments"** + **Cause:** No image references were provided in the `attachments` field. + **Solution:** Make sure you include valid file IDs or variable references that point to the images you want analyzed. + +* **"Invalid analysisType"** + **Cause:** The `analysisType` parameter is missing or set incorrectly. + **Solution:** Always set the value to `"image-analysis"` to ensure the correct AI model is used. + +* **"No content output"** + **Cause:** The AI model returned an empty or invalid response. + **Solution:** Try using a clearer image or providing a more specific question in the `question` field. + +* **"File not accessible"** + **Cause:** The referenced image file could not be accessed or loaded. + **Solution:** Check file permissions or confirm that the image has been properly uploaded or generated in a previous node. + + +--- + diff --git a/Workflow/AI-Nodes/Image-generation.mdx b/Workflow/AI-Nodes/Image-generation.mdx new file mode 100644 index 0000000..3067b24 --- /dev/null +++ b/Workflow/AI-Nodes/Image-generation.mdx @@ -0,0 +1,188 @@ +**Category:** AI +**Type:** Visual Content Generation + +--- + +## Overview + +The **Image Generation Node** allows you to create AI-generated images from text descriptions. By simply providing a detailed prompt, you can produce realistic, artistic, or conceptual visuals automatically — no design skills required. + +This node is perfect for generating images for product mockups, concept art, blog illustrations, or any visual automation use case within your no-code workflow. It also supports optional style references through attachments, enabling custom and consistent visual styles. + +--- + +## Description + +Use the **Image Generation Node** to transform a written prompt into one or more AI-generated images. +You can input plain text describing what you want (e.g., “a futuristic city at night, cyberpunk style”) and optionally attach reference images to guide the AI’s artistic direction. + +The node outputs an image file or URL that can be used in downstream nodes for storage, display, or further processing. + +--- + +Here’s your **Input Parameters** section rewritten in bullet-point format for the **Image Generation** node — consistent with your documentation style and beginner-friendly: + +--- + +## Input Parameters + +The **Image Generation** node accepts simple key-value inputs that define how the AI should create an image. + +* **prompt** + A detailed text description of the image you want to generate. + Be specific — describe the subject, style, colors, lighting, and mood. + Example: + + ``` + A cozy reading room with warm lighting and wooden furniture + ``` + +* **attachments** + Comma-separated list of file IDs or variable references used as visual style references. + You can provide multiple files using syntax like: + + ``` + file1.jpg,file2.jpg + ``` + + or dynamically from other nodes using: + + ``` + {{nodeId.output.image1}},{{nodeId.output.image2}} + ``` + + These attachments help the AI maintain a consistent look or replicate certain visual elements. + +--- + + +**Instructions:** +Provide input values as flat key-value pairs. Access variables dynamically using: + +``` +{{nodeId.input.}} or {{nodeId.output.}} +``` + +--- + +## Output Parameters + +After execution, the **Image Generation** node provides information about the generated image and processing details. + +* **processingCount** + Indicates the total number of images generated during the process. + +* **processingTime** + The time taken to generate the image, returned in ISO timestamp format. + +* **processingId** + A unique identifier assigned to this image generation task. + Useful for tracking or referencing the specific generation process. + +* **image** + The file reference or URL of the generated image. + You can use this link to preview, download, or connect the image to another node. + +**Instructions:** +Access output values in your workflow using the following variable syntax: + +``` +{{nodeId.output.image}} → Generated image URL +{{nodeId.output.processingTime}} → Total generation time +{{nodeId.output.processingId}} → Unique process reference +``` + +--- + +## Output Type + +**Type:** `image` +This node always produces image content as output. Do not modify this value — it ensures proper handling of image files in your workflow. + +--- + +## Example Usage + +### Example 1 — Image Generation + +**Input:** + +```json +{ + "prompt": + "A young woman sitting at a desk studying with books and a laptop, focused and surrounded by soft natural light from a nearby window, realistic style, calm and productive atmosphere.", + "attachments": "image.png" +} +``` + +**Output:** + +```json +{ + "processingCount": 1, + "processingTime": "2025-10-28T10:21:45.991Z", + "processingId": "img-23841gh", + "image": "https://example.com/images/generated_image.png" +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Node:** Drag and drop the **Image Generation Node** into your workflow. +2. **Connect Input:** Link a text-based node (like *Text Generation* or *Triggers*) to provide the prompt. +3. **Set Prompt:** Describe what you want the image to depict, using detailed and visual language. +4. **Add Attachments (Optional):** Include one or more reference files or variables to influence the style. +5. **Run Workflow:** The node will generate an image and output the image file URL. +6. **Use Output:** Pass the generated image to downstream nodes — such as *File Upload*, *Email Attachment*, or *Slack Message*. + +--- + +## Best Practices + +* Use **clear and descriptive prompts** — mention subject, mood, lighting, and style. +* Keep prompts **under 500 characters** for faster results. +* Use **reference attachments** when you want consistent visuals (e.g., same style across multiple images). +* Combine this node with **Text Generation** to automatically create AI art from AI-written descriptions. +* Test multiple prompts for the same idea to discover the best output style. + +--- + +## Example Workflow Integration + +**Scenario:** +A workflow that automatically generates blog illustrations based on written content. + +1. **AI Node:** (Creates an article or blog summary) +2. **Image Generation Node:** Generates a matching image based on the summary text. +3. **File Upload Node:** Uploads the generated image to your CMS or database. + +--- + +Here’s your **Common Errors** section rewritten in bullet-point format — clear, structured, and easy for beginners to understand while matching your documentation style: + +--- + +## Common Errors + +Below are common issues that may occur while using the **Image Generation** node, along with their causes and suggested solutions. + +* **"Missing prompt"** + **Cause:** The `prompt` field was left empty or not provided. + **Solution:** Enter a valid text prompt that clearly describes the image you want the AI to generate. + +* **"Invalid attachment reference"** + **Cause:** An incorrect file ID or variable reference was used in the `attachments` field. + **Solution:** Verify that the file IDs or variable references are valid and formatted correctly. + +* **"Image generation failed"** + **Cause:** The AI service encountered a timeout or could not process the given prompt. + **Solution:** Retry after a short delay or simplify the image description to make it easier to interpret. + +* **"Empty output"** + **Cause:** The workflow is misconfigured or the node is not connected properly. + **Solution:** Ensure the **Image Generation** node is linked to valid inputs and other connected nodes in the workflow. + +--- + diff --git a/Workflow/AI-Nodes/Text-Extraction.mdx b/Workflow/AI-Nodes/Text-Extraction.mdx new file mode 100644 index 0000000..df39f43 --- /dev/null +++ b/Workflow/AI-Nodes/Text-Extraction.mdx @@ -0,0 +1,320 @@ +**Category:** AI +**Type:** Data Processing + +--- + +## Overview + +The **Text Extraction** node uses AI to extract text and metadata from different content sources such as PDFs, web pages, images, or audio files. +It converts raw files or URLs into structured, readable text that can be used by other nodes in your workflow. + +--- + +## Description + +This node is designed to automatically pull text and metadata from a variety of input formats — including **documents, websites, screenshots, or speech recordings**. +Depending on the selected extraction type, it can: + +* Read and extract text from **PDF** documents. +* Capture and process the textual content of a **webpage**. +* Identify and read **text from images** (OCR-based). +* Convert **speech-to-text** from audio files. + +It helps automate content analysis, data gathering, and transcription workflows with minimal setup. + +--- + +## Input Parameters + +The **Text Extraction** node accepts flat key-value inputs that determine the source and method of text extraction. + +* **extractionType** *(string, required)* + Defines the type of extraction to perform. Supported values: + + * `"pdf-extraction"` – Extracts text from PDF documents. + * `"web-extraction"` – Extracts text and metadata from a webpage. + * `"image-extraction"` – Extracts text from images using OCR (Optical Character Recognition). + * `"audio-extraction"` – Converts spoken content from audio files into text. + +* **webUrl** *(string, required for web-extraction)* + The URL of the web page to extract content from. + Example: + + ``` + https://example.com/article + ``` + +* **attachments** *(string, required for pdf/image/audio extraction)* + Comma-separated list of file IDs or variable references to uploaded files. + Each file represents one source of extraction. + Example: + + ``` + file1.pdf,file2.pdf + ``` + + or + + ``` + {{nodeId.output.file1}},{{nodeId.output.file2}} + ``` + +**Instructions:** +Provide flat key-value pairs for all input parameters. +For multiple files, separate entries with commas. +You can dynamically reference data from previous nodes using: + +``` +{{nodeId.input.}} +``` + +--- + +## Output Parameters + +After execution, the **Text Extraction** node returns the extracted text along with processing information and detailed metadata. + +* **processingCount** + Number of files, pages, or segments processed during extraction. + +* **processingTime** + Total time taken for extraction, returned in ISO timestamp format. + +* **processingId** + A unique identifier assigned to this specific extraction request. + +* **content** + The main text extracted from the provided source. + For audio extraction, this will contain the full transcription. + +* **markdown** + A markdown-formatted version of the extracted text for easy readability and formatting. + +* **linksOnPage[]** + A list of links found on the page (only applicable for `web-extraction`). + +* **metadata.title** + The page or document title. + +* **metadata.keywords** + Extracted keywords or tags found in metadata. + +* **metadata.description** + Short description or summary found in the document or webpage metadata. + +* **metadata.robots** + Robot meta instructions (e.g., `index,follow`). + +* **metadata.ogTitle** + Open Graph title of the page. + +* **metadata.ogDescription** + Open Graph description of the page. + +* **metadata.ogImage** + URL of the Open Graph image associated with the webpage. + +* **metadata.ogSiteName** + The name of the website where content was extracted. + +* **metadata.screenshot** + Screenshot image reference captured during extraction (for `web-extraction`). + +* **speaker_labels[].speaker** + For audio extractions — identifies the speaker label (e.g., Speaker 1, Speaker 2). + +* **speaker_labels[].text** + Text spoken by each identified speaker segment. + +* **timestamps[].startTime** + Timestamp indicating when a specific word or phrase began in the audio file. + +* **timestamps[].endTime** + Timestamp indicating when a specific word or phrase ended. + +* **timestamps[].word** + Word or phrase detected during speech-to-text transcription. + +* **timestamps[].duration** *(string)* + Duration of the spoken segment. + +**Instructions:** +Access output values using variables like: + +``` +{{nodeId.output.content}} → Extracted text +{{nodeId.output.metadata.title}} → Page or document title +{{nodeId.output.linksOnPage[0]}} → First link on the page +{{nodeId.output.speaker_labels[0].text}} → First speaker’s text segment +``` + +--- + +## Output Type + +The output type must **always** be exactly: + +``` +"text" +``` + +This ensures the node consistently provides extracted text output, regardless of the extraction source (PDF, web, image, or audio). + +--- + +## Example Usage + +### Example 1: Extract Text from a PDF + +```json +{ + "extractionType": "pdf-extraction", + "attachments": "file123.pdf" +} +``` + +**Expected Output:** + +```json +{ + "content": "This is the text extracted from the PDF document.", + "processingId": "proc_67892", + "processingTime": "2025-10-27T12:05:43Z", + "processingCount": 1 +} +``` + +--- + +### Example 2: Extract Text from Image + +```json +{ + "extractionType": "image-extraction", + "attachments": "image123.png" +} +``` + +**Expected Output:** + +```json +{ + "content": "Here is the article content extracted from the page...", + "processingTime": "2025-10-27T12:06:11Z", + "processingId": "mistral-ocr-1761738927697", + "processingCount": 41 +} +``` + +--- + +### Example 3: Extract Text from Audio + +```json +{ + "extractionType": "audio-extraction", + "attachments": "nature_audio.mp3" +} +``` + +**Expected Output:** + +```json +{ + "output": { + "content": "The evening sky was painted with shades of orange and violet. As the city slowly settled into its nightly rhythm. Streetlights flickered to life, casting warm pools of light on the sidewalks where people hurried home, their faces half hidden behind scarves and tired smiles. Somewhere, a musician played a soft tune on a saxophone, its notes drifting between buildings like fragments of a forgotten dream. In the distance, the sound of traffic blended with laughter spilling out of a nearby cafe. Inside, a, uh, writer sat alone with a cup of coffee gone cold, his laptop open but untouched. He watched the rain begin to fall against the window, tracing patterns that matched the rhythm of his thoughts. Every drop felt like a reminder that even in a crowded city, moments of stillness could be found in the smallest details. A quiet song, a stranger's laughter, or the glow of street lights reflecting on wet pavement. And in that quiet, he finally began to type M. Not to impress anyone or chase perfection, but simply to capture the fleeting beauty of the world as he saw it.", + "processingTime": "2025-10-27T12:05:43Z", + "processingId": "dc9509af-3783-48bd-8819-85126a8e66a8", + "processingCount": 188 + } +} +``` +--- + + +## How to Use in a No-Code Workflow + +1. **Add the Text Extraction Node** + Drag and drop the node into your workflow. + +2. **Select Extraction Type** + Choose the appropriate extraction type: + + * `"pdf-extraction"` for PDF files + * `"web-extraction"` for web pages + * `"image-extraction"` for scanned images or screenshots + * `"audio-extraction"` for speech-to-text conversion + +3. **Provide Input** + + * For PDFs, images, or audio: add file references under `attachments`. + * For webpages: enter the target URL in `webUrl`. + +4. **Run the Node** + The node will extract text, metadata, or transcription automatically. + +5. **Access Results** + Use variable syntax to retrieve outputs such as: + + ``` + {{textExtraction.output.content}} + {{textExtraction.output.metadata.title}} + ``` + +6. **Connect to Next Nodes** + You can pass the extracted text to other nodes like **Text Generation**, **AI Analysis**, or **Summarization** for further automation. + +--- + +## Best Practices + +* Ensure the correct extraction type is selected before execution. +* When extracting from multiple files, separate file IDs with commas. +* For web extractions, make sure the URL is publicly accessible. +* Use OCR-friendly images (clear text visibility) for best results. +* For large audio files, split them into smaller segments to improve performance. +* Always review extracted content for accuracy before using it in production workflows. + +--- + +## Example Workflow Integration + +**Use Case:** Automatically summarize a PDF report. + +* Step 1: The **File Upload Node** provides the PDF file reference. +* Step 2: The **Text Extraction Node** extracts all text from the PDF. +* Step 3: The **Text Generation Node** summarizes the extracted content into key points. +* Step 4: The **Email Node** sends the summary to a user. + +**Workflow Example:** + +``` +{{fileUpload.output.fileId}} → {{textExtraction.input.attachments}} +{{textExtraction.output.content}} → {{textGeneration.input.prompt}} +``` + +--- + +## Common Errors + +* **"Missing extractionType"** + **Cause:** No extraction type was provided. + **Solution:** Always specify one of `"pdf-extraction"`, `"web-extraction"`, `"image-extraction"`, or `"audio-extraction"`. + +* **"Missing webUrl"** + **Cause:** The `webUrl` field is required for `web-extraction`. + **Solution:** Add a valid, publicly accessible URL. + +* **"Missing attachments"** + **Cause:** No file references provided for file-based extraction. + **Solution:** Add valid file IDs or variable references in the `attachments` field. + +* **"Unsupported file format"** + **Cause:** The file type is not supported for extraction. + **Solution:** Use PDF, image, or audio files in standard formats. + +* **"Empty output"** + **Cause:** The AI was unable to extract content from the provided source. + **Solution:** Recheck file quality, accessibility, or try a different extraction type. + +--- diff --git a/Workflow/AI-Nodes/Text-Generation.mdx b/Workflow/AI-Nodes/Text-Generation.mdx new file mode 100644 index 0000000..d1e92dd --- /dev/null +++ b/Workflow/AI-Nodes/Text-Generation.mdx @@ -0,0 +1,282 @@ +**Category:** AI Node +**Type:** Action Node + +--- + +## Overview + +The **Text Generation Node** enables users to automatically generate text or structured data using advanced AI models. +This node can be used for a wide range of purposes — such as creating summaries, generating responses, writing articles, or producing structured JSON data — without requiring any coding knowledge. + +It forms a key component in workflows where natural language generation or intelligent content creation is required. + +--- + +## Description + +This node uses **AI models** (e.g., `aicon-v4-nano-160824`, `aicon-v4-large-160824`, `aicon-v4-search-160824`) to process user instructions and produce text or JSON output. +It is fully compatible with no-code workflows, meaning users can simply configure key parameters through an intuitive interface without writing scripts or API calls. + +``` +The AI nodes currently use advanced free, in-house AI models for general and creative tasks. +For users requiring more precision, reasoning depth, or specialized capabilities, there is an option to connect premium models from providers like OpenAI, Anthropic, or Google, available through paid integrations. +``` + + +--- + +Here’s your **Input Parameters** section converted from a table into a **clean, readable bullet-point format** in Markdown — ideal for beginner-friendly documentation. + +--- + +## Input Parameters + +The node accepts a flat list of key-value inputs. +Each parameter controls specific aspects of how the AI generates content. + +* **generationType** + Defines which AI model to use. + Choose from: + + * `aicon-v4-nano-160824` – for simple or lightweight tasks. + * `aicon-v4-large-160824` – for complex text generation or file-based processing. + * `aicon-v4-search-160824` – for search, analysis, and summarization tasks. + +* **prompt / question** + The main instruction or query you want the AI to respond to. + Example: + *Write a 100-word summary about renewable energy.* + +* **trainingData** + Helps define the AI’s behavior, tone, and role, ensuring its responses are structured and aligned with the intended purpose. + Also referred to as the “system prompt.” + +* **attachments** + Comma-separated list of file IDs that the AI can analyze or reference. + Works only with `aicon-v4-large-160824`. + +* **randomness** + Controls creativity on a scale from 0 to 1. + Lower values generate predictable, factual responses. + Higher values produce more creative and diverse outputs. + +* **outputType** + Defines how the output is formatted: + + * `"text"` – for plain written responses. + * `"json"` – for structured, machine-readable data. + +* **thinking** + When set to `"true"`, the AI performs deeper reasoning before generating results. + +* **conversationId** + Maintains context across multiple runs, allowing the AI to remember previous interactions and produce consistent responses. + +* **jsonContent** + Required only when `outputType` is `"json"`. + Defines the structure of the expected JSON output. + Must be **flat**, without nested objects or arrays. + Example: + + ```json + { + "title": "string", + "summary": "string", + "point1": "string" + } + ``` + +--- + +> **Important:** +> When creating JSON schemas, always use *flat structures*. Avoid nested objects and arrays. +> Use numbered keys instead of arrays (e.g., `"item1"`, `"item2"`). + +Access values from this node using: + +``` +{{nodeId.input.}} +``` + +--- + +Here’s your **Output Parameters** section rewritten from the table into clear bullet points in Markdown — consistent with your input section style and suitable for documentation: + +--- + +## Output Parameters + +After execution, the node returns several outputs that represent both the AI’s result and processing information. + +* **processingCount** + Indicates the total number of tokens or data units processed by the AI model during execution. + +* **processingTime** + The time taken for the AI to generate the response, returned in ISO timestamp format. + +* **processingId** + A unique identifier automatically assigned to each generation request. + Useful for debugging or tracking specific executions. + +* **conversationId** + Identifier used to maintain continuity between multiple AI generations. + When reused, it allows the AI to remember previous context and respond consistently. + +* **content** + The main output generated by the AI. + + * If `outputType` is `"text"`, this contains the generated text. + * If `outputType` is `"json"`, it follows the user-defined schema from the `jsonContent` input. + +--- + +### Output Type + +The node’s **outputType** determines what the `content` field contains: + +* `"text"` → Regular AI-generated text output. +* `"json"` → Structured data matching the defined `jsonContent` schema. + +Downstream nodes can access these values as: + +``` +{{nodeId.output.content}} +{{nodeId.output.processingId}} +{{nodeId.output.processingTime}} +{{nodeId.output.conversationId}} +``` + +--- + +## Example Usage + +### 1. Generate Text + +**Goal:** Write a paragraph about AI ethics. +**Input Configuration:** + +```json +{ + "generationType": "aicon-v4-nano-160824", + "prompt": "Write a paragraph explaining the importance of AI ethics.", + "outputType": "text" +} +``` + +**Output Example:** + +```json +{ + "output": { + "content": "AI ethics are a crucial framework for navigating the complex landscape of artificial intelligence development and deployment. The six key principles outlined in this image – Transparency, Accountability, Mitigating Bias, Fairness, Security, and Privacy – collectively highlight why ethical considerations are paramount. Without transparency, it's difficult to understand how AI systems make decisions, hindering trust and accountability. Unchecked bias can lead to discriminatory and harmful outcomes, emphasizing the need for robust mitigation strategies. Fairness, while challenging to define, is essential to ensure equitable treatment for all. Robust security measures are vital to protect AI systems from malicious attacks and preserve public trust, while privacy safeguards individual autonomy regarding personal data. Adhering to these principles ensures that AI systems are developed responsibly, beneficially, and without causing undue harm, fostering public confidence and promoting a positive societal impact from this transformative technology.", + "processingTime": 5178, + "processingId": "google-520649282babb51d", + "processingCount": 439, + "conversationId": "71e9512ea89b9e9f0d1d174369678b85" + } +} +``` + +--- + +### 2. Generate Structured JSON + +**Goal:** Extract key points from an article. +**Input Configuration:** + +```json +{ + "generationType": "aicon-v4-large-160824", + "prompt": "Provide a paragraph about Healthcare 4.0.", + "outputType": "json", + "jsonContent": { + "title": "string", + "content": "string", + "summary": "string", + "point1": "string", + "point2": "string", + "point3": "string" + } +} +``` + +**Output Example:** + +```json +{ + "output": { + "title": "Healthcare 4.0: The Future of Medicine", + "content": "Healthcare 4.0 represents the transformative integration of advanced digital technologies into the healthcare ecosystem, marking a significant evolution from traditional medical practices. This paradigm leverages technologies such as Artificial Intelligence (AI), Machine Learning (ML), the Internet of Medical Things (IoMT), big data analytics, blockchain, and robotics to create a more personalized, predictive, preventive, and participatory healthcare experience. It aims to enhance operational efficiency, improve patient outcomes, reduce costs, and make healthcare more accessible and equitable globally. From precision medicine tailored to individual genetic profiles to AI-powered diagnostics and robotic surgery, Healthcare 4.0 is redefining how medical services are delivered, managed, and consumed, fostering an era of smart, connected, and data-driven healthcare solutions.", + "summary": "Healthcare 4.0 integrates advanced digital technologies like AI, IoMT, and big data into healthcare for a more personalized, predictive, and efficient system, improving patient outcomes and accessibility.", + "point1": "Utilizes AI, Machine Learning, and IoMT for enhanced diagnostics and personalized treatment plans.", + "point2": "Focuses on predictive and preventive care through data analytics, shifting from reactive to proactive healthcare.", + "point3": "Improves operational efficiency, reduces costs, and increases healthcare accessibility through digital transformation.", + "processingTime": 2414, + "processingId": "google-b3437be5929daeaa", + "processingCount": 371, + "conversationId": "b0a5d25e4b46980ed8c8d3c04e7f6bf3" + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Node:** Drag the *Text Generation Node* into your workflow builder. +2. **Connect a Trigger:** For example, use an *Email Trigger* or *REST API Trigger*. +3. **Configure Inputs:** Enter your prompt, choose the AI model, and select the output type. +4. **Link Outputs:** Connect this node’s `content` output to the next step — e.g., a *Text-to-Speech Node*, *Slack Message Node*, or *Document Writer Node*. +5. **Run the Workflow:** The node will automatically generate text or structured data as defined. + +--- + +## Best Practices + +* Keep prompts **specific and concise** for more accurate AI results. +* Use **flat JSON** structures to simplify integration with downstream nodes. +* For complex file-based tasks, select `aicon-v4-large-160824`. +* To maintain conversational context (like a chatbot), pass a consistent `conversationId`. +* Use `randomness` between **0.2 and 0.5** for balanced creativity and coherence. + +--- + +## Example Workflow Integration + +**Workflow:** “Generate and Send AI-Generated Report” + +1. **Trigger Node:** REST API (to receive input data) +2. **AI Node:** Text Generation Node (to create the report) +3. **Process Node:** Return State Node (to display the desired output) + +--- + +Here’s your **Common Errors** section rewritten into clear, beginner-friendly bullet points in Markdown — consistent with your documentation style: + +--- + +## Common Errors + +Below are common errors that may occur while using the **Text Generation** node, along with their causes and suggested resolutions. + +* **Missing required parameter** + **Cause:** Either `prompt` or `generationType` was not provided in the input. + **Resolution:** Make sure both `prompt` and `generationType` are included before running the node. + +* **Unauthorized** + **Cause:** Invalid or missing API credentials. + **Resolution:** Check your API key or authentication settings and ensure the account has permission to access the AI model. + +* **Invalid JSON structure** + **Cause:** The provided JSON schema contains nested objects or arrays. + **Resolution:** Use a flat JSON structure with simple key-value pairs (no nesting or arrays). + +* **Rate limit exceeded** + **Cause:** Too many requests were sent in a short time period. + **Resolution:** Add a short delay between requests or retry after some time to comply with rate limits. + +--- + + + + diff --git a/Workflow/AI-Nodes/Text-to-speech.mdx b/Workflow/AI-Nodes/Text-to-speech.mdx new file mode 100644 index 0000000..dd89881 --- /dev/null +++ b/Workflow/AI-Nodes/Text-to-speech.mdx @@ -0,0 +1,198 @@ +**Category:** AI +**Type:** Audio Processing + +--- + +## Overview + +The **Text to Speech Node** converts written text into natural-sounding speech using advanced AI voice models. It allows you to transform text-based content (like messages, summaries, or prompts) into an audio format that can be played, downloaded, or passed to other workflow nodes for further use. + +This node is designed for **no-code workflows**, meaning you can generate spoken audio directly from text without any programming. It supports multiple pre-configured voices and allows integration with other nodes for automated voice responses or multimedia content creation. + +--- + +## Description + +Use the **Text to Speech Node** to turn any text into human-like speech. Simply provide the text you want to convert and choose a voice from the available options. +The node outputs an audio file (or URL) that contains the generated voice output, which can then be used in downstream nodes like playback, file storage, or notifications. + +--- + +## Input Parameters + +The **Text to Speech** node accepts flat key-value inputs that define what text to convert and which voice to use. + +* **text** + The text content to be converted into speech. + You can use static text or dynamic variables from previous nodes, for example: + + ``` + {{nodeId.output.field}} + ``` + +* **voiceId** + The unique identifier of the voice used for speech synthesis. + Available voices include: + + * `"SOYHLrjzK2X1ezoPC6cr"` – Harry + * `"TX3LPaxmHKxFdv7VOQHJ"` – Liam + * `"ThT5KcBeYPX3keUQqHPh"` – Dorothy + * `"XB0fDUnXU5powFXDhCwa"` – Charlotte + +**Instructions:** +Provide all input parameters as flat key-value pairs. +You can reference data dynamically within the workflow using: + +``` +{{nodeId.input.}} +``` + +or + +``` +{{nodeId.output.}} +``` + +--- + +## Output Parameters + +After execution, the **Text to Speech** node returns information about the generated audio and process details. + +* **processingCount** + Indicates the total number of audio segments or speech outputs generated. + +* **processingTime** + The total time taken to process and generate the speech output, returned in ISO timestamp format. + +* **processingId** + A unique identifier assigned to this specific speech generation request. + Useful for tracking or debugging individual runs. + +* **audio** + The file reference or URL of the generated audio output. + This can be used in downstream nodes to send, play, or store the generated speech. + +* **message** + A short status message indicating whether the operation was successful or if an error occurred. + +--- + +## Output Type + +**Type:** `audio` +This node **always outputs an audio file or reference**. Do not modify this value — it ensures proper audio handling in your workflow. + +--- + +## Example Usage + +### Example 1 — Simple Text to Speech + +**Input:** + +```json +{ + "text": "Welcome to the workflow automation demo!", + "voiceId": "TX3LPaxmHKxFdv7VOQHJ" +} +``` + +**Output:** + +```json +{ + "processingTime": "2025-10-28T13:20:45.123Z", + "processingId": "tts-90128xkf", + "audio": "https://example.com/audio/welcome_demo.mp3", + "message": "Speech generated successfully." +} +``` + +### Example 2 — Using Variables from Another Node + +**Input:** + +```json +{ + "text": "{{rest-api-trigger-initial.input.test_input}}", + "voiceId": "ThT5KcBeYPX3keUQqHPh" +} +``` + +**Output:** + +```json +{ + "processingCount": 1, + "processingTime": "2025-10-28T14:05:09.004Z", + "processingId": "tts-90782pqr", + "audio": "https://example.com/audio/demo.mp3", + "message": "Text processed successfully." +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Node:** Drag and drop the **Text to Speech Node** into your workflow editor. +2. **Connect Input:** Link the output of a text-generating node (like *Text Generation*) or static text as the input for the `text` field. +3. **Select a Voice:** Choose a voice ID (e.g., “Harry” or “Charlotte”) for speech output. +4. **Run the Workflow:** Execute the workflow to automatically convert the text into an audio file. +5. **Access Audio Output:** The generated file link can be used in: + + * Notification systems + * Audio playback modules + * File storage or sharing nodes + +--- + +## Best Practices + +* Keep text **under 2,000 characters** per request for faster processing. +* Choose a **consistent voice ID** across similar nodes for a uniform tone. +* Use **descriptive variable names** like `{{introNode.output.text}}` to make the workflow readable. +* For multilingual support, verify that your chosen voice supports the target language. + +--- + +## Example Workflow Integration + +**Scenario:** +A workflow where AI generates daily motivational quotes and automatically converts them to audio. + +**Example Flow:** + +1. **Trigger Node:** REST API (to receive input data) +2. **AI Node:** Text to Speech (to convert text to speech) +3. **Process Node:** Return State Node (to display the url containing the audio) + +--- + +Here’s your **Common Errors** section rewritten in bullet-point format to match your documentation style and maintain clarity for beginners: + +--- + +## Common Errors + +Below are common issues you might encounter while using the **Text to Speech** node, along with their causes and recommended solutions. + +* **"Missing text input"** + **Cause:** The `text` field was left empty or not connected. + **Solution:** Provide valid text directly or connect the `text` field to a previous node’s output. + +* **"Invalid voiceId"** + **Cause:** An unsupported or incorrect `voiceId` was entered. + **Solution:** Use one of the supported voice IDs listed in the input parameters or a verified custom voice ID. + +* **"Audio generation failed"** + **Cause:** The AI model encountered an internal error or the request timed out. + **Solution:** Retry after a short delay or reduce the length of the input text. + +* **"Empty audio output"** + **Cause:** The node did not connect correctly to downstream workflow components. + **Solution:** Recheck node connections and run the workflow again to ensure proper linkage. + +--- + diff --git a/Workflow/Database/add-new-data.mdx b/Workflow/Database/add-new-data.mdx new file mode 100644 index 0000000..1ecfef6 --- /dev/null +++ b/Workflow/Database/add-new-data.mdx @@ -0,0 +1,200 @@ + +**Category:** Database +**Type:** Action Node + +--- + +## Overview + +The **Add New Data** node allows you to insert new records into your existing database tables or collections. +It is used in no-code workflows to automatically store user input, API results, or processed data without writing any code. + +The node validates your input, maps the values to the correct columns, and returns detailed feedback about whether the record was successfully inserted or if any errors occurred. + +--- + +## Description + +Use this node whenever you need to **add new data** into your connected database. +You can specify the target table (called `collectionName`) and provide column-value pairs that represent each field in the record you want to insert. + +You can even use **dynamic variables** from previous nodes, so the data can flow automatically from one part of your workflow into your database. + +--- + +## Input Parameters + +* **collectionName (String, Required)** + The name of the target table or collection. + Must be written in this format: `"environment:tableName"`. + Only two environments are supported — `"production"` and `"development"`. + Example: `"production:users"` or `"development:orders"`. + +* **Dynamic Column Fields (Optional)** + Each column in your database table automatically appears as a parameter. + You can provide values for these parameters to insert into the new record. + Example: + + ```json + { + "name": "John Doe", + "email": "john@example.com", + "age": "25" + } + ``` + +* **Variable References (Optional)** + You can use variables from previous nodes using double curly braces, for example: + + ``` + {{form.input.name}} + {{api.output.email}} + ``` + +**Additional Notes:** + +* Arrays can be written as comma-separated strings or JSON arrays. +* Data types and required fields are automatically validated before insertion. +* If validation fails, an error message will be returned in the output. + +--- + +## Output Parameters + +The node returns a structured JSON object that contains the results of the insertion process. + +* **tableName:** Name of the table where the record was inserted. +* **queryId:** A unique identifier assigned to the insert operation. +* **message:** Human-readable status message (for example, “Record added successfully”). +* **status:** Either `"success"` or `"error"`. +* **errorType:** The type of error, such as `"validation_error"` or `"permission_denied"`. +* **errorCode:** Specific code representing the error. +* **missingColumn:** Name of any missing required column (if validation fails). + +You can access these values in downstream nodes using syntax like: + +``` +{{add-data.output.status}} +{{add-data.output.message}} +{{add-data.output.queryId}} +``` + +--- + +## Output Type + +The node’s output is always a JSON object. +It contains all the fields described above and can be passed directly into subsequent nodes for logging, conditional checks, or notifications. + +--- + +## Example Usage + +**Example 1 – Basic Record Insertion** + +Input: + +```json +{ + "collectionName": "production:users", + "name": "John Doe", + "email": "john@example.com", + "age": "25" +} +``` + +Expected Output: + +```json +{ + "tableName": "users", + "queryId": "q12345", + "message": "Record added successfully", + "status": "success", + "errorType": null, + "errorCode": null, + "missingColumn": null +} +``` + +--- + +**Example 2 – Missing Required Field** + +Input: + +```json +{ + "collectionName": "development:employees", + "email": "employee@example.com" +} +``` + +Expected Output: + +```json +{ + "tableName": "employees", + "queryId": null, + "message": "Missing required column: name", + "status": "error", + "errorType": "validation_error", + "errorCode": "ERR_MISSING_FIELD", + "missingColumn": "name" +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. Drag the **Add New Data** node onto your workflow canvas. +2. Open its **Node Settings** panel. +3. Select or create the database table where you want to store data. +4. Click **Add Data** to define the column names and their corresponding values. +5. You can enter static values or insert variables from previous nodes using the `{{...}}` syntax. +6. Save your changes and connect this node to other parts of your workflow — such as after a “Form Submission” or “API Response” node. +7. Run or test the workflow. The node will attempt to insert the record and will display success or error details in its output. + +--- + +## Best Practices + +* Always double-check your `collectionName` format (`"environment:tableName"`). +* Ensure that the column names exactly match your database schema. +* Use the `"development"` environment for testing before writing to production. +* Use the `status` and `message` outputs to trigger next steps in your workflow (for example, sending a confirmation email only when status is `"success"`). +* Keep your database fields clean and consistent — for example, use lowercase column names and avoid spaces. + +--- + +## Example Workflow Integration + +Here’s a common real-world scenario: + +1. **Form Submission Node** – Captures a user’s input (name, email, etc.). +2. **Add New Data Node** – Inserts that data into the `production:users` table. +3. **Send Email Node** – Uses `{{add-data.output.status}}` to send a confirmation only if the record was added successfully. + +This integration helps automate user data collection end-to-end without writing any database code. + +--- + +## Common Errors + +* **“Missing required column”** – One of the required columns in your table was not provided. + *Fix:* Add the missing column in the node’s data parameters. + +* **“Invalid collectionName format”** – The collection name doesn’t follow the `"environment:tableName"` format. + *Fix:* Use something like `"production:orders"` or `"development:employees"`. + +* **“Permission denied”** – The workflow does not have permission to write to this table. + *Fix:* Check your environment’s permissions or credentials. + +* **“Duplicate key”** – You’re trying to insert a record with a unique value (like an email) that already exists. + *Fix:* Ensure unique keys are not repeated in your input data. + +--- + + + diff --git a/Workflow/Database/create-graphs.mdx b/Workflow/Database/create-graphs.mdx new file mode 100644 index 0000000..faee34b --- /dev/null +++ b/Workflow/Database/create-graphs.mdx @@ -0,0 +1,214 @@ + +**Category:** Database / Visualization +**Type:** Chart / Graph Generation Node + +--- + +## Overview + +The **Create Graphs** node lets you turn your database queries into visual charts — such as line graphs, bar graphs, pie charts, scatter plots, and area graphs — directly inside a no-code workflow. + +It’s designed for users who want to **visualize data without writing code**, for use in dashboards, reports, or automated email updates. + +--- + +## Description + +This node connects to your database, runs a query (either a manual query or one written in plain language), and returns a visual chart representing your results. You can choose which table to query, what filters to apply, and what type of chart to generate. + +After execution, the node provides: + +* The queried data, +* A link to the generated chart image (`chartUrl`), and +* A success message and query ID for reference. + +This chart can then be displayed, downloaded, or passed to other nodes in your workflow. + +--- + +## Input Parameters + +When configuring this node, you can specify: + +* **Node Description:** A short note about what this node does. Optional, but useful for readability. +* **Select Query Type:** Choose how you want to query your data. You can use “Query Data” (structured query with fields and filters) or “Natural Language Query” (plain English). +* **Table Name:** The name of the database table or collection you want to use (for example, `test3 (production)`). +* **Query Fields:** Define which records to fetch. Each field can include a name, operator (like `=`, `>`, `<`), and a value or input variable. You can add multiple fields. +* **Query Combination Type:** Choose how multiple conditions are combined, either `AND` or `OR`. +* **Order By:** Choose the field you want to sort the results by (for example `name` or `created_at`). +* **Order Direction:** Select whether to sort results ascending or descending. +* **Limit:** Specify the maximum number of records to fetch. +* **Start After / Offset:** Skip a number of records before starting to fetch data, useful for pagination. +* **Chart Type:** Select the type of visualization — Line Graph, Bar Graph, Pie Chart, Scatter Plot, or Area Graph. +* **xField:** The field to use for the X-axis (for line, bar, scatter, or area charts). +* **yField:** The field to use for the Y-axis (usually a number or count). +* **Group By:** Optional field to group records (useful for grouped or stacked charts). +* **Aggregation:** Choose how to aggregate grouped values — sum, average, count, min, or max. + +If you choose **Natural Language Query**, you can simply describe what you want, like *“Show total active users per month”*, and the node will translate that into a query automatically. + +--- + +## Output Parameters + +After the node runs successfully, it returns a JSON response containing: + +* **tableName:** The full name of the queried table or collection. +* **queryId:** A unique identifier for this query execution. +* **data:** The actual records returned from the query. +* **message:** A summary of what the node did (for example, “Successfully fetched 1 record and generated chart”). +* **status:** Shows whether the operation succeeded or failed (`success` or `error`). +* **chartUrl:** The link to the generated chart image. +* **image:** The same chart image URL (for convenience). + +--- + +## Output Type + +The output is a **JSON object** that includes both the query results and metadata about the generated chart. +This JSON can be used by other workflow nodes to display, share, or store the chart. + +--- + +## Example Usage + +### Example 1 – Query Data with Line Graph + +**Input:** + +```json +{ + "selectQueryType": "Query Data", + "tableName": "test3 (production)", + "queryFields": [ + { "field": "id", "operator": "=", "value": "5" } + ], + "queryCombinationType": "AND", + "chartType": "Line Graph", + "xField": "created_at", + "yField": "active" +} +``` + +**Output:** + +```json +{ + "output": { + "tableName": "production:test3", + "queryId": "23c92010-a5c0-4bc2-9946-d7df4cc69265", + "data": [ + { + "id": "5", + "created_at": "2023-05-12T11:00:00.000Z", + "name": "David Wilson", + "bio": "David Wilson is a project manager ...", + "active": "yes", + "email": "david.wilson@constructionco.net", + "status": null + } + ], + "message": "Successfully fetched 1 records and generated chart", + "status": "success", + "chartUrl": "https://worqhat-harshada.s3.ap-southeast-2.amazonaws.com/uploads/1761727716398-smh3fj.png?...", + "image": "https://worqhat-harshada.s3.ap-southeast-2.amazonaws.com/uploads/1761727716398-smh3fj.png?..." + } +} +``` + +--- + +### Example 2 – Natural Language Query with Bar Graph + +**Input:** + +```json +{ + "selectQueryType": "Natural Language Query", + "tableName": "test3 (production)", + "naturalLanguage": "Show total active users per month for the last 6 months", + "chartType": "Bar Graph", + "xField": "month", + "yField": "count", + "aggregation": "count", + "limit": 6 +} +``` + +**Output:** + +```json +{ + "output": { + "tableName": "production:test3", + "queryId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "data": [ + { "month": "2025-05", "count": 12 }, + { "month": "2025-06", "count": 9 }, + { "month": "2025-07", "count": 15 } + ], + "message": "Successfully fetched 3 records and generated chart", + "status": "success", + "chartUrl": "https://.../monthly-active-users.png", + "image": "https://.../monthly-active-users.png" + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. Add the **Create Graphs** node to your workflow. +2. Open **Node Settings** and give it a short description (optional). +3. Select the **Query Type** — “Query Data” or “Natural Language Query”. +4. Choose the **Table Name** you want to query. +5. If using Query Data, add one or more **Query Fields** and define conditions. +6. Set the **Query Combination Type** to `AND` or `OR`. +7. Choose **Order By**, **Direction**, and **Limit** if needed. +8. Pick the **Chart Type** — line, bar, pie, scatter, or area. +9. Set **xField** and **yField** for chart axes. +10. Click **Save Changes**. +11. Run your workflow. The node will generate and return the chart image URL in its output. +12. You can then use the `chartUrl` in an email node, dashboard, or file node. + +--- + +## Best Practices + +* Always apply a **limit** to avoid overly large datasets. +* For time-based charts, make sure the **xField** is a date or timestamp. +* Use numeric fields for **yField** so charts can render correctly. +* Pie charts should have fewer categories for clear readability. +* When grouping data, use an **aggregation** like `sum` or `count`. +* Review outputs of natural-language queries before running in production. +* Store the **chartUrl** or **queryId** for debugging or history tracking. + +--- + +## Example Workflow Integration + +Here’s a common pattern: + +``` +Trigger → Create Graphs Node → Send Email or Dashboard Display +``` + +For example, you can schedule a trigger every week to: + +* Query total sales per region from your production database, +* Generate a bar chart, and +* Send that chart image in a weekly report email to your team. + +--- + +## Common Errors + +* **No data returned:** Your query filters might be too strict. Try broadening them. +* **Chart not generated:** The fields you chose for X or Y may not be valid numeric or date fields. +* **Empty chart:** Only one data point was fetched. Increase your limit or use aggregation. +* **Permission denied:** The selected table may not be accessible or doesn’t exist. +* **Chart takes too long:** Limit your query or aggregate results to fewer records. + +--- + diff --git a/Workflow/Database/delete-data.mdx b/Workflow/Database/delete-data.mdx new file mode 100644 index 0000000..bf04817 --- /dev/null +++ b/Workflow/Database/delete-data.mdx @@ -0,0 +1,150 @@ + +**Category:** Database +**Type:** Delete Node + +--- + +## Overview + +The **Delete Data Node** allows you to remove specific records from your connected database automatically. +It’s used in workflows where you want to clean up data, delete user information, or remove outdated entries — all without writing any SQL code. + +By defining simple query conditions, the node identifies matching records and deletes them permanently from the selected table. + +--- + +## Description + +This node deletes records from a database table based on matching criteria you define through **Query Fields**. +For example, if you specify the field `name` as your condition, the node will remove any records where the name matches the provided input. + +It’s particularly useful when you need to handle data removal as part of automated workflows — such as account deletion requests, cleanup operations, or resetting test data. + +--- + +## Input Parameters + +The Delete Data Node can accept the following input values: + +* **id** – The unique identifier of a record. This can be used if you want to target a specific record. +* **name** – The name of the record to delete. This is typically used as the main condition. +* **email** – The email address of the record (optional). It can be used for additional filtering. +* **created_at** – The timestamp when the record was created (optional, ISO format). + +Only `name` is required in this setup, as it’s used in the query condition to find which record to remove. + +--- + +## Output Parameters + +Once executed, the node provides the following information as output: + +* **tableName** – The name of the database table (or collection) where the deletion occurred, such as `production:test3`. +* **queryId** – A unique identifier automatically generated for the delete query. +* **deletedCount** – The number of records successfully deleted from the database. +* **message** – A brief summary describing the operation result. +* **status** – Shows whether the deletion was successful or not (for example, `success` or `error`). + +--- + +## Output Type + +The output is returned in **JSON format**, containing structured information about the delete action — including the target table, the number of records affected, and a success message. + +This output can be used by other nodes for logging, confirmation messages, or audit tracking. + +--- + +## Example Usage + +**Example Input:** + +```json +{ + "input": { + "id": "10", + "name": "John Doe", + "email": "jd@gmail.com", + "created_at": "2025-12-01T12:00:00.000Z" + } +} +``` + +**Example Output:** + +```json +{ + "output": { + "tableName": "production:test3", + "queryId": "3b9ac2cb-71a4-493c-8db0-fa5fe6d72490", + "deletedCount": 1, + "message": "Successfully deleted 1 record(s)", + "status": "success" + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. Add the **Delete Data Node** to your workflow from the **Database** category. +2. Choose the correct **table or collection** where the data should be removed (for example, `test3 (production)`). +3. Under **Query Fields**, specify the condition that will identify which record(s) to delete. + + * Example: `name = Input: name` +4. Connect the node to a data source that provides the input (like a form or a trigger node). +5. Save your settings and **run the workflow**. +6. After execution, the node will display a message confirming whether any records were deleted. + +--- + +## Best Practices + +* Always use a **unique or specific query condition** (like `id` or an exact `name`) to prevent accidental deletion of multiple records. +* Test your workflow in a **staging environment** before using it in production. +* If possible, implement a **confirmation step** before deletion to avoid unintended data loss. +* Log the output message for tracking and debugging purposes. +* Never use overly broad filters (like deleting all records without conditions). + +--- + +## Example Workflow Integration + +Here’s an example of how the **Delete Data Node** can fit within a complete workflow: + +``` +User Request → Validation Node → Delete Data Node → Success Notification +``` + +1. A user triggers the workflow (for example, by submitting a “Delete Account” form). +2. The workflow validates the request details. +3. The **Delete Data Node** removes the matching record from the database. +4. The workflow sends a confirmation message or email to the user. + +--- + +## Common Errors and Fixes + +**“Successfully deleted 0 record(s)”** + +* Cause: No record matched the query condition. +* Fix: Check that the input value (for example, the `name`) exists in the database. + +**“Table not found”** + +* Cause: The table or collection name is incorrect. +* Fix: Verify the table name and environment selection (such as production or staging). + +**“Missing required field”** + +* Cause: A required query parameter (for example, `name`) wasn’t provided. +* Fix: Ensure all required inputs are connected in the workflow. + +**“Permission denied”** + +* Cause: Insufficient permissions to delete from the table. +* Fix: Check your database credentials or admin access. + +--- + diff --git a/Workflow/Database/fetch-data.mdx b/Workflow/Database/fetch-data.mdx new file mode 100644 index 0000000..5ddefa3 --- /dev/null +++ b/Workflow/Database/fetch-data.mdx @@ -0,0 +1,199 @@ + +**Category:** Database +**Type:** Data Retrieval Node + +--- + +## Overview + +The **Fetch Data** node allows you to retrieve stored records (also called “documents”) from your database collection. +You can fetch all records, a specific record, or simply count how many records exist — all without writing a single line of code. + +This node is useful when your workflow needs to **read**, **analyze**, or **display** data that already exists in your database, such as user profiles, orders, or product lists. + +--- + +## Description + +The Fetch Data node connects your workflow to your chosen database collection and brings back the data you need. +It supports three main retrieval modes: + +* **Fetch All Documents:** Retrieve every record inside a collection. +* **Fetch Specific Document:** Retrieve a single record by its ID or other criteria. +* **Count Documents:** Get only the total number of records. + +This node is perfect for displaying stored information, generating reports, or processing user data inside no-code workflows. + +--- + +## Input Parameters + +**Node Description** + +* Type: Text +* Description: A short internal note describing what this node does in your workflow. +* Required: No + +**Select Action Type** + +* Type: Dropdown (Select) +* Description: Defines what kind of fetch action you want to perform — fetch all, fetch one, or count. +* Required: Yes + +**Collection Name** + +* Type: Dropdown (Select) +* Description: The name of the collection (database) where your documents are stored. Example: `test3 (production)`. +* Required: Yes + +--- + +## Output Parameters + +When executed, this node provides a structured **JSON output** that other nodes can use. + +**Output Fields:** + +* **tableName:** The full collection name (e.g., `production:test3`). +* **queryId:** A unique ID generated for this fetch operation. +* **data:** The array of documents that were fetched from the collection. +* **message:** A success message describing the result. +* **status:** Indicates the result of the operation — usually `"success"` or `"error"`. + +--- + +## Output Type + +The node output is in **JSON format**, meaning the data is structured into fields and values. +This makes it easy for other workflow nodes to read, filter, or use the information directly. + +--- + +## Example Usage + +### Example 1 — Fetch All Documents + +**Input:** + +```json +{ + "Select Action Type": "Fetch All Documents", + "Collection Name": "test3 (production)" +} +``` + +**Expected Output:** + +```json +{ + "output": { + "tableName": "production:test3", + "queryId": "6e7b29a3-61a9-4e23-b1cc-9af3b4c8d190", + "data": [ + { + "id": "201", + "name": "Alice Carter", + "email": "alice.carter@startup.io", + "bio": "Alice is a UX designer passionate about accessible interfaces and clean visuals.", + "active": "yes", + "created_at": "2024-11-05T09:00:00.000Z" + }, + { + "id": "202", + "name": "Brian Thompson", + "email": "brian.thompson@agency.com", + "bio": "Brian is a content strategist with a decade of experience in brand storytelling.", + "active": "no", + "created_at": "2024-12-10T14:30:00.000Z" + }, + { + "id": "203", + "name": "Chloe Ramirez", + "email": "chloe.ramirez@techlabs.ai", + "bio": "Chloe is a data analyst who specializes in predictive modeling and insights reporting.", + "active": "yes", + "created_at": "2025-01-15T08:45:00.000Z" + } + ], + "message": "Successfully fetched 3 documents", + "status": "success" + } +} +``` + +--- + +### Example 2 — Count Documents + +**Input:** + +```json +{ + "Select Action Type": "Count Documents", + "Collection Name": "test3 (production)" +} +``` + +**Expected Output:** + +```json +{ + "output": { + "tableName": "production:test3", + "count": 13, + "message": "Successfully counted documents", + "status": "success" + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Node:** Drag and drop the **Fetch Data** node into your workflow canvas. +2. **Open Settings:** Click on the node to open its configuration panel. +3. **Add a Description:** Optionally describe its purpose (e.g., “Fetch all employee records”). +4. **Select Action Type:** Choose one of the three options: + + * Fetch All Documents + * Fetch Specific Document + * Count Documents +5. **Choose Collection:** Select your database collection such as `test3 (production)`. +6. **Save Changes:** Click **Save Changes** to confirm your setup. +7. **Run the Workflow:** When triggered, the node fetches data and passes it to the next node automatically. + +--- + +## Best Practices + +* Always verify that you are fetching from the correct **collection**. +* Use **Count Documents** to check totals before performing actions like filtering or deleting. +* If you only need specific records, use **Fetch Specific Document** to avoid unnecessary data load. +* Combine this node with **Filter**, **Text Generation**, or **Email Sending** nodes for dynamic workflows. +* Keep the **Node Description** meaningful so others can easily understand its purpose. + +--- + +## Example Workflow Integration + +Here’s an example of how this node might fit into a workflow: + +1. **Trigger Node:** The workflow begins when an admin clicks “View Records.” +2. **Fetch Data Node:** Retrieves all user data from `test3 (production)`. +3. **Text Generation Node:** Summarizes the fetched data into a readable format. +4. **Send Email Node:** Sends a formatted summary to the admin’s inbox. + +This workflow automates the process of pulling, formatting, and sharing database information. + +--- + +## Common Errors + +* **Missing Collection Name:** The node cannot run without selecting a valid collection. +* **Invalid Action Type:** Ensure one of the supported options is chosen. +* **Empty Results:** Happens when no records exist in the selected collection. +* **Connection Timeout:** Check your database connection or permissions if data fails to load. + +--- + diff --git a/Workflow/Database/query-data.mdx b/Workflow/Database/query-data.mdx new file mode 100644 index 0000000..4f270f6 --- /dev/null +++ b/Workflow/Database/query-data.mdx @@ -0,0 +1,240 @@ + +**Category:** Database +**Type:** Read / Query Node + +--- + +## Overview + +The **Query Data Node** allows you to search, filter, and retrieve records from your connected database collection within a no-code workflow. +You can use this node to fetch specific rows based on filters, get all data, or even use plain language to describe what you want to retrieve — no SQL required. + +--- + +## Description + +This node helps you connect to your selected database table (or collection) and return matching records as structured JSON. +You can apply multiple filters, combine them with AND/OR logic, sort the data, limit how many records you want, and even paginate large data sets. +The output from this node can then be passed to other nodes like “Display Data,” “Generate Text,” or “Create Chart.” + +--- + +## Input Parameters + +Below are the input settings you can configure in the node: + +* **Node Description:** + Optional text to describe what this node does (for internal clarity). + +* **Select Query Type:** + Choose between + + * *Query Data* → use structured filters with fields and operators. + * *Natural Language Query* → type a plain-text instruction like “Find all active users created after January 2024”. + +* **Table Name:** + Choose the table or collection you want to query, for example `test3 (production)`. + +* **Query Fields:** + Add one or more filters to narrow down the search. Each filter includes: + + * a field (for example, `id`, `name`, or `email`) + * an operator (`=`, `!=`, `contains`, etc.) + * a value (which can also come from an earlier node’s output). + +* **Query Combination Type:** + Defines how multiple filters are joined. + + * `AND` → all conditions must match. + * `OR` → any condition can match. + +* **Order By:** + Select the field by which you want to sort the results (for example, `name` or `created_at`). + +* **Order Direction:** + Choose `Ascending` or `Descending` for the sorting order. + +* **Limit:** + Specify how many records you want to retrieve at most. + +* **Start After / Offset:** + Use this to skip records (for pagination). + +--- + +## Output Parameters + +The node produces several pieces of information after running: + +* **tableName:** + The full name of the collection that was queried, for example `production:test3`. + +* **queryId:** + A unique ID automatically assigned to this specific query run. It helps with logs and debugging. + +* **data:** + The main output — an array (list) of records returned by the query. Each record is an object containing fields like `id`, `name`, `email`, and others from your database. + +* **message:** + A readable message summarizing what happened, for example “Successfully fetched 13 documents.” + +* **status:** + Indicates success or failure of the operation (e.g., `success`, `error`). + +--- + +## Output Type + +The output is returned in **JSON format**. +The key `data` holds an array of record objects. Each object contains all fields from that record in your database. +This JSON can easily be passed to other nodes for further processing, display, or transformation. + +--- + +## Example Usage + +### Example 1 – Query Data (structured filters) + +**Node settings:** + +```json +{ + "selectQueryType": "Query Data", + "tableName": "test3 (production)", + "queryCombinationType": "AND", + "orderBy": "name", + "orderDirection": "Ascending", + "limit": 50 +} +``` + +**Expected output:** + +```json +{ + "output": { + "tableName": "production:test3", + "queryId": "a5aeb97e-44f3-48d2-9fe6-ad2e475c527f", + "data": [ + { + "id": "10", + "created_at": "2023-10-01T12:00:00.000Z", + "name": "Amanda Taylor", + "bio": "Amanda Taylor is a journalist covering environmental issues and climate change...", + "active": "yes", + "email": "amanda.taylor@newsagency.org", + "status": null + }, + { + "id": "5", + "created_at": "2023-05-12T11:00:00.000Z", + "name": "David Wilson", + "bio": "David Wilson is a project manager in the construction industry...", + "active": "yes", + "email": "david.wilson@constructionco.net", + "status": null + } + ], + "message": "Successfully fetched 2 documents", + "status": "success" + } +} +``` + +--- + +### Example 2 – Natural Language Query + +**Node settings:** + +```json +{ + "selectQueryType": "Natural Language Query", + "tableName": "test3 (production)", + "naturalLanguage": "Find all active users created after January 2023 ordered by created_at descending", + "limit": 20 +} +``` + +**Expected output:** + +```json +{ + "output": { + "tableName": "production:test3", + "queryId": "b12c98fa-7e11-4a77-9cb8-8d7a7e901234", + "data": [ + { "id": "10", "name": "Amanda Taylor", "created_at": "2023-10-01T12:00:00.000Z", "active": "yes" }, + { "id": "5", "name": "David Wilson", "created_at": "2023-05-12T11:00:00.000Z", "active": "yes" } + ], + "message": "Successfully fetched 2 documents", + "status": "success" + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. Drag and drop the **Query Data** node into your workflow. +2. Click the node to open its settings. +3. Optionally give it a clear description like “Fetch recent users.” +4. Choose the **Query Type**. + + * Use “Query Data” if you want structured filters. + * Use “Natural Language Query” if you want to type instructions. +5. Pick your **Table Name** (for example, `test3 (production)`). +6. If using structured filters, click **Add Field** and set up each condition. +7. Combine filters using “AND” or “OR.” +8. Choose sorting, limit, and offset if needed. +9. Click **Save Changes**. +10. Connect this node to the next step — such as a display node or a text generation node — to use the results. + +--- + +## Best Practices + +* Always use a **limit** to avoid pulling huge datasets. +* When you only need one specific record, query using a unique field like `id`. +* Use **consistent date formats** (ISO format: `YYYY-MM-DDTHH:mm:ss.sssZ`) for better filtering and sorting. +* Combine **orderBy** with **limit** to get “top N” or “latest” results. +* When using **Natural Language Query**, double-check that the interpreted query makes sense. +* Keep your **queryId** for debugging or workflow tracking. + +--- + +## Example Workflow Integration + +Here are common ways to use this node: + +* **Form Input → Query Data → Display Results** + A user enters a search term, Query Data fetches matches, and a Display node shows them. + +* **Schedule Trigger → Query Data → Email Node** + Runs daily, fetches recent updates, and emails the summary. + +* **Button Click → Query Data → Chart Node** + A dashboard button triggers Query Data, and the returned data builds a visualization. + +--- + +## Common Errors and Fixes + +* **Empty results:** + Your filters may not match any records. Try loosening the conditions. + +* **Invalid table name:** + Double-check you selected the correct table or environment (for example, `test3 (production)`). + +* **Missing required field:** + You might have left out a necessary input or not connected upstream nodes correctly. + +* **Sorting not working:** + The `orderBy` field might be missing or inconsistent (string vs. date type). + +* **Permission errors:** + Ensure you have access to the database and correct credentials. + +--- + diff --git a/Workflow/Database/update-data.mdx b/Workflow/Database/update-data.mdx new file mode 100644 index 0000000..8461fbe --- /dev/null +++ b/Workflow/Database/update-data.mdx @@ -0,0 +1,151 @@ + +**Category:** Database +**Type:** Update Node + +--- + +## Overview + +The **Update Data Node** allows you to modify existing records in a database table. +It’s ideal for workflows where data needs to be updated automatically — for example, changing a user’s details, updating a timestamp, or modifying status information after another node’s execution. + +This node works within your selected environment (like **production**) and uses **query fields** to locate the target record, then **data parameters** to apply the updates. + +--- + +## Description + +This node is used to update existing data in a connected database. +You can define which record(s) should be updated by setting query fields (such as `id`, `name`, or `email`) and then specify what values to update using data parameters. + +For example, if you want to change a user’s name and email based on their ID, you can use this node to perform that action automatically — no SQL required. + +--- + +## Input Parameters + +The following inputs are accepted by this node: + +* **id** – The unique identifier of the record you want to update. It’s used as both a query and data input. +* **name** – The updated name value that should replace the old one. +* **email** – The updated email address to store in the database. +* **created_at** – A timestamp (in ISO format) showing when the record was created or last modified. + +All inputs are text-based except `created_at`, which should be a valid ISO date string (e.g., `2025-12-01T12:00:00.000Z`). + +--- + +## Output Parameters + +After execution, the node returns a structured output containing: + +* **tableName** – The full name of the database table that was updated (for example, `production:test3`). +* **queryId** – A unique identifier assigned to the query run. +* **updatedCount** – The number of records successfully updated. +* **message** – A summary message describing the result of the operation. +* **status** – Indicates whether the update was successful or failed. + +--- + +## Output Type + +The node produces a JSON object as output, summarizing the operation’s success and update results. +This output can be used by subsequent nodes in your workflow for conditional actions, logging, or user notifications. + +--- + +## Example Usage + +**Example Input:** + +```json +{ + "input": { + "id": "10", + "name": "John Doe", + "email": "jd@gmail.com", + "created_at": "2025-12-01T12:00:00.000Z" + } +} +``` + +**Example Output:** + +```json +{ + "output": { + "tableName": "production:test3", + "queryId": "1d6330c7-e3c8-4712-a12f-4594242321d1", + "updatedCount": 0, + "message": "Successfully updated 0 record(s)", + "status": "success" + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. Add the **Update Data Node** from the **Database** category in your workflow. +2. Under **Select Update Type**, choose **“Update Data.”** +3. In **Table Name**, select the database table you want to modify (e.g., `test3 (production)`). +4. Add **Query Fields** — these define which records to find. For example: + + * `id = Input: id` + * `email = Input: email` +5. Add **Data Parameters** — these specify what will be updated. For example: + + * `name = Input: name` + * `created_at = Input: created_at` +6. Connect the node to any input node (such as a form, trigger, or data fetch node) that supplies the required fields. +7. Save your configuration and run the workflow. +8. Review the output message to confirm how many records were updated and whether the operation was successful. + +--- + +## Best Practices + +* Always use a **unique identifier** like `id` in your query fields to ensure only the correct record is updated. +* Make sure all input values (especially timestamps and emails) are correctly formatted before execution. +* Double-check that you’re updating the correct **environment** (e.g., production vs staging). +* If testing changes, work in a sandbox or non-production table to avoid overwriting live data. +* Use the output `message` and `status` for error checking or logging. + +--- + +## Example Workflow Integration + +Here’s an example of how the **Update Data Node** can be used in a typical workflow: + +``` +Form Submission → Data Validation → Update Data Node → Send Confirmation Email +``` + +* A user submits a form with updated information. +* The data is validated in a previous node. +* The Update Data Node modifies the existing database record. +* The workflow sends a confirmation email or message to the user. + +--- + +## Common Errors and Solutions + +**“Successfully updated 0 record(s)”** +No matching record was found using the provided query fields. +→ Recheck your query field values (e.g., correct `id` or `email`). + +**“Table not found”** +The specified table name or environment is incorrect. +→ Verify that the table name exists and is selected properly. + +**“Missing required field”** +A required input value was not provided. +→ Make sure all input parameters are connected to valid data sources. + +**“Connection timeout”** +The node couldn’t reach the database. +→ Retry or check your network/database connection settings. + +--- + diff --git a/Workflow/Process-Nodes/Loop-process.mdx b/Workflow/Process-Nodes/Loop-process.mdx new file mode 100644 index 0000000..462f570 --- /dev/null +++ b/Workflow/Process-Nodes/Loop-process.mdx @@ -0,0 +1,203 @@ + +**Category:** Logic & Control Flow +**Type:** Iterative Process + +--- + +## Overview + +The **Loop Process Node** is used to repeat a set of actions several times inside your workflow. +It helps you run the same task automatically for a fixed number of iterations or items, without needing to manually duplicate steps. + +This node is helpful when you need to process multiple records, perform repetitive operations, or create batch tasks — such as sending several messages, checking multiple values, or looping through a list of data. + +--- + +## Description + +The **Loop Process Node** works by running a group of connected actions in a **loop**. +You can define a **loop variable** that represents the current iteration (like `a` or `i`), and you can specify how many times the loop should run by setting a **maximum iteration count**. + +Each time the loop runs, the workflow uses the loop variable’s value for that round. +Once it finishes all the iterations, the loop stops automatically. + +If no actions are placed inside the loop, it will complete immediately with zero iterations. + +--- + +## Input Parameters + +**Node Description** +An optional text description explaining what this loop is designed to do. + +**Loop Variable** +The name of the variable used in each loop iteration. +For example, if you enter `a`, then each round of the loop will reference `a` as the current count or value. + +**Maximum Iterations** +The total number of times the loop should repeat. +This setting prevents the workflow from looping endlessly. + +All of these inputs can be set directly in the **Node Settings** panel. + +--- + +## Output Parameters + +**condition (loop result)** — Indicates whether the loop ran successfully or not. +**totalIterations** — Shows how many total iterations were planned for this loop. +**completedIterations** — Displays how many times the loop actually completed its actions. +**batchesProcessed** — If your workflow runs items in groups, this value shows how many batches were processed. +**Loop Variable Output** — Shows the final value of the loop variable after all iterations are complete. + +--- + +## Output Type + +The output of this node is **iterative data**. +It includes numeric results such as how many iterations were completed and the final state of your loop variable. +You can use this information in later steps of your workflow. + +--- + +## Example Usage + +### Example 1: Simple 10-Iteration Loop + +**Input:** + +```json +{ + "loopVariable": "a", + "maximumIterations": 10 +} +``` + +**Output:** + +```json +{ + "totalIterations": 10, + "completedIterations": 10, + "batchesProcessed": 1, + "a": null +} +``` + +**Explanation:** +This example creates a loop using the variable `a` that runs ten times. +Since there are no actions inside the loop, it finishes immediately and returns summary details like total and completed iterations. + +--- + +### Example 2: Process Multiple Items + +**Input:** + +```json +{ + "loopVariable": "item", + "maximumIterations": 5 +} +``` + +**Expected Output:** + +```json +{ + "totalIterations": 5, + "completedIterations": 5, + "batchesProcessed": 1, + "item": "last_processed_value" +} +``` + +**Explanation:** +This setup loops through five items using the variable `item`. +Each iteration processes one item, and after all iterations, the last processed value is returned. + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Node** + Drag and drop the **Loop Process Node** into your workflow canvas. + +2. **Set the Loop Variable** + Enter a name for your loop variable (like `item` or `a`). + This variable represents the current count or item in each iteration. + +3. **Define the Maximum Iterations** + Specify how many times you want the loop to run. + This ensures the loop stops after the desired number of rounds. + +4. **Add Actions Inside the Loop** + Place the nodes or actions that you want to repeat **inside** the loop. + +5. **Connect the Next Step** + Once the loop finishes, connect the next node or action for what should happen next. + +6. **Run the Workflow** + Execute the workflow to see the loop in action. + Review the results to confirm that all iterations ran successfully. + +--- + +## Best Practices + +* Always set a **maximum iteration limit** to avoid infinite loops. +* Start with a **small number of iterations** (like 3 to 5) during testing. +* Give your **loop variable** a short, meaningful name that reflects its purpose. +* Combine the Loop Process Node with **If/Else Conditions** for smarter decision-making inside loops. +* Use the loop for **batch operations** — such as processing lists, updating records, or sending multiple messages. + +--- + +## Example Workflow Integration + +**Scenario:** +You want to send a personalized email to 10 users. + +**Workflow Steps:** + +1. Add a **Trigger Node** to start your workflow (for example, “User List Loaded”). +2. Add a **Loop Process Node** and set: + + * Loop Variable: `user` + * Maximum Iterations: `10` +3. Inside the loop, add a **Send Email Node** to send a personalized message to each user. +4. After the loop, connect a **Summary Node** or **Log Node** to record that all messages were sent. + +**Result:** +The workflow automatically runs 10 times — one for each user — and stops when all iterations are done. + +--- + +## Common Errors + +**Loop variable not defined** +The loop variable field was left blank. +→ Always provide a name like `a` or `item`. + +**Maximum iterations missing** +You must set the total number of iterations. +→ This prevents infinite loops. + +**No actions inside the loop** +The node has nothing to process. +→ Add at least one action or node inside the loop. + +**Loop did not start** +The input data was empty or invalid. +→ Make sure the previous node provides valid data for looping. + +--- + +## Summary + +The **Loop Process Node** lets you automate repetitive actions easily — no coding required. +You can repeat steps a specific number of times, work through lists of items, or perform batch operations automatically. +It’s a simple yet powerful way to make your workflow **smarter, faster, and more efficient**. + +--- + diff --git a/Workflow/Process-Nodes/Switch-case.mdx b/Workflow/Process-Nodes/Switch-case.mdx new file mode 100644 index 0000000..4cde560 --- /dev/null +++ b/Workflow/Process-Nodes/Switch-case.mdx @@ -0,0 +1,162 @@ + +**Category:** Logic and Flow Control +**Type:** Conditional Branching Node + +--- + +## Overview + +The **Switch Case Node** enables conditional logic within your workflow. +It evaluates an input value and directs the workflow to the appropriate branch based on the defined conditions. +If no condition matches, the workflow continues through the **Default** path, ensuring uninterrupted execution. + +This node is ideal for creating workflows that require multiple decision points, such as routing data, performing different actions based on user input, or managing alternative outcomes. + +--- + +## Description + +The Switch Case Node functions like a decision gate. It checks an incoming value—such as a number, text, or boolean—and determines which branch of the workflow should be executed next. + +For example: + +* If the input is “1”, the workflow can proceed to an “Add Data” node. +* If the input is “2”, it can proceed to a “Delete Data” node. +* If the input does not match any case, it will follow the default branch and return a fallback response. + +This ensures your automation logic remains organized and predictable. + +--- + +## Input Parameters + +The following inputs are used to configure the node: + +* **Parameter** – The value to be checked (for example, `number: 2`). +* **Cases** – A list of possible values that determine workflow branching. +* **Default** – The fallback route if no cases match. +* **Parameter Type** – The type of input value (integer, string, boolean, etc.). + +--- + +## Output Parameters + +After evaluation, the node outputs information that defines which case was matched and where the workflow will continue next. + +* **Parameter** – The value that was checked. +* **Parameter Type** – The type of data used in evaluation. +* **Matched Case** – The case name that matched the input value (or “default” if none matched). +* **Next Node** – The ID or name of the next node to be executed. + +--- + +## Example Usage + +### Example 1 — When a Case Matches + +**Input:** + +```json +{ + "input": { + "number": "1" + } +} +``` + +**Output:** + +```json +{ + "parameter": "1", + "parameterType": "integer", + "matchedCase": "Add Data", + "nextNode": "add-data-3" +} +``` + +In this example, the input `"1"` matched the “Add Data” case, so the workflow continued to that node. + +--- + +### Example 2 — When No Case Matches + +**Input:** + +```json +{ + "input": { + "number": "2" + } +} +``` + +**Output:** + +```json +{ + "parameter": "2", + "parameterType": "integer", + "matchedCase": "default", + "nextNode": "return-state-5" +} +``` + +Here, the input `"2"` did not match any defined case, so the workflow followed the default path and returned the message: + +```json +{ "enter valid choice": null } +``` + +--- + +## How to Use + +1. **Add the Switch Case Node** to your workflow. +2. **Connect a Trigger Node**, such as the REST API Trigger, to pass input data. +3. **Select the Input Field** you want the node to evaluate (for example, `number`). +4. **Define Cases** that represent different workflow paths. +5. **Connect Each Case Output** to the appropriate node (for example, Add Data or Delete Data). +6. **Set Up a Default Path** to handle any unexpected or unmatched inputs. +7. **Test the Workflow** using sample inputs to ensure each case functions correctly. + +--- + +## Best Practices + +* Always include a **Default** branch to prevent workflow interruptions. +* Ensure the **data type** of your input matches the defined case values (for example, `"2"` as a string vs `2` as an integer). +* Use clear, descriptive names for each case to simplify debugging. +* Test each case individually to confirm correct routing before deploying your workflow. + +--- + +## Example Workflow Integration + +A common implementation looks like this: + +``` +REST API Trigger → Switch Case → (Add Data / Delete Data / Return State) +``` + +In this setup: + +* Input `"1"` routes to the **Add Data** node. +* Input `"2"` routes to the **Delete Data** node. +* Any other input follows the **Default** path to the **Return State** node, returning a message such as `{ "enter valid choice": null }`. + +--- + +## Common Errors + +* **Issue:** Every input goes to the default branch. + **Solution:** Verify that your input matches the defined case values and data types. + +* **Issue:** Workflow stops unexpectedly. + **Solution:** Ensure a Default branch is configured and connected. + +* **Issue:** Incorrect node triggered. + **Solution:** Double-check that each case is properly linked to the intended next node. + +--- + diff --git a/Workflow/Process-Nodes/for-loop.mdx b/Workflow/Process-Nodes/for-loop.mdx new file mode 100644 index 0000000..2638917 --- /dev/null +++ b/Workflow/Process-Nodes/for-loop.mdx @@ -0,0 +1,153 @@ + + +## Description + +The For Loop Process node allows you to repeat a group of workflow steps multiple times. +You define how many times the loop should run using a start value and an end value. +Each iteration runs the same inner actions. + +This is useful when a task needs to be executed several times, such as sending multiple notifications, performing repeated calculations, or processing multiple items. + +--- + +## Input Parameters + +start +A number that defines the first value of the loop. +Required. + +end +A number that defines the final value of the loop. +Required. + +step +A number that defines how much to increase on each loop cycle. +Optional. Default is 1. + +The loop repeats from start to end, increasing by step until the end value is reached. + +--- + +## Output Parameters + +iterations +Number of iterations performed. + +totalIterations +Total count of times the loop ran. + +Final Output +A summary of the loop execution that can be used by the next step in the workflow. + +--- + +## Output Type + +This node produces an iterative output. +It runs a set of inner steps multiple times and returns results from each cycle. + +--- + +## Example Usage + +Example 1 +Loop runs five times, from 1 to 5. + +Input + +``` +{ + "start": 1, + "end": 5 +} +``` + +Expected Output + +``` +{ + "iterations": [1, 2, 3, 4, 5], + "totalIterations": 5 +} +``` + +--- + +Example 2 +Loop runs four times, from 0 to 3. + +Input + +``` +{ + "start": 0, + "end": 3 +} +``` + +Expected Output + +``` +{ + "iterations": [0, 1, 2, 3], + "totalIterations": 4 +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. Add the For Loop Process node to your workflow. +2. Set the start value. +3. Set the end value. +4. Set step if needed. +5. Place one or more nodes inside the loop. + These nodes will run every time the loop cycles. +6. Connect the next node after the loop to continue workflow execution. +7. Save and run your workflow. + +--- + +## Best Practices + +• Test with a small range first. +• Avoid very large end values to prevent performance issues. +• Always place at least one node inside the loop. +• Use logging to confirm iterations run correctly. + +--- + +## Example Workflow Integration + +Scenario +You want to send five reminder messages. + +Steps + +1. Add a trigger node. +2. Add a For Loop Process node and set start to 1 and end to 5. +3. Inside the loop, add a notification or message-sending node. +4. After the loop, add a summary node to indicate all messages were sent. + +Result +The inner action runs five times. + +--- + +## Common Errors + +Missing start or end +Both must be set for the loop to execute. + +Loop does not run +At least one node must be placed inside the loop. + +Too many iterations +Large ranges can slow down or block execution. + +Empty output +If no inner nodes produce output, results will be empty. + +--- + diff --git a/Workflow/Process-Nodes/if-else-condition.mdx b/Workflow/Process-Nodes/if-else-condition.mdx new file mode 100644 index 0000000..cdc29c8 --- /dev/null +++ b/Workflow/Process-Nodes/if-else-condition.mdx @@ -0,0 +1,201 @@ + +**Category:** Logic & Control Flow +**Type:** Conditional Branching + +--- + +## Overview + +The **If/Else Condition** node helps you create **conditional logic branches** in your workflow. +It checks a condition you define and then decides which path to take — **True** or **False** — based on the result. + +This allows you to make your workflow “think” and automatically handle different situations. +For example, you can send a message only if the sender’s email matches a specific address, or trigger a notification only if a value meets certain criteria. + +--- + +## Description + +This node compares one piece of data (like an email address, name, or number) against a value you choose. +Depending on whether the condition is **true** or **false**, the workflow continues along the **True path** or the **False path**. + +It’s commonly used to: + +* Filter or sort data. +* Control workflow decisions. +* Automate actions based on user input or system data. + +--- + +## Input Parameters + +| **Parameter** | **Type** | **Description** | **Required** | +| -------------------- | -------- | ---------------------------------------------------------------------------- | ------------ | +| **Source Node** | `string` | The node that provides the input data to check. | ✅ | +| **Parameter** | `string` | The specific data field to evaluate (for example, `senderEmail`). | ✅ | +| **Operator** | `string` | The comparison method to use, such as `Equals`, `Not Equals`, or `Contains`. | ✅ | +| **Value** | `string` | The value to compare against the selected parameter. | ✅ | +| **Node Description** | `string` | An optional text field to describe what this condition checks. | ❌ | + +--- + +## Output Parameters + +| **Parameter** | **Type** | **Description** | +| ------------- | --------- | --------------------------------------------------------------------------------------------------------------------------- | +| **condition** | `boolean` | Shows whether the defined condition evaluated to **true** or **false**. | +| **Next Step** | `string` | Indicates which path the workflow will follow next — the **True** branch or the **False** branch — depending on the result. | + +--- + +## Output Type + +The output is a **Boolean** value: + +* **True** → The condition matched, and the workflow will follow the **True path**. +* **False** → The condition did not match, and the workflow will follow the **False path**. + +--- + +## Example Usage + +### Example 1: Check the Sender’s Email + +**Input:** + +```json +{ + "sourceNode": "Send Mail", + "parameter": "Input: senderEmail", + "operator": "Equals", + "value": "kolekarharshada08@gmail.com" +} +``` + +**Execution Output:** + +```json +{ + "output": { + "condition": false, + "Next Step": "Return to Default Path" + } +} +``` + +**Explanation:** +The workflow checked if the sender’s email matched `kolekarharshada08@gmail.com`. +Since it was actually `harshada@notifs.worqhat.com`, the result was **False**, and the workflow continued on the **False branch**. + +--- + +### Example 2: Match a User Name + +**Input:** + +```json +{ + "sourceNode": "User Info", + "parameter": "Input: userName", + "operator": "Equals", + "value": "Alex" +} +``` + +**Expected Output:** + +```json +{ + "output": { + "condition": true, + "Next Step": "Send Welcome Email" + } +} +``` + +**Explanation:** +Because the user’s name was “Alex,” the condition was **True**, and the workflow moved to the **Send Welcome Email** step. + +--- + +## How to Use in a No-Code Workflow + +Follow these simple steps to use the **If/Else Condition** node in your workflow: + +1. **Add the Node** + Drag and drop the **If/Else Condition** node into your workflow editor. + +2. **Connect a Source Node** + Choose the previous node that provides the data to check (for example, “Send Mail” or “API Response”). + +3. **Select a Parameter** + Pick which piece of data you want to evaluate — such as an email address or a status code. + +4. **Choose an Operator** + Select how the comparison should be done (`Equals`, `Contains`, `Greater Than`, etc.). + +5. **Set a Value** + Enter the value you want to compare against. + +6. **Connect the True and False Paths** + + * Connect the **True path** to the action you want if the condition is met. + * Connect the **False path** to the action you want if it’s not met. + +7. **Run the Workflow** + When executed, the node automatically decides which path to follow based on your condition. + +--- + +## Best Practices + +* Use **clear, descriptive names** for your nodes and conditions. +* Double-check that the **parameter** exactly matches the field name from your source node. +* For string comparisons, remember that some systems may be **case-sensitive**. +* Keep your workflow organized by grouping related conditions together. +* Always test your workflow with both True and False outcomes to ensure everything works correctly. + +--- + +## Example Workflow Integration + +**Scenario:** +You want to automatically reply to emails only from a specific sender. + +**Workflow Steps:** + +1. **Trigger Node:** Receive Email +2. **If/Else Condition:** + + * Source Node: `Send Mail` + * Parameter: `Input: senderEmail` + * Operator: `Equals` + * Value: `kolekarharshada08@gmail.com` +3. **True Path:** Send an auto-reply email. +4. **False Path:** Log the message and stop the workflow. + +**Result:** +Only the selected sender receives an automatic reply, while others are ignored. + +--- + +## Common Errors + +| **Error Message** | **Possible Cause** | **Solution** | +| -------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------ | +| *“Parameter not found in Source Node”* | The selected parameter doesn’t exist or is misspelled. | Double-check the parameter name in the source node output. | +| *“Invalid Operator”* | An unsupported or misspelled operator was selected. | Use valid operators such as `Equals`, `Not Equals`, or `Contains`. | +| *“Value missing for condition”* | The comparison value field is empty. | Enter a valid comparison value. | +| *Condition always returns False* | Data type mismatch or incorrect input mapping. | Check that your parameter and value use the same data format. | + +--- + + + + **Summary:** +The **If/Else Condition Node** is a simple yet powerful way to make your workflow behave intelligently. +It checks conditions, chooses the right path, and ensures your automation reacts exactly the way you need — no coding required. + +--- + + diff --git a/Workflow/Process-Nodes/return-state.mdx b/Workflow/Process-Nodes/return-state.mdx new file mode 100644 index 0000000..5968a42 --- /dev/null +++ b/Workflow/Process-Nodes/return-state.mdx @@ -0,0 +1,184 @@ + +**Category:** Workflow Control +**Type:** Process + +--- + +## Overview + +The **Return State Node** is the final step of a workflow. +It’s used to return the final **status**, **message**, and **data** back to the user or connected system. + +Think of it as the **“return statement”** in a workflow — once this node runs, the process ends and a response is sent. + +--- + +## Description + +This node gathers outputs from previous steps and organizes them into a structured final response. +It doesn’t perform any calculations or actions by itself. + +You can choose what to include in the final response — for example, results from an API call, processed data, or user inputs. + +Common fields: + +* **status** – shows if the process succeeded or failed (e.g., 200 for success). +* **message** – gives a short description of the result. +* **data** – contains the actual information or result you want to send back. + +Use double curly braces `{{ }}` to reference values from earlier nodes, like: +`{{UserInputNode.output.email}}` or `{{DatabaseNode.output.recordId}}`. + +--- + +## Input Parameters + +This node does **not** take direct inputs. +It simply collects and returns data already generated by previous nodes. + +If you need to include specific values, use `{{nodeId.output.field}}` to map them into the final output. + +--- + +## Output Parameters + +The Return State Node produces three main outputs: + +* **status** – A code such as `200` (success) or `400` (error). +* **message** – A short note describing the outcome. +* **data** – A JSON object that holds all the final results. + +--- + +## Output Type + +The output is a **structured JSON response** that marks the end of the workflow. +It typically includes a numeric status code, a descriptive message, and an object with the final data. + +--- + +## Example Usage + +### Example 1: Returning a User Profile + +**Input:** + +```json +{ + "input": { + "NAME": "Jacob Williams", + "EMAIL": "jacobwilliams@worqhat.com", + "CONTACT_NUMBER": "123456789", + "ADDRESS": "Building Number: 30 Street Name: Rockefeller Plaza Street Address: Top of the Rock Observation Deck State: NY City: New York Post Code: 10112" + } +} +``` + +**Output:** + +``` +Status: 200 +Response: +{ + "name": "Jacob Williams", + "email": "jacobwilliams@worqhat.com", + "contact number": "123456789", + "address": "Building Number: 30 Street Name: Rockefeller Plaza Street Address: Top of the Rock Observation Deck State: NY City: New York Post Code: 10112" +} +``` + +This example shows how the node gathers user data and formats it neatly into the final response. + +--- + +### Example 2: Returning an Order Summary + +You can use this node to return results from an order processing workflow. + +**Configuration:** + +``` +status: 200 +message: "Order processed successfully" +data: { + "orderId": "{{OrderNode.output.id}}", + "totalAmount": "{{BillingNode.output.amount}}", + "confirmationTime": "{{TimeNode.output.timestamp}}" +} +``` + +**Expected Output:** + +```json +{ + "status": 200, + "message": "Order processed successfully", + "data": { + "orderId": "ORD-4582", + "totalAmount": 250.75, + "confirmationTime": "2025-10-29T10:30:00Z" + } +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. Add the **Return State Node** as the final step of your workflow. +2. Map data from earlier nodes using `{{nodeId.output.field}}`. +3. Define the **status** (e.g., 200) and **message** (e.g., “Process completed successfully”). +4. Include all the data you want to return under the **data** field. +5. Run or test your workflow — this node will output the final JSON response. + +--- + +## Best Practices + +* Always place this node **at the end** of your workflow. +* Use meaningful **status codes** (200 for success, 400 for error). +* Keep your **messages** short and descriptive. +* Map only the necessary data fields to keep the response clean. +* Test the workflow with both successful and failed cases to ensure reliability. + +--- + +## Example Workflow Integration + +**Scenario:** Customer registration workflow + +**Steps:** + +1. Input Node collects customer details. +2. Validation Node checks required fields. +3. Database Node saves the record. +4. Return State Node sends the final success response. + +**Final Output:** + +```json +{ + "status": 200, + "message": "Customer registered successfully", + "data": { + "name": "Jacob Williams", + "email": "jacobwilliams@worqhat.com", + "contact": "123456789" + } +} +``` + +This setup ensures the process ends with a clear, easy-to-understand result. + +--- + +## Common Errors + +* **Missing Output Reference:** You might have referenced a node that doesn’t exist. Check your `{{ }}` mappings. +* **Empty Response:** Happens when `data` is not defined. Make sure you include at least one field. +* **Invalid Data Type:** Occurs if data is incorrectly formatted (for example, using text where an object is expected). +* **Workflow Did Not Return:** The Return State Node must be the last node in the workflow. + + +--- + diff --git a/Workflow/Triggers/Email-Trigger.mdx b/Workflow/Triggers/Email-Trigger.mdx new file mode 100644 index 0000000..4bd609d --- /dev/null +++ b/Workflow/Triggers/Email-Trigger.mdx @@ -0,0 +1,249 @@ + + +**Category:** Trigger +**Type:** Email-Based + +--- + +## Overview + +The **Email Trigger Node** automatically starts a workflow whenever an incoming email is received at a unique, system-generated email address. + +This node is ideal for building workflows that respond to incoming messages such as support ticket systems, automated acknowledgment replies, spam filtering, attachment processing, or email-to-database automation. + +Once configured, any email sent to the unique workflow address will immediately trigger the workflow and make all email details (like sender, subject, message, and attachments) available to downstream nodes. + +--- + +## Description + +When a workflow includes an **Email Trigger Node**, a **unique email address** is generated for it in the format: + +``` +workflow-[id]@inbox.worqhat.com +``` + +Any email sent to this address will start the workflow automatically. + +The node captures all details of the received email — including sender (`from`), subject, message body (HTML or text), attachments, spam and virus scores, and delivery information. These values are then made available to other nodes in the workflow. + +If your workflow does not yet have an email address, you can set the parameter `incomingEmail` to: + +``` +{{GENERATE_INCOMING_EMAIL}} +``` + +This tells the system to automatically create and assign a new incoming email address. + +--- + +## Input Parameters + +**Note:** + +* Only `incomingEmail` needs to be configured manually; all other fields are automatically populated when an email is received. +* You can access any of these parameters in downstream nodes using the syntax: + + ``` + {{emailTrigger.input.}} + ``` + + +The **Email Trigger** node receives and exposes several parameters that represent the details of incoming emails. + +* **incomingEmail** + The unique incoming email address assigned to this workflow. + Use `"{{GENERATE_INCOMING_EMAIL}}"` if you want the system to automatically create one. + +* **htmlMessage** + The full HTML version of the received email’s body content. + +* **textMessage** + The plain text version of the email message. + +* **subject** + The subject line of the received email. + +* **from** + The sender’s email address. + +* **to** + The recipient’s email address — usually the unique workflow email address. + +* **cc / bcc** + Lists of carbon copy (CC) and blind carbon copy (BCC) recipients, if included. + +* **inReplyTo** + The message ID of the email this one is replying to, if applicable. + +* **references** + A reference chain showing related messages in an email thread. + +* **attachmentFile** + The file ID of any attachment included in the email. + +* **attachmentFileName** + The name of the attached file. + +* **attachmentFileType** + The MIME type of the attached file (e.g., `"image/png"`, `"application/pdf"`). + +* **attachmentFileSize** + The size of the attachment, in bytes or a human-readable format. + +* **spamScore** + A numerical score estimating the likelihood that the email is spam. + +* **virusScore** + A numerical score estimating the likelihood that the email contains malicious content. + +* **deliveryTime** + The exact delivery timestamp of the email in ISO format. + +* **deliveryId** + A unique identifier assigned to the email delivery. + +* **deliveryStatus** + Indicates the delivery result, such as “delivered” or “failed.” + +--- + +**Instructions:** + +* You **must** configure `incomingEmail` once per workflow. +* All other fields are automatically populated when an email is received. +* Access values within the workflow using: + + ``` + {{emailTrigger.input.subject}} + {{emailTrigger.input.from}} + {{emailTrigger.input.textMessage}} + {{emailTrigger.input.attachmentFile}} + ``` + +--- + +## Output Parameters + +This node has **no direct outputs**, as all received email data is available through input parameters. + +**Output Parameters:** N/A + +**Instructions:** +Downstream nodes can directly use these input values to perform tasks such as AI summarization, classification, or attachment processing. + +--- + +## Output Type + +**Output Type:** N/A +This node does not generate any new data output; it only exposes received email content to the workflow. + +--- + +## Example Usage + +### Example 1: Workflow with Generated Email Address + +```json +{ + "incomingEmail": "{{GENERATE_INCOMING_EMAIL}}" +} +``` + +**Expected Behavior:** +A unique email address (e.g., `workflow-123@inbox.worqhat.com`) is generated automatically. +Any future email sent to this address will trigger the workflow and populate all message fields. + +--- + +### Example 2: Workflow Using an Existing Email Address + +```json +{ + "incomingEmail": "workflow-123@inbox.worqhat.com" +} +``` + +**Expected Behavior:** +The workflow triggers when this address receives an email. +All details — including sender, subject, and attachments — are captured and can be accessed using variables like: + +``` +{{emailTrigger.input.subject}} +{{emailTrigger.input.from}} +{{emailTrigger.input.htmlMessage}} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Email Trigger Node** + Drag and drop the **Email Trigger** node into your workflow as the first node. + +2. **Generate or Set Incoming Email** + + * Set `incomingEmail` to `"{{GENERATE_INCOMING_EMAIL}}"` to let the system create a new unique address. + * If an address already exists, paste it in directly. + +3. **Save and Deploy the Workflow** + After saving, note the generated email address. Any incoming email to this address will now trigger the workflow. + +4. **Connect to Processing Nodes** + Link the node to others like **Text Generation**, **Content Moderation**, or **File Storage** to automate email handling. + +5. **Test the Workflow** + Send a test email to the generated address and confirm that the workflow triggers automatically. + +--- + +## Best Practices + +* Always use the `{{GENERATE_INCOMING_EMAIL}}` placeholder for new workflows to ensure unique email creation. +* Avoid sharing the generated workflow email publicly to prevent spam. +* Use **Content Moderation** or **Spam Filtering** nodes for safer automation. +* Utilize both `htmlMessage` and `textMessage` for flexible content extraction. +* For attachments, use downstream nodes like **File Storage** or **Text Extraction** to process files. +* Keep an eye on the `spamScore` and `virusScore` fields for automated security actions. + +--- + +## Example Workflow Integration + +**Use Case:** Automatically summarize incoming support emails. + +**Workflow Steps:** + +1. **Email Trigger Node** – Captures new email messages. +2. **Text Generation Node** – Summarizes the email body. +3. **Slack Message Node** – Sends the summary to a support channel. + +**Connection Example:** + +``` +{{emailTrigger.input.textMessage}} → {{textGeneration.input.prompt}} +{{textGeneration.output.content}} → {{slackMessage.input.message}} +``` + +--- + +## Common Errors + +* **"Missing incomingEmail"** + **Cause:** `incomingEmail` parameter not set. + **Solution:** Add `"{{GENERATE_INCOMING_EMAIL}}"` to generate a new address or use an existing one. + +* **"Email address already in use"** + **Cause:** The same email address is assigned to multiple workflows. + **Solution:** Each workflow must have a unique email trigger address. + +* **"Empty email body"** + **Cause:** The received email had no body content. + **Solution:** Ensure you handle both `textMessage` and `htmlMessage` for flexibility. + +* **"Attachment not found"** + **Cause:** Email contained an attachment but it failed to upload or reference correctly. + **Solution:** Verify attachment settings and downstream node compatibility. + +--- diff --git a/Workflow/Triggers/File-Upload-Trigger.mdx b/Workflow/Triggers/File-Upload-Trigger.mdx new file mode 100644 index 0000000..8932e5d --- /dev/null +++ b/Workflow/Triggers/File-Upload-Trigger.mdx @@ -0,0 +1,199 @@ +**Category:** Trigger +**Type:** File-Based + +--- + +## Overview + +The **File Upload Trigger** node starts a workflow automatically when one or more files are uploaded. +It acts as the entry point for workflows that depend on user-submitted or system-uploaded files, enabling processes like file processing, document analysis, or image recognition to begin immediately after upload. + +--- + +## Description + +This node listens for file uploads and triggers the workflow when a file (or multiple files) is received. +The uploaded file can then be used as an input by downstream nodes for further processing such as text extraction, AI-based analysis, or storage operations. + +It is particularly useful for workflows that involve: + +* PDF or document uploads for analysis +* Image uploads for recognition or classification +* Audio or video uploads for transcription or processing + +Once a file is uploaded, the workflow automatically starts and passes the file data to the next connected nodes. + +--- + +## Input Parameters + +The **File Upload Trigger** node accepts file uploads and optional metadata as input. + +* **file** *(file, required)* + The uploaded file that triggers the workflow. + Supports documents, images, audio, and video formats depending on your workflow setup. + This is a **mandatory parameter** — the workflow will not start without it. + +* **customKeys** *(string, optional)* + You can define additional key-value inputs for reference or tagging, such as: + + * `userId` → to identify the uploader + * `category` → to classify the file + * `description` → to describe the uploaded content + +**Notes:** + +* Only the `file` parameter is required. +* Extra parameters are optional and can be added for organizational or filtering purposes. +* All parameters are provided as simple key-value pairs (no nested objects). + +--- + +**Instructions:** + +* The `file` parameter is **mandatory** and must contain the uploaded file. +* You can add other input parameters as additional metadata. +* All extra parameters are simple key-value pairs and can be used in downstream nodes. +* The node does **not** process files directly — it simply triggers the workflow. + +Access uploaded file data in downstream nodes using: + +``` +{{fileUploadTrigger.input.file}} +``` + +--- + +## Output Parameters + +This node does not produce its own outputs. +Instead, it passes the uploaded file and input details directly to downstream nodes for use. + +**Output Parameters:** +N/A + +**Instructions:** +You can access the uploaded file or metadata in any connected node using variable references: + +``` +{{fileUploadTrigger.input.file}} → File reference or ID +{{fileUploadTrigger.input.userId}} → Custom metadata (if provided) +``` + +--- + +## Output Type + +**Output Type:** N/A +This node serves only as a workflow trigger and does not generate a separate output type. + +--- + +## Example Usage + +### Example 1: Trigger on Document Upload + +```json +{ + "file": "invoice_2025.pdf", + "userId": "U001", + "category": "billing" +} +``` + +**Expected Behavior:** +The workflow starts as soon as `invoice_2025.pdf` is uploaded. +Downstream nodes can access: + +``` +{{fileUploadTrigger.input.file}} → "invoice_2025.pdf" +{{fileUploadTrigger.input.userId}} → "U001" +{{fileUploadTrigger.input.category}} → "billing" +``` + +--- + +### Example 2: Trigger on Image Upload + +```json +{ + "file": "product_photo.jpg", + "description": "Product listing image" +} +``` + +**Expected Behavior:** +The workflow is triggered automatically when `product_photo.jpg` is uploaded. +Subsequent nodes may use the file for image recognition, tagging, or analysis. + +--- + +## How to Use in a No-Code Workflow + +1. **Add the File Upload Trigger Node** + Drag and drop the **File Upload Trigger** node into your workflow as the first node. + +2. **Configure File Inputs** + Define which file types or sources will trigger the workflow (e.g., PDFs, images, or audio). + +3. **Add Optional Metadata** + Include optional key-value inputs such as `userId`, `department`, or `description` if needed for tracking. + +4. **Connect to Processing Nodes** + Link this trigger to other nodes like **Text Extraction**, **Image Analysis**, or **Content Moderation** to process the uploaded files automatically. + +5. **Test the Upload** + Upload a test file to confirm the workflow triggers and downstream nodes receive the file data. + +6. **Deploy or Activate the Workflow** + Once verified, save and activate your workflow so it runs automatically upon future uploads. + +--- + +## Best Practices + +* Always ensure the `file` parameter is provided; workflows will not start without it. +* Keep filenames descriptive for easier tracking in logs or outputs. +* Validate file formats in downstream nodes if your workflow supports only specific types (e.g., PDFs or images). +* Add metadata parameters like `userId` or `source` to help identify uploads in larger workflows. +* Avoid attaching extremely large files to prevent delays or timeouts. +* Ensure you have proper access permissions for file handling nodes that follow. + +--- + +## Example Workflow Integration + +**Use Case:** Automatically analyze uploaded documents. + +* Step 1: The **File Upload Trigger** node starts the workflow when a user uploads a PDF. +* Step 2: The **Text Extraction Node** extracts text from the uploaded file. +* Step 3: The **AI Node** summarizes the extracted text. +* Step 4: The **Email Node** sends the summary to the user. + +**Workflow Connection Example:** + +``` +{{fileUploadTrigger.input.file}} → {{textExtraction.input.attachments}} +{{textExtraction.output.content}} → {{textGeneration.input.prompt}} +``` + +--- + +## Common Errors + +* **"Missing file input"** + **Cause:** No file was uploaded. + **Solution:** Ensure a valid file is attached before triggering the workflow. + +* **"Invalid file format"** + **Cause:** The uploaded file type is not supported by downstream nodes. + **Solution:** Confirm the file type is compatible with the workflow’s next node. + +* **"Empty trigger"** + **Cause:** The trigger received an empty payload or invalid upload. + **Solution:** Retry the upload and verify that the file field is correctly mapped. + +* **"Connection not established"** + **Cause:** The trigger node isn’t connected to downstream nodes. + **Solution:** Connect the trigger to at least one processing node. + diff --git a/Workflow/Triggers/Rest-Api-Trigger.mdx b/Workflow/Triggers/Rest-Api-Trigger.mdx new file mode 100644 index 0000000..50f095c --- /dev/null +++ b/Workflow/Triggers/Rest-Api-Trigger.mdx @@ -0,0 +1,215 @@ +**Category:** Trigger +**Type:** API + +--- + +## Overview + +The **REST API Trigger** node starts a workflow automatically when an external service or application sends an HTTP request to a specific REST API endpoint. +It acts as the entry point for workflows that need to be triggered by external systems, such as websites, mobile apps, or third-party APIs. + +--- + +## Description + +This node is used to trigger workflows through REST API calls. +Whenever an external service makes a request to the provided endpoint, the workflow is activated, and the incoming data is passed to downstream nodes. + +It supports **GET**, **POST**, and **PUT** requests, and can accept data in multiple formats — such as **JSON**, **form-data**, or **query parameters**. +This makes it ideal for integrating workflows with custom apps, webhooks, or backend systems. + +--- + +## Input Parameters + +The **REST API Trigger** node accepts dynamic flat key-value pairs sent by an external request. +You can define any keys according to the data you expect from the incoming call. + +* **exampleKey** *(string, optional)* + A placeholder for a key in the incoming request. + Example: + + ``` + "userId": "12345" + ``` + +* **exampleKey2** *(string, optional)* + Another example input key. + Example: + + ``` + "email": "example@domain.com" + ``` + +* **exampleKey3** *(string, optional)* + Any additional input data you may send through the API. + Example: + + ``` + "source": "mobile-app" + ``` + +**Instructions:** + +* The node accepts only **flat key-value pairs** (no nested objects). +* Data can be sent via: + + * JSON body (`application/json`) + * Form data (`x-www-form-urlencoded`) + * Query parameters (e.g., `?userId=123&source=web`) +* Arrays must be JSON-encoded (e.g., `["a", "b", "c"]`). +* Files cannot be attached to this trigger. +* All keys are optional and schema-free; you can define your own structure as needed. +* Default values for undefined keys are `null`. + +Access input data within the workflow using: + +``` +{{nodeId.input.}} +``` + +Example: + +``` +{{restApiTrigger.input.userId}} +``` + +--- + +## Output Parameters + +This node does not produce separate output variables. +Instead, it directly exposes the incoming request data for use by downstream nodes. + +**Output Parameters:** +N/A + +**Instructions:** +You can access incoming request values in other nodes using: + +``` +{{restApiTrigger.input.userId}} +{{restApiTrigger.input.email}} +{{restApiTrigger.input.source}} +``` + +--- + +## Output Type + +**Output Type:** N/A +The node does not generate an independent output type — it only exposes input data from an external API request. + +--- + +## Example Usage + +### Example 1: Trigger Workflow with User Data + +**Incoming API Request:** + +```json +POST /api/workflows/trigger +Content-Type: application/json + +{ + "userId": "001", + "email": "john@example.com", + "source": "mobile" +} +``` + +**Accessible in Workflow:** + +``` +{{restApiTrigger.input.userId}} → "001" +{{restApiTrigger.input.email}} → "john@example.com" +{{restApiTrigger.input.source}} → "mobile" +``` + +--- + +### Example 2: Trigger Workflow via URL Parameters + +**Incoming Request:** + +``` +GET /api/workflows/trigger?productId=789&type=purchase +``` + +**Accessible in Workflow:** + +``` +{{restApiTrigger.input.productId}} → "789" +{{restApiTrigger.input.type}} → "purchase" +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the REST API Trigger Node** + Place the node at the start of your workflow. It acts as the entry point for data received via HTTP requests. + +2. **Copy the Workflow Endpoint** + Each workflow generates a unique REST API endpoint (e.g., `https://yourdomain.com/api/workflows/trigger`). + External systems will send data to this endpoint. + +3. **Configure External Application** + From any app, website, or backend service, send a request (POST, GET, or PUT) to the endpoint with your desired key-value data. + +4. **Define Expected Fields** + Downstream nodes can reference incoming keys using the `{{nodeId.input.}}` format. + Example: + + ``` + {{restApiTrigger.input.userId}} + ``` + +5. **Test the Connection** + Use a tool like Postman or cURL to send a test request to the workflow endpoint and confirm it triggers correctly. + +6. **Connect to Other Nodes** + Link this trigger to other nodes (e.g., AI, Database, Email) to process, analyze, or respond to incoming data automatically. + +--- + +## Best Practices + +* Use consistent key names (e.g., `userId`, `email`, `action`) across all requests. +* Validate your incoming request payloads before processing. +* If you expect large or complex data, send it as a JSON-encoded string. +* Avoid sending files directly; instead, send file URLs or file IDs. +* Use HTTPS for secure communication. +* Test your API endpoint thoroughly with Postman or similar tools before deployment. + +--- + +## Example Workflow Integration + +**Use Case:** Automatically process user signup data sent from an app. + +1. **Trigger Node** - REST API Trigger(node receives signup details such as name and email.) +2. **AI Node** - Text Generation (drafts a welcome message.) +3. **Utility Node** - Send Email (sends the message to the user.) + + +## Common Errors + +* **"Invalid JSON format"** + **Cause:** The incoming request body is not properly formatted. + **Solution:** Ensure valid JSON syntax or use form-data encoding. + +* **"Missing endpoint or unauthorized access"** + **Cause:** Request sent to the wrong endpoint or missing authorization headers. + **Solution:** Verify the workflow’s API URL and authentication setup. + +* **"Unsupported input type"** + **Cause:** Files or unsupported data structures were sent. + **Solution:** Only send text, numbers, booleans, or JSON-encoded strings. + +* **"No data received"** + **Cause:** Request was sent with an empty payload. + **Solution:** Add at least one key-value pair in the request body or query string. + +--- diff --git a/Workflow/Triggers/Time-Based-Runs.mdx b/Workflow/Triggers/Time-Based-Runs.mdx new file mode 100644 index 0000000..3d998fc --- /dev/null +++ b/Workflow/Triggers/Time-Based-Runs.mdx @@ -0,0 +1,174 @@ +**Category:** Trigger +**Type:** Time-Based + +--- + +## Overview + +The **Time-Based Runs (Time Trigger)** node allows you to automatically start workflows at specific times or intervals without manual intervention. +It is ideal for scheduling recurring tasks such as data updates, report generation, system cleanups, or automated notifications. + +This node ensures workflows are triggered consistently according to your defined schedule, making it a reliable automation starter for time-driven operations. + +--- + +## Description + +The **Time Trigger** node is used to run workflows on a schedule. +It can be configured to execute based on three modes: + +1. **Interval** – Runs at regular time intervals (e.g., every 3 minutes). +2. **Natural Description** – Uses simple human-readable time expressions (e.g., “every Monday at 9am”). +3. **CRON Expression** – Uses an advanced CRON format for precise control (e.g., “0 9 * * 1-5” for weekdays at 9am). + +You can define **only one scheduling mode** at a time — the other two must be left empty. +Once configured, the workflow will automatically start at the specified time. + +--- + +## Input Parameters + +| **Parameter** | **Type** | **Description** | **Required** | +| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | +| **interval** | string | *(Optional)* Defines how frequently the workflow should run using a CRON step pattern. Example: `"*/5"` runs the workflow every 5 minutes. | ✖ | +| **natural_description** | string | *(Optional)* A human-readable scheduling format. Example: `"every 3 hours"` or `"every weekday at 9am"`. | ✖ | +| **cron_description** | string | *(Optional)* A full CRON expression for advanced scheduling. Example: `"0 9 * * 1-5"` to trigger at 9am Monday–Friday. | ✖ | + +**Instructions:** + +* You must provide **only one** of the above parameters per node. +* All parameters are simple strings (no nested objects or arrays). +* Unused scheduling parameters should be left blank (`null`). +* Access parameter values in workflows using: + + ``` + {{timeTrigger.input.interval}} + {{timeTrigger.input.natural_description}} + {{timeTrigger.input.cron_description}} + ``` + +--- + +## Output Parameters + +This node does **not** produce outputs. +It is purely a **trigger** — its role is to initiate workflow execution based on time conditions. + +--- + +## Example Usage + +### Example 1: Interval-Based Schedule + +```json +{ + "interval": "*/10", + "natural_description": null, + "cron_description": null +} +``` + +**Expected Behavior:** +The workflow runs automatically every 10 minutes. + +--- + +### Example 2: Natural Language Schedule + +```json +{ + "interval": null, + "natural_description": "every day at 6pm", + "cron_description": null +} +``` + +**Expected Behavior:** +The workflow triggers once daily at 6:00 PM local time. + +--- + +### Example 3: CRON Expression Schedule + +```json +{ + "interval": null, + "natural_description": null, + "cron_description": "0 9 * * 1-5" +} +``` + +**Expected Behavior:** +The workflow runs automatically at **9:00 AM, Monday through Friday**. + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Time Trigger Node** + Drag and drop the **Time Based Runs** node as the first node in your workflow. + +2. **Select a Scheduling Mode** + Choose one of the three available scheduling methods — *interval*, *natural language*, or *CRON expression*. + +3. **Configure Schedule** + + * Use **interval** for quick recurring runs (e.g., every 5 minutes). + * Use **natural_description** for simple human-readable schedules (e.g., “every day at 9am”). + * Use **cron_description** for advanced timing needs. + +4. **Leave Other Fields Empty** + Make sure only one scheduling parameter is filled; the others must remain `null`. + +5. **Connect Downstream Nodes** + Link the time trigger to other nodes, such as **Data Fetch**, **AI Generation**, or **Email Notification**, to automate periodic actions. + +6. **Activate the Workflow** + Once configured, activate the workflow. It will automatically execute according to your defined schedule. + +--- + +## Best Practices + +* Use **interval** for simple repeat tasks (e.g., every few minutes or hours). +* Prefer **natural_description** for readability in business or team workflows. +* Consider **cron_description** for complex or system-level automation. +* Ensure your workflow remains active; paused workflows will not run automatically. +* Avoid overlapping intervals (e.g., setting both “*/1” and “every minute”). +* Always test schedules with short intervals before deploying long-running jobs. +* Use descriptive labels or comments to clarify what each scheduled trigger does. + +--- + +## Example Workflow Integration + +**Use Case:** Automatically refresh AI-generated content every day. + +**Workflow Steps:** + +1. **Trigger Node:** Time Based Runs. (Runs daily at 9am). +2. **AI Node:** Text Generation (Generates the day’s content.) +3. **Utility Node:** Send Email (Sends the generated content to subscribers.) + + +--- + +## Common Errors + +* **"Multiple schedule parameters set"** + **Cause:** More than one scheduling mode (interval/natural/cron) was filled. + **Solution:** Only one scheduling parameter should be set; leave others as `null`. + +* **"Invalid CRON expression"** + **Cause:** Incorrect CRON syntax (missing fields or invalid format). + **Solution:** Verify CRON format using a CRON validator (e.g., crontab.guru). + +* **"Empty schedule"** + **Cause:** All scheduling fields were left empty. + **Solution:** Provide at least one valid scheduling parameter. + +* **"Workflow did not start"** + **Cause:** The workflow is inactive or disabled. + **Solution:** Ensure the workflow is active and properly connected. + + diff --git a/Workflow/Triggers/Whatsapp-trigger.mdx b/Workflow/Triggers/Whatsapp-trigger.mdx new file mode 100644 index 0000000..1105406 --- /dev/null +++ b/Workflow/Triggers/Whatsapp-trigger.mdx @@ -0,0 +1,155 @@ +**Category:** Trigger +**Type:** Event-Based + +--- + +## Overview + +The **WhatsApp Trigger** node automatically starts your workflow whenever a new WhatsApp message is received. +It’s perfect for automating responses, logging incoming chats, or kicking off custom actions when someone messages you on WhatsApp. + +--- + +## Description + +This node listens for incoming WhatsApp messages through your connected WhatsApp account. +Whenever someone sends a text or media message, it instantly activates the workflow and passes the message details — like sender name, message body, and attachments — to the next steps in your automation. + +You can use it to: + +* Send auto-replies to specific keywords. +* Store received messages in a database. +* Forward media or text to another channel. +* Trigger smart responses using AI nodes. + +All message data is automatically captured by the node, so you don’t need to configure anything manually. + +--- + +## Input Parameters + +The WhatsApp Trigger includes five automatically-filled fields whenever a new message is received: + +* **messageId** → The unique ID of the incoming WhatsApp message. +* **from** → The WhatsApp number or name of the sender. +* **to** → The WhatsApp number or name of the receiver (your connected account). +* **body** → The text content of the message. Empty if the message contains only media. +* **file** → The file reference or ID if an image, PDF, video, or other attachment is sent. + +These values are automatically populated by WhatsApp’s webhook system — you don’t have to set them yourself. +You can access them anywhere in the workflow using variables like: + +``` +{{nodeId.input.messageId}} +{{nodeId.input.from}} +{{nodeId.input.to}} +{{nodeId.input.body}} +{{nodeId.input.file}} +``` + +--- + +## Output Parameters + +This node doesn’t create new outputs. +Its purpose is to **make WhatsApp message data available** for use in other connected nodes. + +--- + +## Output Type + +There’s no output type — this node simply exposes message information to the rest of your workflow. + +--- + +## Example Usage + +### Example 1 — Basic Text Message + +When someone sends: + +```json +{ + "messageId": "1", + "from": "Akshay", + "to": "John", + "body": "meet at evening" +} +``` + +Your workflow might respond or store the message like this: + +```json +{ + "message": "meet at evening" +} +``` + +The workflow starts automatically when the message arrives, using the text `"meet at evening"` as input for the next node. + +--- + +### Example 2 — Message with Attachment + +If a message includes media: + +```json +{ + "messageId": "4523", + "from": "+919876543210", + "to": "+911234567890", + "body": "Please find the attached report.", + "file": "report_2025.pdf" +} +``` + +The workflow can use the `file` field to download, store, or forward the attachment to another system. + +--- + +## How to Use in a No-Code Workflow + +1. **Add the WhatsApp Trigger Node** + Drag and drop the node as the first step in your workflow. It acts as the workflow’s starting point. + +2. **Connect It to Action Nodes** + Link it to a node that performs an action — for example, a **Send Message**, **Text Generation**, or **Return State** node. + +3. **Use Message Data** + You can use dynamic variables like `{{nodeId.input.body}}` to read the user’s message and respond accordingly. + +4. **Save and Activate** + Once connected, save and activate the workflow. + Now, every time a WhatsApp message is received, the workflow will start automatically. + +--- + +## Best Practices + +* Use `{{nodeId.input.body}}` to check or process the user’s text. +* If the `file` field has a value, handle it before performing text-only actions. +* Store important messages or attachments in a database for record-keeping. +* Combine this node with a **Text Generation** node to create auto-replies. +* Add a **Condition** node if you want the workflow to react differently depending on message content. + +--- + + + +## Common Errors and Fixes + +* **Workflow doesn’t trigger:** + Check if your WhatsApp webhook or integration is properly connected. + +* **File field is empty:** + The message didn’t include media. Skip file processing for text-only messages. + +* **Message body missing:** + This happens if the message only contained an attachment — use the `file` value instead. + +* **No response or action:** + Make sure you’ve connected another node (like “Return State” or “Send Message”) after the trigger. + +--- + + diff --git a/Workflow/Utility/Calendar-Add-Event.mdx b/Workflow/Utility/Calendar-Add-Event.mdx new file mode 100644 index 0000000..ca05aa3 --- /dev/null +++ b/Workflow/Utility/Calendar-Add-Event.mdx @@ -0,0 +1,271 @@ + +**Category:** Utility +**Type:** Calendar Integration + +--- + +## Overview + +The **Calendar Add Event** node allows you to automatically create events on a connected calendar. +It’s ideal for scheduling meetings, setting reminders, or automating event creation based on triggers — such as form submissions, email requests, or AI-generated scheduling suggestions. + +With this node, you can define event details like title, description, start and end times, participants, and even automatically include a Google Meet link if desired. + +--- + +## Description + +The **Calendar Add Event** node helps automate the process of adding events to your calendar. +Once connected to a calendar account (like Google Calendar), this node can create events with all necessary details, including the meeting title, time, location, participants, and online meeting links. + +It can be combined with other nodes to automatically schedule events based on workflow data — for example: + +* Scheduling meetings after receiving an email inquiry. +* Creating task deadlines after project completion. +* Generating calendar reminders from AI-generated text or forms. + +When executed, the node securely communicates with your calendar service to create the event and returns details such as the event ID, Google Meet link (if applicable), and status confirmation. + +--- + +## Input Parameters + +The **Calendar Add Event** node accepts several parameters that define the event’s details. + +* **calendarId** + The unique identifier of the calendar where the event will be created. + +* **attachments** + Comma-separated file IDs or URLs to attach to the calendar event (e.g., reports, agendas, or images). + +* **title** + The name or title of the event, displayed in the calendar view. + +* **description** + A short description or agenda of the event. Supports plain text or limited HTML formatting. + +* **addGoogleMeet** + When set to `true`, automatically generates and attaches a Google Meet video conferencing link to the event. + +* **startDate** + The start date and time of the event in ISO format (e.g., `2025-10-27T09:00:00Z`). + +* **endDate** + The end date and time of the event in ISO format. Must be later than the start time. + +* **location** + The location or venue for the event (e.g., “Conference Room A” or “Online”). + +* **guestsCanInviteOthers** *(boolean, optional)* + If `true`, allows invited guests to add others to the event. + +* **guestsCanModify** + If `true`, allows guests to edit event details. + +* **guestsCanSeeOtherGuests** *(boolean, optional)* + If `true`, lets guests see who else is invited. + +* **guests** + A comma-separated list of guest email addresses (e.g., `alice@example.com,bob@example.com`). + +**Notes:** + +* Date and time must follow proper ISO formatting for successful creation. +* The calendar account used must have permission to create events on the specified calendar. +* You can access input parameters using: + + ``` + {{calendarAddEvent.input.title}} + {{calendarAddEvent.input.startDate}} + {{calendarAddEvent.input.guests}} + ``` + +--- + +## Output Parameters + +After successfully adding an event, the node returns detailed information about the created event. + +* **eventId** *(string)* + The unique identifier for the newly created calendar event. + +* **status** *(string)* + Indicates whether the event creation was successful (e.g., `"confirmed"`, `"tentative"`). + +* **eventLink** *(string)* + A direct URL to view the created event in the calendar. + +* **meetLink** *(string)* + The Google Meet video link generated (if `addGoogleMeet` was set to true). + +* **meetId** *(string)* + The unique ID of the Google Meet session. + +* **createdAt** *(string)* + The ISO timestamp of when the event was created. + +* **creator** *(string)* + The email address of the user or system that created the event. + +* **attendees[]** *(array)* + A list of invited guests with their email addresses and attendance status. + +* **processingTime** *(string)* + The total time taken to create the event, returned in ISO duration format. + +**Access output values using:** + +``` +{{calendarAddEvent.output.eventId}} +{{calendarAddEvent.output.meetLink}} +{{calendarAddEvent.output.status}} +``` + +--- + +## Output Type + +**Output Type:** Text +The node returns text-based metadata and URLs related to the event creation. + +--- + +## Example Usage + +### Example 1: Add a Meeting with Google Meet + +```json +{ + "calendarId": "primary", + "title": "Project Sync Meeting", + "description": "Weekly project sync with the development team.", + "addGoogleMeet": true, + "startDate": "2025-11-01T10:00:00Z", + "endDate": "2025-11-01T11:00:00Z", + "guests": "alice@example.com,bob@example.com" +} +``` + +**Expected Output:** + +```json +{ + "eventId": "evt_78910", + "status": "confirmed", + "eventLink": "https://calendar.google.com/event?eid=evt_78910", + "meetLink": "https://meet.google.com/abc-defg-hij", + "creator": "automation@worqhat.com", + "processingTime": "PT2S" +} +``` + +--- + +### Example 2: Add a Physical Location Event + +```json +{ + "calendarId": "team_calendar", + "title": "Team Strategy Meeting", + "description": "Quarterly roadmap discussion.", + "startDate": "2025-11-03T09:30:00Z", + "endDate": "2025-11-03T11:00:00Z", + "location": "Conference Room 2", + "guests": "jane@example.com,mark@example.com" +} +``` + +**Expected Output:** + +```json +{ + "eventId": "evt_32456", + "status": "confirmed", + "eventLink": "https://calendar.google.com/event?eid=evt_32456", + "createdAt": "2025-11-03T08:00:00Z", + "creator": "teamlead@example.com" +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Calendar Add Event Node** + Drag and drop the node into your workflow canvas. + +2. **Connect a Trigger Node** + Link a trigger (e.g., Time Trigger, Email Trigger, or Webhook Trigger) to determine when the event should be created. + +3. **Configure Input Parameters** + + * Enter the `calendarId` of your connected account. + * Set the `title`, `startDate`, and `endDate`. + * Optionally, enable Google Meet integration and add participants. + +4. **Connect to Downstream Nodes** + Use the output (like `eventLink` or `meetLink`) in downstream actions — for instance, sending notifications or reminders. + +5. **Test the Workflow** + Run the workflow and verify that the event appears correctly in your calendar. + +6. **Save and Activate** + Once confirmed, save your workflow to automate event creation. + +--- + +## Best Practices + +* Always ensure your time zone and ISO timestamps are accurate to avoid scheduling errors. +* Use descriptive titles and descriptions for easier event management. +* When scheduling recurring meetings, combine this node with a **Time Trigger** for automation. +* Use the `guestsCanInviteOthers` and `guestsCanModify` fields thoughtfully to control collaboration. +* Validate calendar permissions before using service accounts. +* Attach only lightweight files to events; use cloud links for larger resources. + +--- + +## Example Workflow Integration + +**Use Case:** Automatically schedule a meeting when a support ticket is received. + +**Workflow Steps:** + +1. **Email Trigger Node:** Detects new support requests. +2. **AI Node:** Summarizes the issue and proposes a meeting. +3. **Calendar Add Event Node:** Creates a Google Meet event automatically. +4. **Slack Message Node:** Notifies the support team with event details. + +**Connection Example:** + +``` +{{emailTrigger.input.from}} → {{calendarAddEvent.input.guests}} +{{aiNode.output.content}} → {{calendarAddEvent.input.description}} +{{calendarAddEvent.output.eventLink}} → {{slackMessage.input.message}} +``` + +--- + +## Common Errors + +* **"Invalid calendar ID"** + **Cause:** The specified `calendarId` does not exist or access is restricted. + **Solution:** Verify the connected account and calendar permissions. + +* **"Invalid date format"** + **Cause:** `startDate` or `endDate` is not in valid ISO format. + **Solution:** Use proper ISO 8601 format, e.g., `"2025-10-27T09:00:00Z"`. + +* **"End date earlier than start date"** + **Cause:** The end time is set before the start time. + **Solution:** Ensure the end date is later than the start date. + +* **"Missing title"** + **Cause:** The `title` field was left empty. + **Solution:** Provide a valid event name. + +* **"Meet link creation failed"** + **Cause:** The account does not have permission to create Google Meet links. + **Solution:** Enable Meet access in account settings or disable `addGoogleMeet`. + +--- diff --git a/Workflow/Utility/Calendar-Fetch-Events.mdx b/Workflow/Utility/Calendar-Fetch-Events.mdx new file mode 100644 index 0000000..7c315e6 --- /dev/null +++ b/Workflow/Utility/Calendar-Fetch-Events.mdx @@ -0,0 +1,275 @@ + +**Category:** Utility +**Type:** Calendar Integration + +--- + +## Overview + +The **Calendar Fetch Events** node retrieves a list of events from a connected calendar within a specific date range. +It allows you to automatically collect event data such as titles, times, participants, meeting links, and organizers. + +This node is ideal for building workflows that depend on upcoming or past events — for example, generating daily reports, summarizing meetings, or syncing event details with external systems like CRMs or chat tools. + +--- + +## Description + +The **Calendar Fetch Events** node connects to your calendar service and pulls event information based on your defined criteria. +You can specify: + +* A **calendar ID** to fetch events from a particular calendar. +* A **start date** and **end date** to define the time window. + +Once executed, this node returns a structured list of events, including details such as event titles, descriptions, locations, participants, meeting links, and creation timestamps. + +This node does not modify your calendar; it only reads and provides event data for use in other parts of the workflow. + +--- + +## Input Parameters + +The **Calendar Fetch Events** node requires the following parameters to define which events to retrieve. + +* **calendarId** + The unique identifier of the calendar to fetch events from. + Example: `"primary"` or a custom calendar ID. + +* **startDate** + The ISO-formatted start date and time from which events should be fetched. + Example: `"2025-11-01T00:00:00Z"`. + +* **endDate** + The ISO-formatted end date and time until which events should be fetched. + Example: `"2025-11-07T23:59:59Z"`. + +**Notes:** + +* All date values must be in **ISO 8601** format for compatibility. +* The date range can include both past and upcoming events. +* You can access input values using: + + ``` + {{calendarFetchEvents.input.calendarId}} + {{calendarFetchEvents.input.startDate}} + {{calendarFetchEvents.input.endDate}} + ``` + +--- + +## Output Parameters + +After execution, the **Calendar Fetch Events** node returns detailed information about all the events that match the specified criteria. + +* **events[]** + A list of all retrieved events. Each item in the list contains event details such as title, organizer, and meeting links. + +* **events[].eventId** + The unique identifier of each event. + +* **events[].status** + The status of the event, such as `"confirmed"`, `"tentative"`, or `"cancelled"`. + +* **events[].title** + The event’s title or name. + +* **events[].description** + The event’s description or agenda text. + +* **events[].location** + The physical or virtual location of the event. + +* **events[].startDate** + The event’s start time in ISO format. + +* **events[].endDate** + The event’s end time in ISO format. + +* **events[].creator** + The email address or name of the event creator. + +* **events[].organizer** + The email or identifier of the meeting organizer. + +* **events[].attendees[]** + A list of all attendees invited to the event. + +* **events[].attendees[].name** + The name of an attendee. + +* **events[].attendees[].status** + The attendance response — for example, `"accepted"`, `"declined"`, or `"tentative"`. + +* **events[].eventLink** + A direct URL to view the event in the calendar. + +* **events[].meetLink** + The Google Meet link, if a meeting link is attached to the event. + +* **events[].meetId** + The unique identifier of the attached Google Meet session. + +* **events[].createdAt** + Timestamp when the event was created. + +* **events[].updatedAt** + Timestamp when the event was last updated. + +* **totalEvents** + The total count of events retrieved in the query. + +* **timezone** + The time zone associated with the calendar from which events were fetched. + +**You can access these values using syntax like:** + +``` +{{calendarFetchEvents.output.events[0].title}} +{{calendarFetchEvents.output.events[0].meetLink}} +{{calendarFetchEvents.output.totalEvents}} +``` + +--- + +## Output Type + +**Output Type:** JSON +The node returns data in a structured JSON format, making it easy to use in downstream nodes for filtering, summaries, or reporting. + +--- + +## Example Usage + +### Example 1: Fetch Events for the Current Week + +```json +{ + "calendarId": "primary", + "startDate": "2025-11-01T00:00:00Z", + "endDate": "2025-11-07T23:59:59Z" +} +``` + +**Expected Output:** + +```json +{ + "totalEvents": 2, + "timezone": "Asia/Kolkata", + "events": [ + { + "eventId": "evt_23456", + "title": "Team Standup Meeting", + "startDate": "2025-11-02T09:00:00Z", + "endDate": "2025-11-02T09:30:00Z", + "meetLink": "https://meet.google.com/abc-defg-hij" + }, + { + "eventId": "evt_23457", + "title": "Product Review Session", + "startDate": "2025-11-04T13:00:00Z", + "endDate": "2025-11-04T14:00:00Z" + } + ] +} +``` + +--- + +### Example 2: Fetch Events for a Specific Calendar + +```json +{ + "calendarId": "marketing_team_calendar", + "startDate": "2025-11-10T00:00:00Z", + "endDate": "2025-11-15T23:59:59Z" +} +``` + +**Expected Output:** + +```json +{ + "totalEvents": 2, + "events": [ + { + "title": "Marketing Campaign Kickoff", + "organizer": "lead@company.com", + "location": "Conference Room 3" + }, + { + "title": "Design Review", + "organizer": "design@company.com", + "meetLink": "https://meet.google.com/xyz-1234-efg" + } + ] +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Calendar Fetch Events Node** + Drag and drop the node into your workflow from the Utilities category. + +2. **Connect a Trigger Node** + Link a trigger node, such as a **Time Trigger** or **Email Trigger**, to decide when to fetch events (e.g., daily or weekly). + +3. **Configure Input Parameters** + + * Enter the `calendarId` (e.g., `"primary"`). + * Define the `startDate` and `endDate` for the event range. + +4. **Connect to Downstream Nodes** + Use the event data in downstream nodes like **Text Generation** (for summaries), **Slack Message** (for notifications), or **Google Sheets** (for logging). + +5. **Test the Workflow** + Run a manual test to verify the data fetched matches your calendar events. + +6. **Save and Activate** + Once tested, activate the workflow for scheduled event retrieval. + +--- + +## Best Practices + +* Always use valid ISO 8601 date and time formats to avoid data errors. +* Keep the date range short (e.g., one week or one month) for faster performance. +* Use the `timezone` output to align events across regions. +* Combine this node with a **Text Generation Node** to automatically summarize daily or weekly meetings. +* If your calendar has multiple sources, fetch and merge results from separate nodes. +* Regularly refresh your authentication or calendar connection credentials. + +--- + +## Example Workflow Integration + +**Use Case:** Generate a daily summary of meetings and post it to Slack. + +**Workflow Steps:** + +1. **Trigger Node:** Time Trigger (Runs every morning at 8 AM.) +2. **Utility Node:** Calendar Fetch Events Node (Retrieves all meetings for the day.) +3. **AI Node:** Text Generation (Summarizes the fetched events into a brief message.) +4. **Utility Node:** Slack Message (Sends the summary to the team channel.) + + +## Common Errors + +* **"Invalid calendarId"** + **Cause:** The specified calendar ID is incorrect or inaccessible. + **Solution:** Verify the ID and ensure proper permissions. + +* **"Invalid date format"** + **Cause:** Dates are not in ISO 8601 format. + **Solution:** Use properly formatted timestamps, e.g., `"2025-11-01T09:00:00Z"`. + +* **"No events found"** + **Cause:** The date range or calendar is empty. + **Solution:** Adjust the date range or verify that the calendar contains events. + +* **"Connection error"** + **Cause:** The integration with the calendar service failed. + **Solution:** Reconnect your calendar integration and try again. + diff --git a/Workflow/Utility/Custom-Node.mdx b/Workflow/Utility/Custom-Node.mdx new file mode 100644 index 0000000..6357e61 --- /dev/null +++ b/Workflow/Utility/Custom-Node.mdx @@ -0,0 +1,226 @@ + +**Category:** Utility +**Type:** Custom Code Execution + +--- + +## Overview + +The **Custom Node** allows you to create and run your own custom logic inside a workflow. +It’s designed for advanced users who need to perform specialized operations that are not covered by existing nodes — such as data manipulation, transformation, or custom API calls. + +By writing a short function in a supported programming language, you can fully customize how this node behaves and what kind of output it produces. + +--- + +## Description + +The **Custom Node** gives developers the freedom to write and execute custom code directly within a workflow. +This is especially useful when you want to: + +* Process data in a unique or complex way. +* Connect to APIs not natively supported. +* Apply custom business logic or transformations. +* Extend the workflow’s functionality without external services. + +When configured, the node runs your provided code using the selected language (such as JavaScript or Python) and returns the results to downstream nodes. +This flexibility makes it a powerful tool for building advanced automations and integrations. + +--- + +## Input Parameters + +The **Custom Node** accepts parameters that define the programming language and code you want to execute. + +* **language** + Defines which programming language to use for your custom function. + Supported languages include: + + * `"javascript"` – Run code using Node.js environment. + * `"python"` – Execute Python code for logic or data processing. + Example: + + ```json + "language": "javascript" + ``` + +* **functionCode** + The actual code that the node will execute. This should be written as a function that processes inputs and returns results. + Example: + + ```javascript + function run(input) { + const output = input.value * 2; + return { result: output }; + } + ``` + +**Notes:** + +* Always ensure that your code is self-contained and does not depend on unavailable external modules. +* Inputs from previous nodes can be accessed using standard variable syntax like: + + ``` + {{previousNode.output.value}} + ``` +* Outputs from this node can be passed to other nodes using variable references like: + + ``` + {{customNode.output.result}} + ``` + +--- + +## Output Parameters + +This node does **not have fixed output parameters**. +Instead, outputs depend entirely on what your custom function returns. + +**Typical Output Examples:** + +* You can return a JSON object, a text string, or even arrays — for example: + + ```json + { "result": "Processed successfully" } + ``` +* These returned fields will automatically become available as outputs for downstream nodes. + +**Accessing Outputs:** +Use variable references in the workflow, such as: + +``` +{{customNode.output.result}} +{{customNode.output.status}} +``` + +--- + +## Output Type + +**Output Type:** Dynamic +The output type depends on the return value of the custom function. +It may be text, JSON, or a structured object depending on your implementation. + +--- + +## Example Usage + +### Example 1: Basic Calculation in JavaScript + +```json +{ + "language": "javascript", + "functionCode": "function run(input) { return { result: input.value * 2 }; }" +} +``` + +**Expected Output:** + +```json +{ + "result": 10 +} +``` + +*(If input value was 5)* + +--- + +### Example 2: String Manipulation in Python + +```json +{ + "language": "python", + "functionCode": "def run(input):\n return { 'message': input['text'].upper() }" +} +``` + +**Expected Output:** + +```json +{ + "message": "HELLO WORLD" +} +``` + +*(If input text was “hello world”)* + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Custom Node** + Drag and drop the **Custom Node** into your workflow from the Utilities category. + +2. **Select a Programming Language** + Choose your preferred language — for example, **JavaScript** or **Python**. + +3. **Write Your Custom Function** + Add your code logic inside the `functionCode` field. Make sure it returns an output in JSON format for easy downstream use. + +4. **Pass Inputs from Other Nodes** + You can reference data from previous nodes using variable syntax, such as: + + ``` + {{textGeneration.output.content}} + ``` + +5. **Connect to Downstream Nodes** + Link the node’s outputs to other workflow nodes. For example, send the result to a Slack message or a data storage node. + +6. **Test and Validate** + Run the workflow in test mode to ensure your custom logic works as intended. + +--- + +## Best Practices + +* Keep your function small and focused on one task. +* Always validate your input data before processing. +* Include error handling within your code to prevent workflow crashes. +* Return results in a consistent JSON structure for easy use in other nodes. +* Avoid long-running or infinite loops that could delay the workflow. +* Test your code thoroughly before deploying to production workflows. + +--- + +## Example Workflow Integration + +**Use Case:** Automatically transform AI-generated text before sending it via Slack. + +**Workflow Steps:** + +1. **Text Generation Node:** Produces a paragraph of AI-generated text. +2. **Custom Node:** Uses JavaScript to shorten or clean the generated text. +3. **Slack Message Node:** Sends the transformed text to a team channel. + +**Connection Example:** + +``` +{{textGeneration.output.content}} → {{customNode.input.text}} +{{customNode.output.cleanedText}} → {{slackMessage.input.message}} +``` + +This setup allows you to use custom logic to modify AI outputs before sending or storing them. + +--- + +## Common Errors + +* **"Missing language"** + **Cause:** The `language` field was left empty. + **Solution:** Specify a supported language like `"javascript"` or `"python"`. + +* **"Invalid function code"** + **Cause:** The provided code has syntax errors or missing return statements. + **Solution:** Verify the code syntax and ensure the function returns a JSON-compatible object. + +* **"Runtime error"** + **Cause:** The custom code failed during execution due to invalid input or logic. + **Solution:** Add try-catch or equivalent error handling in your function. + +* **"No output generated"** + **Cause:** The code executed but didn’t return any value. + **Solution:** Always return an object with at least one key-value pair. + + diff --git a/Workflow/Utility/Google-Maps.mdx b/Workflow/Utility/Google-Maps.mdx new file mode 100644 index 0000000..5e958c8 --- /dev/null +++ b/Workflow/Utility/Google-Maps.mdx @@ -0,0 +1,169 @@ +**Category:** Utility +**Type:** Integration + +--- + +## Overview + +The **Google Maps Node** allows your workflow to connect with Google Maps services and retrieve various location-based data or features. +This can include operations such as finding routes, geocoding addresses, fetching nearby places, or analyzing map data, depending on the selected option. + +It serves as a convenient bridge between your workflow and Google Maps functionalities without requiring direct API setup or code. + +--- + +## Description + +The **Google Maps Node** enables you to use features of Google Maps within your workflow. +You can select a specific function (like “get directions”, “find nearby places”, or “get distance”) through the `option` parameter. + +Once executed, this node interacts with Google Maps and returns structured results such as processing time, count, and a unique identifier for the request. +It’s ideal for automating tasks that involve location lookup, distance calculation, travel planning, or region-based analysis. + +--- + +## Input Parameters + +The **Google Maps Node** accepts the following input parameters: + +* **option** *(string, required)* + Defines which Google Maps feature or function you want to perform. + Examples: + + * `"geocode"` – Convert address to coordinates. + * `"reverse-geocode"` – Convert coordinates to an address. + * `"get-directions"` – Retrieve route details between two points. + * `"get-distance"` – Calculate travel distance and duration. + * `"nearby-search"` – Find nearby locations or landmarks. + +**Notes:** + +* The value must be one of the supported options available in the integration. +* The input must be clear and relevant to the desired operation (for example, “get-distance” requires location data). + +--- + +## Output Parameters + +The node returns key details about the operation, which help in identifying and processing the result. + +* **processingCount** *(number)* + The number of items or results processed in the Google Maps request. + +* **processingTime** *(string)* + The total time taken to complete the Google Maps operation, expressed in an ISO timestamp or duration format. + +* **processingId** *(string)* + A unique identifier assigned to this specific Google Maps request, useful for debugging or tracking. + +--- + +## Output Type + +**Output Type:** Text (Structured JSON Result) + +The output of this node is returned as structured text in JSON format, which may include location details, travel times, or place information depending on the `option` used. +Downstream nodes can access these outputs using variables like: + +``` +{{googleMaps.output.processingCount}} +{{googleMaps.output.processingTime}} +{{googleMaps.output.processingId}} +``` + +--- + +## Example Usage + +### Example 1: Get Coordinates from an Address + +```json +{ + "option": "geocode" +} +``` + +**Expected Output:** + +```json +{ + "processingCount": 1, + "processingTime": "2025-10-27T11:22:00Z", + "processingId": "gmaps-req-98213" +} +``` + +--- + +### Example 2: Calculate Distance Between Two Points + +```json +{ + "option": "get-distance" +} +``` + +**Expected Output:** + +```json +{ + "processingCount": 1, + "processingTime": "2025-10-27T11:23:00Z", + "processingId": "gmaps-req-12478" +} +``` + +--- + +## How to Use in a No-Code Workflow + +1. **Add the Google Maps Node** + + * Drag and drop the **Google Maps Node** into your workflow under the “Utility” category. + +2. **Set the Option** + + * In the node settings, specify what you want Google Maps to do by entering a value in the `option` field (e.g., `"get-distance"`). + +3. **Provide Supporting Data** + + * If the selected option requires input (such as addresses or coordinates), use values from previous nodes to supply them. + +4. **Connect to Downstream Nodes** + + * Pass the extracted or computed map information to another node (for example, display distance results in an email or store them in a database). + +5. **Test the Workflow** + + * Run a test to verify that the Google Maps node executes correctly and returns the expected details. + +--- + +## Best Practices + +* Always double-check the `option` value to ensure it matches the operation you intend to perform. +* Combine this node with input nodes (like form submissions or database fetches) to dynamically provide location data. +* Use the returned `processingId` for troubleshooting or tracking multiple map-related requests. +* Ensure that your workflow has the necessary permissions or API access to interact with Google Maps services. +* Use descriptive naming conventions for map-related nodes (e.g., “Get Office Distance” or “Locate Delivery Area”). + +--- + +## Common Errors + +* **"Missing option"** + **Cause:** The `option` parameter was not provided. + **Solution:** Always specify a valid Google Maps function (e.g., `"geocode"`). + +* **"Invalid option value"** + **Cause:** The selected `option` is not supported. + **Solution:** Use one of the predefined supported values. + +* **"Request failed"** + **Cause:** The Google Maps API could not process the request due to invalid or missing data. + **Solution:** Verify that all required fields (like address or coordinates) are provided. + +* **"API connection error"** + **Cause:** Network or API authentication issues. + **Solution:** Check your API configuration or reconnect the Google Maps service. + diff --git a/Workflow/Utility/HTML-PDF.mdx b/Workflow/Utility/HTML-PDF.mdx new file mode 100644 index 0000000..282ec86 --- /dev/null +++ b/Workflow/Utility/HTML-PDF.mdx @@ -0,0 +1,145 @@ + +**Category:** File Conversion +**Type:** Output Node +**Overview:** +The **HTML to PDF Node** converts HTML content into a downloadable PDF file. It allows you to design and format professional-looking documents such as reports, invoices, articles, or certificates using HTML and CSS, and then automatically generate a PDF file. + +--- + +### Description + +The **HTML to PDF Node** is used to transform structured HTML content into a PDF document. You can either manually write your HTML using the built-in HTML editor or let the AI automatically generate a template for you. Once executed, the node returns a file URL to the generated PDF, which can be downloaded or used in subsequent workflow steps such as “Send Mail” or “Upload File”. + +--- + +### Input Parameters + +The node accepts the following inputs: + +* **HTML Template / HTML Content:** + The complete HTML structure you want to convert. This includes ``, ``, and `` tags along with embedded CSS for styling. + +* **PDF Size:** + The paper size for the PDF document (e.g., A4, Letter). The default and most commonly used is `A4`. + +* **AI Template Description (Optional):** + A natural language prompt that describes the kind of HTML template you want the AI to create. You can describe layout, colors, and content ideas, and the system will generate a ready-to-edit HTML structure. + +--- + +### Output Parameters + +After successful execution, the node returns: + +* **File URL:** + A secure URL where the generated PDF file is stored and can be accessed or downloaded. + +* **File ID:** + A unique identifier for the generated PDF file within the system. + +* **PDF Size:** + The paper size used for generating the PDF. + +* **Generated Timestamp:** + The exact date and time when the PDF was created. + +--- + +### Output Type + +The node outputs a **file object**, which includes both metadata and a downloadable link to the generated PDF file. This file can be referenced or passed into other nodes such as email or storage nodes. + +--- + +### Example Usage + +**Example 1: Simple Article Conversion** + +**Input:** + +```json +{ + "htmlContent": "

My First PDF

This PDF was generated from HTML.

", + "pdfSize": "A4" +} +``` + +**Output:** + +```json +{ + "fileUrl": "https://example-storage.com/pdfs/my-first-pdf.pdf", + "fileId": "12345-abcde", + "pdfSize": "A4", + "generatedAt": "2025-10-29T11:30:43.241Z" +} +``` + +**Example 2: Styled Template Conversion** + +**Input:** + +```json +{ + "htmlContent": "

The Importance of Time Management

Time management helps improve productivity and reduce stress.

", + "pdfSize": "A4" +} +``` + +**Output:** + +```json +{ + "fileUrl": "https://worqhat-harshada.s3.ap-southeast-2.amazonaws.com/pdfs/1761737440503-mmfj1s.pdf", + "fileId": "8ecc2a09-4e6a-47bf-9d3a-27606041e007", + "pdfSize": "A4", + "generatedAt": "2025-10-29T11:30:43.241Z" +} +``` + +--- + +### How to Use in a No-Code Workflow + +1. **Add the “HTML to PDF” node** to your workflow. +2. In **Node Settings**, write or paste your HTML code in the editor. + + * You can use text, images, CSS styling, and variables. +3. Choose the **PDF Size** (e.g., A4 or Letter). +4. Optionally, describe the desired layout and click **“Generate Template”** to let AI design the HTML automatically. +5. Click **Save Changes**. +6. Connect the output of this node to a node like **Send Mail** or **Return Response** to share or view the PDF. + +--- + +### Best Practices + +* Keep your HTML simple and properly structured to ensure accurate rendering. +* Use inline CSS or internal `