I’m building an Integration with the monday Apps Framework and deploying my webhook handler via mapps code:push into the monday-code serverless environment. My /monday/execute_action function does the following on each status-change event:
Creates a new item on a target board
Copies over connected-board column relations
Fetches & recreates subitems (including mapping their columns)
Intermittent “itemId not found” errors when creating subitems
Questions:
Can I safely enqueue jobs from within monday-code? For example, pushing payloads to AWS SQS / Redis-Bull and using another Lambda or container to process them with controlled concurrency (e.g. p-limit(5))—or is that discouraged?
Are there any pure-serverless patterns (monday-code + SQS event mappings, DynamoDB dedupe, etc.) that people have successfully used to avoid spinning up dedicated servers?
Token-refresh & dedupe: How do others handle OAuth token expiry in a long-running job queue, and persist de-duplication state across many parallel executions?
The monday code queue is a built-in message queue system based on a simple publish-subscribe (pub/sub) model, available for apps hosted on monday code. Each minor and major app version has its own queue.
Key features:
Publishing messages: Use the JavaScript SDK to publish messages to the queue. Messages are sent as POST requests to your app’s /mndy-queue endpoint.
import { Queue } from "@mondaycom/apps-sdk";
const queue = new Queue();
const messageContent = JSON.stringify({ content: "This is a message" });
const messageId = await queue.publishMessage(messageContent);
Receiving messages: Your app should listen for POST requests at /mndy-queue. When a message is received, process it and respond with HTTP 200 within 10 minutes. If not, monday code will retry up to 9 more times.
Security: Each message includes a random secret in the query parameters. Use validateMessageSecret to ensure the message is authentic.
const queryParams = req.query;
if (!queue.validateMessageSecret(queryParams.secret)) {
logger.info("Queue message received is not valid, since secret does not match. This message could come from an attacker.");
throw new Error('not allowed');
}
Retries: If your endpoint does not respond with HTTP 200 within 10 minutes, the message will be retried up to 10 times before being dropped.
For more details and code samples, see the official documentation: Queue SDK.
Is there a way for the queue to provide a way to control the queue’s concurrency or rate? Once tasks enter the queue, they seem to execute simultaneously, leading to complexity issues. Is there a mechanism to regulate execution flow?"