Skip to main content

5 posts tagged with "workers"

View All Tags

Introducing Wait for Workers - Workflow Synchronization Made Easy

· 3 min read
ApudFlow OS
Platform Updates

Workflow synchronization just got a whole lot easier with our new Wait for Workers worker! This powerful addition to the ApudFlow platform allows you to coordinate parallel workflow branches and ensure operations run in the correct order.

What is Wait for Workers?

The Wait for Workers worker monitors the execution status of other workers in your workflow and waits until all specified workers have completed their tasks. It's perfect for scenarios where you need to:

  • Synchronize parallel data processing branches
  • Wait for multiple API calls to complete
  • Coordinate dependent operations
  • Ensure data availability before proceeding

How It Works

Simply connect workers to your Wait for Workers node, and it will automatically detect and monitor all connected workers. No manual configuration needed!

Manual Mode

For advanced use cases, you can manually specify worker IDs to wait for specific workers that may not be directly connected.

Key Features

  • Automatic Detection: Intelligently detects connected workers from workflow topology
  • Real-time Monitoring: Periodically checks worker status in the database
  • Timeout Protection: Configurable timeout to prevent infinite waiting
  • Error Handling: Optional failure on any worker error
  • Parallel Coordination: Perfect for synchronizing multiple parallel branches

Configuration Parameters

ParameterTypeDefaultDescription
worker_idsarray[]Worker IDs to wait for (leave empty for auto-detection)
check_intervalnumber1.0Seconds between status checks
timeoutnumber300.0Maximum wait time in seconds (0 = no limit)
fail_on_errorbooleanfalseFail immediately if any worker encounters an error

Return Values

The worker returns a comprehensive status report:

{
"completed": ["worker_id_1", "worker_id_2"],
"failed": [],
"timeout": false,
"total_waited": 2.5,
"auto_detected": true
}

Example Use Case

Imagine you have a workflow that:

  1. Fetches stock data from Yahoo Finance
  2. Simultaneously processes the data with an LLM for analysis
  3. Needs both results before generating a final report

With Wait for Workers, you can ensure the final report generation waits for both the data fetch AND the LLM analysis to complete.

Getting Started

  1. Add a "Wait for Workers" node to your workflow
  2. Connect your parallel workers to the wait node
  3. Configure timeout and error handling preferences
  4. Connect the wait node to your downstream processing

The worker will automatically detect and wait for all connected workers to complete!

Watch the Tutorial

For a visual guide on how to use the Wait for Workers worker, check out our tutorial video:

How to Use Wait for Workers

This new worker significantly simplifies workflow coordination and makes building complex, parallel processing pipelines much more intuitive. Try it out in your next workflow!

Send Telegram notifications from Apudflow

· 5 min read

You can send messages and images to Telegram directly from your flows. This guide covers setup, formatting, and common pitfalls.

What you can send

  • Text messages
  • Image by URL (photoUrl): text becomes the photo caption
  • Markdown formatting (always on)

Configure the worker

In your flow, add the step “Telegram Notify” and fill these fields:

  • Chat ID: The numeric ID you got from the bot (see the Get Chat ID post) or @channel_username for public channels
  • Text: Message content (or caption when photoUrl is provided)
  • Photo URL (optional): A direct URL to an image
  • Disable link preview: Turn off webpage previews in text messages

Quick example

Result: You’ll receive a photo with the text as its caption.

Financial market use cases and templates

Here are practical ways to use Telegram alerts for trading and portfolio workflows, plus ready-to-copy message ideas.

  • Moving average crossovers

    • Template: ALERT: {TICKER} crossed above 200D MA at ${price} (RVOL {rvol}x)
    • Example: "ALERT: NVDA crossed above 200D MA at $142.50 (RVOL 1.8x)"
  • Breakout signals

    • Template: Breakout: {TICKER} closed above {level} on {tf} with {rvol}x RVOL
    • Example: "Breakout: AAPL closed above $225 on 4H with 2.1x RVOL"
  • RSI divergence signals

    • Template: Signal: {TICKER} RSI {rsi} ({side}) on {tf}; MACD {macd_state}
    • Example: "Signal: NVDA RSI 72 (overbought) on 1H; MACD bullish"
  • Bollinger Band squeeze/expansion

    • Template: BB Squeeze: {TICKER} bandwidth {bw}% — watch for expansion
    • Example: "BB Squeeze: ETH bandwidth 4.2% — watch for expansion"
  • Volume spikes / Relative Volume

    • Template: RVOL spike: {TICKER} {rvol}x vs 20D avg; {volume} shares traded
    • Example: "RVOL spike: AMD 2.7x vs 20D avg; 38M shares traded"
  • Earnings and macro calendar

    • Template: Today: {TICKER} earnings {time} — Cons: Rev {rev_c}, EPS {eps_c}
    • Example: "Today: MSFT earnings 21:30 CET — Cons: Rev $64.5B, EPS $2.71"
  • Portfolio and risk alerts

    • Template: PnL: D {pnl_d}% | MTD {pnl_mtd}% | DD {dd}% | VaR {var}%
    • Example: "PnL: D -1.2% | MTD +3.4% | DD 5.4% | VaR 1.1%"
  • Stop-loss / Take-profit hits

    • Template: Exit: {TICKER} {side} at ${price} — {reason} (SL/TP)
    • Example: "Exit: TSLA long at $239.50 — SL hit"
  • Unusual options activity / IV changes

    • Template: UOA: {TICKER} {flow} — IVR {ivr}, IV {iv}%
    • Example: "UOA: SPY call flow — IVR 78, IV 23%"
  • FX levels and macro indicators

    • Template: FX: {PAIR} tap {level} | {indicator} {value}
    • Example: "FX: EURUSD tap 1.1000 | PMI 52.3"
  • Crypto funding/liquidations/on-chain

    • Template: Crypto: {COIN} funding {funding}% | Liq {liq_usd} | NVT {nvt}
    • Example: "Crypto: BTC funding 0.03% | Liq $120M | NVT 48"
  • Spread/arb setups

    • Template: Spread: {A}/{B} z-score {z} | {tf}
    • Example: "Spread: GLD/GDX z-score 2.1 | D1"
  • End-of-day summary

    • Template: EoD: Top± {top_plus}/{top_minus} | PnL {pnl_d}% | Positions {n}
    • Example: "EoD: Top± NVDA +4.1% / T -3.7% | PnL +0.9% | Positions 12"- Breakouts and S/R touches
    • Template: Breakout: {TICKER} closed above {level} on {tf} with {rvol}x RVOL
    • Example: "Breakout: BTC closed above 65,000 on 4H with 3.1x RVOL"
  • RSI/MACD signals and divergences

    • Template: Signal: {TICKER} RSI {rsi} ({side}) on {tf}; MACD {macd_state}
    • Example: "Signal: NVDA RSI 72 (overbought) on 1H; MACD bullish"
  • Bollinger Band squeeze/expansion

    • Template: BB Squeeze: {TICKER} bandwidth {bw}% — watch for expansion
    • Example: "BB Squeeze: ETH bandwidth 4.2% — watch for expansion"
  • Volume spikes / Relative Volume

    • Template: RVOL spike: {TICKER} {rvol}x vs 20D avg; {volume} shares traded
    • Example: "RVOL spike: AMD 2.7x vs 20D avg; 38M shares traded"
  • Earnings and macro calendar

    • Template: Today: {TICKER} earnings {time} — Cons: Rev {rev_c}, EPS {eps_c}
    • Example: "Today: MSFT earnings 21:30 CET — Cons: Rev $64.5B, EPS $2.71"
  • Portfolio and risk alerts

    • Template: PnL: D {pnl_d}% | MTD {pnl_mtd}% | DD {dd}% | VaR {var}%
    • Example: "PnL: D -1.2% | MTD +3.4% | DD 5.4% | VaR 1.1%"
  • Stop-loss / Take-profit hits

    • Template: Exit: {TICKER} {side} at ${price} — {reason} (SL/TP)
    • Example: "Exit: TSLA long at $239.50 — SL hit"
  • Unusual options activity / IV changes

    • Template: UOA: {TICKER} {flow} — IVR {ivr}, IV {iv}%
    • Example: "UOA: SPY call flow — IVR 78, IV 23%"
  • FX levels and macro indicators

    • Template: FX: {PAIR} tap {level} | {indicator} {value}
    • Example: "FX: EURUSD tap 1.1000 | PMI 52.3"
  • Crypto funding/liquidations/on-chain

    • Template: Crypto: {COIN} funding {funding}% | Liq {liq_usd} | NVT {nvt}
    • Example: "Crypto: BTC funding 0.03% | Liq $120M | NVT 48"
  • Spread/arb setups

    • Template: Spread: {A}/{B} z-score {z} | {tf}
    • Example: "Spread: GLD/GDX z-score 2.1 | D1"
  • End-of-day summary

    • Template: EoD: Top± {top_plus}/{top_minus} | PnL {pnl_d}% | Positions {n}
    • Example: "EoD: Top± NVDA +4.1% / T -3.7% | PnL +0.9% | Positions 12"Tip: Attach a chart image with photoUrl for context (e.g., a MultiChart snapshot). Your text becomes the caption.

Pro tips

  • Store your Chat ID once and reuse it across flows.
  • For groups: Chat ID is negative. If you migrate the group or channel, the ID can change — run /id again.
  • You can send a quick heartbeat by wiring a scheduled flow that posts "ping" to your own DM.

Happy notifying!

Sharing Custom Workers

· One min read
ApudFlow OS
Platform Updates

Custom workers can now be published with versioned moderation and optional monetization.

What to include:

  • Clear description.
  • Input/Output summary.
  • Changelog for updates.

Docs: Workers → Sharing Custom Workers.

Unified Worker Previews

· One min read
ApudFlow OS
Platform Updates

Data, Results, and Errors previews now share a unified layout across all worker types.

Improvements:

  • Faster switching between preview modes.
  • Clearer error context.
  • Consistent empty state messaging.

Docs: Workers → Data / Results / Errors Preview.

AI-Assisted Worker Generation

· One min read
ApudFlow OS
Platform Updates

You can now generate custom worker logic with an integrated AI assist.

Describe the transformation you need, review generated code, and validate via Data Preview. Iterate quickly without leaving the editor.

See docs: Workers → Using AI to Generate Worker Code.