Skip to content

RapidBridge V4 Cookbook: 10 Pipedream Workflows Rebuilt as Truto Sync Jobs

Ten common customer-facing Pipedream workflows, rebuilt as RapidBridge V4 sync jobs and Truto workflows. Each recipe has the job JSON, the trigger and what to check before you move customers.

Uday Gajavalli Uday Gajavalli · · 27 min read
RapidBridge V4 Cookbook: 10 Pipedream Workflows Rebuilt as Truto Sync Jobs

The short answer. Most customer-facing Pipedream workflows are "on a schedule or an event, read the customer's app, reshape the data, send it somewhere". A RapidBridge V4 sync job does that job as one JSON file that runs once per customer account. A Truto workflow starts it when the customer connects, or when the customer's app sends a webhook. This cookbook gives ten of those workflows as ready-to-adapt jobs.

Pipedream Workflows shuts down on March 31, 2027, and Pipedream deletes Workflows data, connected-account tokens included, by April 30, 2027. The Pipedream Workflows migration guide covers the whole move: which accounts can come across without a reconnect, the order of steps and the cost. This post is the companion. The cookbook covers only the rebuild of the workflow logic.

How do you use these RapidBridge V4 recipes?

Each recipe rebuilds one customer-facing Pipedream workflow as a Truto RapidBridge V4 sync job. You create the job once with POST /sync-job. A Truto workflow or a schedule then starts it once per customer account. Each recipe names the mappings we checked and lists what to test before you move a real customer.

Each recipe has four parts:

  1. Replaces: the Pipedream workflow it stands in for.
  2. The job: the body for POST /sync-job, or truto sync-jobs create --stdin < job.json.
  3. The trigger: a Truto workflow body for POST /workflow, or a schedule body for POST /sync-job-cron-trigger.
  4. What to check: the things to test before you move a real customer.

Every job uses node and field names from the V4 sync job reference. Every request uses a unified model and resource that exists in Truto today. Each recipe names the integrations whose mappings we read. A recipe can work for other integrations in the same category, but check the filters in each mapping first. Run truto unified-model-mappings list --integration-name <name> --resource-name <resource> --method-name list -o yaml to see them.

Replace the values in angle brackets, such as <webhook_id>, with your own IDs.

What do you set up before the first recipe?

Set up three things once per Truto environment. You need a webhook, a datastore and the integrations:

  • A webhook for the recipes that send to your backend. Subscribe it to sync_job_run:record, or to all. A webhook that does not subscribe gets nothing, and the run does not say so.
  • A datastore for the recipes that write to S3, Postgres, BigQuery, Snowflake or Pinecone. Create it under Datastores, then run Send test method on it before a job writes there. See the Truto datastores guide.
  • The integrations, installed with your own OAuth apps, as in step 3 of the Pipedream Workflows migration guide. Truto can also import accounts that use an API key, basic auth or client credentials, as the guide's account import section shows.

Which RapidBridge V4 part replaces each Pipedream part?

A Pipedream workflow per customer becomes one RapidBridge V4 sync job that runs once per customer account. Schedule triggers become Truto schedules. App event sources become Truto workflows on unified webhooks, or polling jobs. Code steps become JSONata transforms, and data store checkpoints become state nodes. Approvals, long sleeps and arbitrary code have no V4 equivalent.

Pipedream RapidBridge V4 or Truto
One workflow per customer One sync job. Each run takes the account in args.integrated_account_id
Schedule trigger A schedule: a UTC cron expression, at most every five minutes
App event source A Truto workflow on unified_webhook:batch, or a polling job with a watermark
"New connected account" logic in your backend A Truto workflow on integrated_account:active
Action step that calls an app A request node on the Unified or Proxy API
Node.js or Python step that reshapes data A transform node with a JSONata expression
Checkpoint in a data store get_state and update_state under the job's state_key
HTTP request to your backend A destination node with destination_type: "webhook"
Upload to S3 or insert into a warehouse A destination node with destination_type: "datastore"
$.flow.exit() or an if step run_if on a node, a workflow or a workflow step
Concurrency of 1 per workflow mutex_key on the job

Keep approvals, long sleeps and arbitrary code in your backend. Move your team's internal automations to a workflow tool, such as Elaichi, from the same team as Truto.

Which rules apply to every V4 recipe?

Seven rules apply to every recipe in this cookbook. A failed request still completes the run and moves the watermark. The watermark overlaps, so upsert by ID. Schedules fire at an offset, state expires after about 30 days unused, and a reconnect can add a second schedule. Use full timestamps and a unique state key.

Each "what to check" list assumes these rules:

  • A failed request still completes the run. The run sends sync_job_run:record_error and carries on. The complete event then moves the watermark past the records that request missed. Watch for sync_job_run:record_error on your webhook, and reset the watermark on the job's Run State tab when one appears.
  • The watermark overlaps by design. The recipes filter with updated_at and gte, from the start time of the last completed run. A record can arrive in two runs. Upsert by id in your backend or table.
  • Schedules have an offset. A schedule fires at a fixed point inside its interval. An hourly or daily schedule can fire up to an hour after the time in its cron expression.
  • State expires after about 30 days unused. A job that runs less often starts again from start_date. Every recipe here runs daily or more often.
  • A reconnect fires integrated_account:active again. A workflow step with a cron_expression then creates a second schedule for the same account. The mutex_key stops two runs at the same time, but the account now runs twice as often. Delete the extra schedule on the job's Schedules tab, or create schedules from your own backend instead.
  • Use full ISO 8601 timestamps for start_date, such as 2026-01-01T00:00:00Z. Some providers reject a date with no time in a date-time filter.
  • Give each job its own state_key prefix. The state store belongs to the environment, not the job. Two jobs whose state_key is the bare account ID share one watermark.

1. How do you sync changed CRM contacts to your webhook?

Use one V4 sync job that lists CRM contacts changed since the last run and sends a slim copy to your webhook. A get_state node keeps the watermark between runs. A Truto workflow gives each new HubSpot or Salesforce account a 15-minute schedule when the customer connects.

Replaces: a Pipedream workflow per customer that polls HubSpot or Salesforce for new or updated contacts and posts each batch to your API.

Mappings checked: HubSpot and Salesforce crm/contacts list, with updated_at and gte. HubSpot turns the filter into a search on lastmodifieddate.

The job below reads the watermark, lists changed contacts, keeps five fields and sends each batch to your webhook:

{
  "label": "CRM contacts changed since the last run, to a webhook",
  "default_runtime_version": 4,
  "integration_name": "",
  "state_key": "crm-contacts:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "webhook_id": { "type": "string", "format": "webhook_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': resources.`get-last-synced-at`.value }" }
    },
    {
      "type": "request",
      "name": "list-contacts",
      "resource": "crm/contacts",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "updated_at": { "gte": "{{last_synced_at}}" } }
    },
    {
      "type": "transform",
      "name": "slim-contacts",
      "depends_on": "list-contacts",
      "config": {
        "expression": "resources.crm.contacts.{ 'id': id, 'first_name': first_name, 'last_name': last_name, 'email': email_addresses[0].email, 'updated_at': updated_at }"
      }
    },
    {
      "name": "send-to-webhook",
      "type": "destination",
      "destination_type": "webhook",
      "config": { "id": "{{args.webhook_id}}" },
      "resources_to_persist": ["slim-contacts"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: a workflow that gives each new HubSpot or Salesforce account a 15-minute schedule. The step's config is a JSONata string, so integrated_account_id and $now() are read when the account connects.

{
  "trigger_name": "integrated_account:active",
  "config": {
    "run_if": "integration.name in ['hubspot', 'salesforce']",
    "steps": [
      {
        "type": "run",
        "action": "run_sync_job",
        "cron_expression": "*/15 * * * *",
        "config": "{ 'sync_job_id': '<sync_job_id>', 'args': { 'integrated_account_id': integrated_account_id, 'webhook_id': '<webhook_id>', 'start_date': $now() } }"
      }
    ]
  }
}

What to check:

  • Each batch arrives as a sync_job_run:record event with the contacts in payload.records. Upsert by id.
  • start_date is the connect time, so the first run sends only contacts changed after the customer connected. For a backfill, pass an earlier date.
  • To keep more fields, add them to the transform. The full unified contact also has phone_numbers, title, owner, custom_fields and more.

2. How do you copy Salesforce opportunities to S3 as JSON Lines?

Use a V4 sync job that lists Salesforce opportunities changed since the last run. The job uploads each page as a JSON Lines file to your S3 datastore. A transform builds the file name and content. For an account you imported from Pipedream, create an hourly schedule that starts from the Pipedream checkpoint.

Replaces: a scheduled Pipedream workflow that queries changed Salesforce opportunities with SOQL and uploads a file to your S3 bucket.

Mapping checked: Salesforce crm/opportunities list. The mapping turns updated_at into a SOQL WHERE clause.

The job below lists changed opportunities, turns each page into one JSON Lines file and uploads it with uploadObject:

{
  "label": "Salesforce opportunities changed since the last run, to S3 as JSON Lines",
  "default_runtime_version": 4,
  "integration_name": "salesforce",
  "state_key": "sf-opportunities-s3:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "s3_datastore_id": { "type": "string", "format": "datastore_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': resources.`get-last-synced-at`.value }" }
    },
    {
      "type": "request",
      "name": "list-opportunities",
      "resource": "crm/opportunities",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "updated_at": { "gte": "{{last_synced_at}}" } }
    },
    {
      "type": "transform",
      "name": "opportunities-to-jsonl",
      "depends_on": "list-opportunities",
      "config": {
        "expression": "{ 'file_name': 'opportunities-' & $string($uuid()) & '.jsonl', 'content': $join(resources.crm.opportunities.$string($), '\\n') }"
      }
    },
    {
      "name": "upload-to-s3",
      "type": "destination",
      "destination_type": "datastore",
      "method": "uploadObject",
      "config": {
        "id": "{{args.s3_datastore_id}}",
        "config": {
          "path": "salesforce/opportunities/{{args.integrated_account_id}}",
          "file_name": "{{payload.records.0.file_name}}",
          "content": "{{payload.records.0.content}}",
          "headers": { "Content-Type": "application/x-ndjson" }
        }
      },
      "resources_to_persist": ["opportunities-to-jsonl"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: for an account you imported from Pipedream, create its schedule directly. Start it from the checkpoint your Pipedream data store kept, so the first run picks up where Pipedream stopped.

{
  "sync_job_id": "<sync_job_id>",
  "cron_expression": "0 * * * *",
  "args": {
    "integrated_account_id": "<integrated_account_id>",
    "s3_datastore_id": "<s3_datastore_id>",
    "start_date": "<checkpoint from your Pipedream data store, as an ISO 8601 timestamp>"
  }
}

Send it to POST /sync-job-cron-trigger. For customers who connect later, use a workflow as in recipe 1.

What to check:

  • Each page of opportunities becomes one file under salesforce/opportunities/<account>/. A busy hour gives several files.
  • For a columnar format, build the content with $jsonToParquet(...) instead. Then pass "content": "{{payload.records.0.parquet:any}}" and set Content-Type to application/vnd.apache.parquet, as Truto's shipped Salesforce-to-S3 template does.
  • Run Send test method with uploadObject on the datastore first. A failed upload sends sync_job_run:record_error, and the run goes on.

3. How do you backfill Zendesk tickets on connect, then poll every 30 minutes?

Use one V4 sync job for Zendesk tickets and one Truto workflow with two steps. When a customer connects Zendesk, the first step starts a run that reads one year of tickets. The second step creates a 30-minute schedule. The shared watermark lets the schedule carry on where the backfill stopped.

Replaces: the code in your backend that runs when a customer connects Zendesk through Pipedream Connect. That code starts a one-off backfill workflow, then turns on a polling workflow for the customer.

Mapping checked: Zendesk ticketing/tickets list. The mapping sends the list through Zendesk's search export, and turns updated_at with gte into updated>=.

The job below lists tickets changed since the watermark, with the requester's details, and sends a slim copy to your webhook:

{
  "label": "Zendesk tickets changed since the last run, to a webhook",
  "default_runtime_version": 4,
  "integration_name": "zendesk",
  "state_key": "zendesk-tickets:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "webhook_id": { "type": "string", "format": "webhook_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': resources.`get-last-synced-at`.value }" }
    },
    {
      "type": "request",
      "name": "list-tickets",
      "resource": "ticketing/tickets",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "updated_at": { "gte": "{{last_synced_at}}" }, "include": ["users"] }
    },
    {
      "type": "transform",
      "name": "slim-tickets",
      "depends_on": "list-tickets",
      "config": {
        "expression": "resources.ticketing.tickets.{ 'id': id, 'subject': name, 'status': status.name, 'priority': priority.name, 'requester_email': contact.emails[0].email, 'url': ticket_url, 'updated_at': updated_at }"
      }
    },
    {
      "name": "send-to-webhook",
      "type": "destination",
      "destination_type": "webhook",
      "config": { "id": "{{args.webhook_id}}" },
      "resources_to_persist": ["slim-tickets"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: one workflow with two steps. The first step starts a run now, from one year back. The second step creates the 30-minute schedule with the same args. Once the backfill completes, the watermark moves to its start time, and the schedule carries on from there.

{
  "trigger_name": "integrated_account:active",
  "config": {
    "run_if": "integration.name = 'zendesk'",
    "steps": [
      {
        "type": "run",
        "action": "run_sync_job",
        "config": "{ 'sync_job_id': '<sync_job_id>', 'args': { 'integrated_account_id': integrated_account_id, 'webhook_id': '<webhook_id>', 'start_date': $fromMillis($millis() - 31536000000) } }"
      },
      {
        "type": "run",
        "action": "run_sync_job",
        "cron_expression": "*/30 * * * *",
        "config": "{ 'sync_job_id': '<sync_job_id>', 'args': { 'integrated_account_id': integrated_account_id, 'webhook_id': '<webhook_id>', 'start_date': $fromMillis($millis() - 31536000000) } }"
      }
    ]
  }
}

What to check:

  • "include": ["users"] makes the mapping fill contact with the requester's details. Without it, contact holds only an ID, and requester_email is empty.
  • While the backfill runs, the mutex_key makes the schedule skip its turn. Truto sends sync_job_cron_trigger:failed for each skip. That is expected.
  • Truto retries a failed workflow run, and the retry runs both steps again. A retry can start a second backfill and create a second schedule. Check the job's Schedules tab after a failed workflow run.
  • The Zendesk polling example in the migration guide is a shorter version of this job for Zendesk and Freshdesk, with no backfill.

4. How do you upsert Jira issues into your Postgres database?

Use a V4 sync job that lists Jira issues changed since the last run. The job maps each issue to a table row and calls upsertRows on your Postgres datastore. The primary key holds the account and the issue ID. A Truto workflow gives each Jira account a 10-minute schedule.

Replaces: a Pipedream workflow that polls Jira with JQL every few minutes and upserts each issue into your database with a Postgres action step.

Mapping checked: Jira ticketing/tickets list. The mapping turns updated_at with gte into a JQL updated >= clause with a date and no time. Jira reads that date in the Jira user's time zone.

Create the table first. The primary key holds the account and the issue ID, so issues from different customers never collide:

CREATE TABLE jira_issues (
  integrated_account_id text NOT NULL,
  id text NOT NULL,
  title text,
  status text,
  priority text,
  assignee text,
  url text,
  updated_at timestamptz,
  PRIMARY KEY (integrated_account_id, id)
);

The job below moves the watermark one day back, lists changed issues and upserts them into jira_issues:

{
  "label": "Jira issues changed since the last run, upserted into Postgres",
  "default_runtime_version": 4,
  "integration_name": "jira",
  "state_key": "jira-issues-postgres:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "postgres_datastore_id": { "type": "string", "format": "datastore_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': $fromMillis($toMillis(resources.`get-last-synced-at`.value) - 86400000) }" }
    },
    {
      "type": "request",
      "name": "list-issues",
      "resource": "ticketing/tickets",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "updated_at": { "gte": "{{last_synced_at}}" } }
    },
    {
      "type": "transform",
      "name": "issues-to-rows",
      "depends_on": "list-issues",
      "config": {
        "expression": "( $account := args.integrated_account_id; resources.ticketing.tickets.{ 'integrated_account_id': $account, 'id': id, 'title': name, 'status': status.name, 'priority': priority.name, 'assignee': assignees[0].name, 'url': ticket_url, 'updated_at': updated_at } )"
      }
    },
    {
      "name": "upsert-into-postgres",
      "type": "destination",
      "destination_type": "datastore",
      "method": "upsertRows",
      "config": {
        "id": "{{args.postgres_datastore_id}}",
        "config": {
          "table": "jira_issues",
          "rows": "{{payload.records:any}}",
          "conflict_columns": ["integrated_account_id", "id"]
        }
      },
      "resources_to_persist": ["issues-to-rows"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: a workflow as in recipe 1, with "run_if": "integration.name = 'jira'", "cron_expression": "*/10 * * * *" and 'postgres_datastore_id': '<postgres_datastore_id>' in the args.

What to check:

  • {{payload.records:any}} passes the batch as an array. Without :any, the placeholder turns the rows into text.
  • The filter has day precision, so each run reads again every issue changed since the start of the day. The upsert makes that harmless: a second copy of an issue updates its row.
  • The add_context node moves the watermark one day back before the filter uses it. A Jira user in a time zone behind UTC then misses no issues changed late in their day.
  • Pass start_date as a full ISO 8601 timestamp. If $toMillis cannot read it, {{last_synced_at}} stays as literal text. The request then fails, but the run still completes and moves the watermark, with only a sync_job_run:record_error to show it.
  • Run Send test method with upsertRows and one sample row before the first run.
  • To also store comments, add a ticketing/comments request that depends on list-issues, with "loop_on": "resources.ticketing.tickets". Truto's shipped Jira template does this.

5. How do you post new Jira issues to the customer's Slack or Teams channel?

Use a Truto workflow on the unified_webhook:batch trigger and a one-request V4 sync job. When Jira sends new issues, the workflow builds one message and starts the job. The job posts the message to the chat channel saved on the customer's Jira account. Test this write on sandbox accounts first.

Replaces: a Pipedream workflow per customer with a Jira "new issue" source and a Slack "send message" action.

Mappings checked: Slack and Microsoft Teams instant-messaging/messages create. Jira is in Truto's list of integrations that send record:* events from vendor webhooks.

This recipe writes to the customer's chat app. Test it on a sandbox Slack workspace and a sandbox Jira site first. No sync job template that Truto ships writes to an app.

The customer has two integrated accounts: Jira, which sends the event, and Slack, which gets the message. The workflow sees only the Jira account and its context. When the customer picks a channel in your app, save two context variables on the Jira account. Use notify_integrated_account_id for the Slack account ID and notify_channel_id for the channel ID. See Truto's guide to context variables.

The job is one request with no depends_on, so it runs when the run starts:

{
  "label": "Post a message to a Slack channel",
  "default_runtime_version": 4,
  "integration_name": "",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "channel_id": { "type": "string", "required": true },
    "message": { "type": "string", "required": true }
  },
  "args_validation": "$exists(args.channel_id) and $exists(args.message) ? null : { 'message': 'channel_id and message are required' }",
  "resources": [
    {
      "type": "request",
      "name": "post-message",
      "resource": "instant-messaging/messages",
      "method": "create",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "body": {
        "channel": { "id": "{{args.channel_id}}" },
        "body": { "content": "{{args.message}}" }
      }
    }
  ]
}

Trigger: a workflow on unified_webhook:batch. Each item in payload.events has event_type (such as created), resource and records. The step builds one message from the new issues in the batch. It passes only their names and links, not the raw vendor payload:

{
  "trigger_name": "unified_webhook:batch",
  "config": {
    "run_if": "integration.name = 'jira' and $exists(context.notify_integrated_account_id) and $exists(context.notify_channel_id)",
    "steps": [
      {
        "type": "run",
        "action": "run_sync_job",
        "run_if": "$count(payload.events[event_type = 'created' and resource = 'ticketing/tickets']) > 0",
        "config": "( $issues := payload.events[event_type = 'created' and resource = 'ticketing/tickets'].records; { 'sync_job_id': '<sync_job_id>', 'args': { 'integrated_account_id': context.notify_integrated_account_id, 'channel_id': context.notify_channel_id, 'message': $join($issues.('New Jira issue: ' & name & ' ' & ticket_url), '\\n') } } )"
      }
    ]
  }
}

For Microsoft Teams, pass the team ID too, and mark the channel as a team channel. The request body becomes:

{
  "channel": { "id": "{{args.channel_id}}", "type": "channel" },
  "workspace": { "id": "{{args.team_id}}" },
  "body": { "content": "{{args.message}}" }
}

What to check:

  • Jira must send its webhooks to Truto. Truto's guide to receiving vendor webhooks says which URL to use and where to register it.
  • On a per-account webhook URL, Truto passes events on in batches: when 10 events wait, or 10 seconds after the last one. A busy project gives one message with several issues.
  • The Slack app must be a member of the channel, or Slack refuses the post. The run sends sync_job_run:record_error.
  • The workflow does not check that the context variables point to a live Slack account. Clear them when the customer disconnects Slack.
  • The migration guide's worked example builds the same alert in your backend instead. Pick that version when you need logic that JSONata cannot express.

6. How do you send changed Google Drive files to your webhook?

Use a V4 sync job that lists Google Drive items changed since the last run, keeps only files, and sends their details to your webhook. The Drive mapping turns the updated_at filter into a modifiedTime query, so the job needs no folder walk. A Truto workflow gives each account a 15-minute schedule.

Replaces: a Pipedream workflow that watches a customer's Google Drive for new or changed files and sends the file details to your app for indexing.

Mapping checked: Google Drive file-storage/drive-items list. The mapping turns updated_at with gte into a Drive modifiedTime >= query. With no parent filter, the list covers the user's own files and the files shared with them, so the job needs no recurse. Shared drives need a drive filter.

The job below lists changed items, drops folders and sends each file's ID, name, type, size, parent, link and update time:

{
  "label": "Google Drive files changed since the last run, to a webhook",
  "default_runtime_version": 4,
  "integration_name": "googledrive",
  "state_key": "gdrive-files:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "webhook_id": { "type": "string", "format": "webhook_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': resources.`get-last-synced-at`.value }" }
    },
    {
      "type": "request",
      "name": "list-changed-items",
      "resource": "file-storage/drive-items",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "updated_at": { "gte": "{{last_synced_at}}" } }
    },
    {
      "type": "transform",
      "name": "files-only",
      "depends_on": "list-changed-items",
      "config": {
        "expression": "resources.`file-storage`.`drive-items`[type = 'file'].{ 'id': id, 'name': name, 'mime_type': mime_type, 'size': size, 'parent_id': parent.id, 'url': urls[type = 'self'].url, 'updated_at': updated_at }"
      }
    },
    {
      "name": "send-to-webhook",
      "type": "destination",
      "destination_type": "webhook",
      "config": { "id": "{{args.webhook_id}}" },
      "resources_to_persist": ["files-only"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: a workflow as in recipe 1, with "run_if": "integration.name = 'googledrive'" and "cron_expression": "*/15 * * * *".

What to check:

  • To read a shared drive, add "drive": { "id": "{{args.drive_id}}" } to the query. Without it, the mapping does not ask Drive for shared-drive items.
  • The transform drops folders. A page with only folders sends nothing.
  • A trashed file also counts as changed. Read the file with the Unified API before you index it, or filter on the fields you need.
  • To fetch only one folder tree, list with "query": { "parent": "{{args.folder_id}}" } and add recurse on has_children. The V4 request node reference shows how. Do not combine recurse with a list that has no parent filter, or each item comes back twice.
  • Google Drive is one of the File Storage integrations that can also push changes. Create a subscription with POST /unified/file-storage/webhook-subscriptions, then start this job from a unified_webhook:batch workflow instead of a schedule.

7. How do you load a nightly HRIS employee snapshot into BigQuery?

Use a V4 sync job with no state that lists every employee in the customer's HR system each night. A transform adds a snapshot date and the account ID to each row, and insertRows writes the rows to BigQuery. A Truto workflow gives each BambooHR, HiBob or Rippling account a daily schedule.

Replaces: a nightly Pipedream workflow that pulls every employee from the customer's HR system and inserts the rows into BigQuery.

Mappings checked: BambooHR, HiBob and Rippling hris/employees list. BambooHR maps an updated_at filter and HiBob does not. This recipe takes a full snapshot each night, which works the same for all three.

The job below lists all employees, turns each one into a row and inserts the rows into hris_employees:

{
  "label": "HRIS employees, full snapshot to BigQuery",
  "default_runtime_version": 4,
  "integration_name": "",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "bigquery_datastore_id": { "type": "string", "format": "datastore_id", "required": true }
  },
  "resources": [
    {
      "type": "request",
      "name": "list-employees",
      "resource": "hris/employees",
      "method": "list",
      "integrated_account_id": "{{args.integrated_account_id}}"
    },
    {
      "type": "transform",
      "name": "employees-to-rows",
      "depends_on": "list-employees",
      "config": {
        "expression": "( $account := args.integrated_account_id; $snapshot := $substring(sync_job_run.started_at.toISOString(), 0, 10); resources.hris.employees.{ 'snapshot_date': $snapshot, 'integrated_account_id': $account, 'id': id, 'first_name': first_name, 'last_name': last_name, 'work_email': (emails[is_primary = true].email)[0], 'job_title': employments[0].job_title, 'employment_status': employment_status, 'start_date': start_date, 'termination_date': termination_date, 'manager_id': manager.id } )"
      }
    },
    {
      "name": "insert-into-bigquery",
      "type": "destination",
      "destination_type": "datastore",
      "method": "insertRows",
      "config": {
        "id": "{{args.bigquery_datastore_id}}",
        "config": {
          "table": "hris_employees",
          "rows": "{{payload.records:any}}"
        }
      },
      "resources_to_persist": ["employees-to-rows"]
    }
  ]
}

Trigger: a workflow with "run_if": "integration.name in ['bamboohr', 'hibob', 'rippling']" and "cron_expression": "0 2 * * *". Pass 'bigquery_datastore_id': '<bigquery_datastore_id>' in the args. The job has no state, so it needs no start_date.

What to check:

  • The schedule fires once a day, between 02:00 and 03:00 UTC.
  • Each night adds a full copy of every employee, keyed by snapshot_date. Query the latest snapshot, or partition the table on snapshot_date.
  • The table needs a column for every key the transform writes. Run Send test method with insertRows and one sample row first.
  • The job title comes from the first item in employments. HiBob maps no employment_status, so that column stays empty for HiBob accounts.
  • Read the mapping before you add another HRIS to the run_if. Gusto's mapping, for example, also takes a company ID in the query.

8. How do you load QuickBooks or Xero invoices into Snowflake?

Use a V4 sync job that lists invoices changed since the last run. The job maps each invoice to a row and calls insertRows on your Snowflake datastore. The query passes invoice_type, so bills stay out. Rows land in a staging table, which you merge into your final table. A Truto workflow schedules each account daily.

Replaces: a daily Pipedream workflow that reads changed invoices from the customer's accounting app and loads them into Snowflake.

Mappings checked: QuickBooks and Xero accounting/invoices list. Both mappings turn updated_at into a filter on the provider's own last-updated field. Both take invoice_type: QuickBooks requires it, and Xero returns bills too without it.

The job below lists changed invoices, turns each one into an upper-case row and inserts the rows into INVOICES_STAGING:

{
  "label": "Accounting invoices changed since the last run, to Snowflake",
  "default_runtime_version": 4,
  "integration_name": "",
  "state_key": "invoices-snowflake:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "snowflake_datastore_id": { "type": "string", "format": "datastore_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': resources.`get-last-synced-at`.value }" }
    },
    {
      "type": "request",
      "name": "list-invoices",
      "resource": "accounting/invoices",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "invoice_type": "invoice", "updated_at": { "gte": "{{last_synced_at}}" } }
    },
    {
      "type": "transform",
      "name": "invoices-to-rows",
      "depends_on": "list-invoices",
      "config": {
        "expression": "( $account := args.integrated_account_id; resources.accounting.invoices.{ 'INTEGRATED_ACCOUNT_ID': $account, 'ID': id, 'NUMBER': number, 'CONTACT_ID': contact.id, 'STATUS': status, 'CURRENCY': currency, 'SUB_TOTAL': sub_total, 'TOTAL_TAX_AMOUNT': total_tax_amount, 'BALANCE': balance, 'ISSUE_DATE': issue_date, 'DUE_DATE': due_date, 'UPDATED_AT': updated_at } )"
      }
    },
    {
      "name": "insert-into-snowflake",
      "type": "destination",
      "destination_type": "datastore",
      "method": "insertRows",
      "config": {
        "id": "{{args.snowflake_datastore_id}}",
        "config": {
          "table": "INVOICES_STAGING",
          "rows": "{{payload.records:any}}"
        }
      },
      "resources_to_persist": ["invoices-to-rows"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: a workflow with "run_if": "integration.name in ['quickbooks', 'xero']" and "cron_expression": "0 6 * * *", with 'snowflake_datastore_id' and 'start_date' in the args.

What to check:

  • To load bills as well, run a second request with "invoice_type": "bill" and add a TYPE column.
  • insertRows appends. An invoice that changes twice gets two rows in INVOICES_STAGING. Merge the staging table into your final table on INTEGRATED_ACCOUNT_ID and ID.
  • The transform writes upper-case keys to match Snowflake's default column names. Match them to your table.
  • Both mappings give the contact as an ID only. Load contacts with a second request if you need names.
  • QuickBooks maps no status and no issue_date, so STATUS and ISSUE_DATE stay empty for QuickBooks accounts.
  • Snowflake datastores use key-pair authentication. Run Send test method with testConnection first.

9. How do you send changed ATS candidates to your webhook?

Use a V4 sync job that lists candidates changed since the last run in Greenhouse or Lever and sends a slim copy to your webhook. One job serves both apps through the ATS Unified API. Ashby works too, but its mapping takes no date filter, so each run returns every candidate.

Replaces: a Pipedream workflow per customer that polls Greenhouse or Lever for changed candidates and sends them to your app.

Mappings checked: Greenhouse and Lever ats/candidates list, with updated_at and gte. Lever's candidates come from its opportunities endpoint. Ashby also maps the list, but takes no updated_at filter, so each run returns every candidate.

The job below lists changed candidates and sends each one's ID, first and last name, email, application IDs, tags and update time:

{
  "label": "ATS candidates changed since the last run, to a webhook",
  "default_runtime_version": 4,
  "integration_name": "",
  "state_key": "ats-candidates:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "webhook_id": { "type": "string", "format": "webhook_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': resources.`get-last-synced-at`.value }" }
    },
    {
      "type": "request",
      "name": "list-candidates",
      "resource": "ats/candidates",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "updated_at": { "gte": "{{last_synced_at}}" } }
    },
    {
      "type": "transform",
      "name": "slim-candidates",
      "depends_on": "list-candidates",
      "config": {
        "expression": "resources.ats.candidates.{ 'id': id, 'first_name': first_name, 'last_name': last_name, 'email': emails[0].email, 'application_ids': [applications.id], 'tags': [tags.($type($) = 'string' ? $ : name)], 'updated_at': updated_at }"
      }
    },
    {
      "name": "send-to-webhook",
      "type": "destination",
      "destination_type": "webhook",
      "config": { "id": "{{args.webhook_id}}" },
      "resources_to_persist": ["slim-candidates"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: a workflow with "run_if": "integration.name in ['greenhouse', 'lever']" and "cron_expression": "0 * * * *".

What to check:

  • Candidate data is personal data. Send only the fields your product uses, and keep the transform as the place where you drop the rest.
  • [applications.id] keeps the value as an array, even when a candidate has one application.
  • Greenhouse passes its tags through as plain strings, and Lever maps each tag to an object with a name. The tags expression handles both.
  • To track hiring stages, add a request for ats/applications. The ATS model also has jobs, interviews, offers and scorecards.

10. How do you index Notion pages in Pinecone, one namespace per customer?

Use a V4 sync job that lists Notion pages, reads the blocks of each page that changed, and joins them into one text document. upsertDocuments writes the documents to a Pinecone document index. The namespace is the customer's account ID, so one customer's search never returns another customer's pages.

Replaces: a Pipedream workflow that reads a customer's Notion pages and joins the blocks into text. The workflow then upserts the text into a vector index for your AI feature.

Mappings checked: Notion knowledge-base/pages list and knowledge-base/page-content list. Confluence maps both too. Notion's page list takes no updated_at filter, so the job lists every page and skips the ones that did not change.

The Pinecone datastore must point at a document index, one created with a document schema. Match the document fields to your schema.

The job below lists pages, reads the blocks of each changed page, joins them and upserts one document per page:

{
  "label": "Notion pages changed since the last run, to a Pinecone document index",
  "default_runtime_version": 4,
  "integration_name": "",
  "state_key": "kb-pinecone:{{args.integrated_account_id}}",
  "mutex_key": "{{args.integrated_account_id}}",
  "args_schema": {
    "integrated_account_id": { "type": "string", "format": "integrated_account_id", "required": true },
    "pinecone_datastore_id": { "type": "string", "format": "datastore_id", "required": true },
    "start_date": { "type": "string", "format": "date-time", "required": true }
  },
  "args_validation": "$exists(args.start_date) ? null : { 'message': 'start_date is required' }",
  "resources": [
    {
      "type": "get_state",
      "name": "get-last-synced-at",
      "config": { "key": "last_synced_at", "default": "{{args.start_date}}" }
    },
    {
      "type": "add_context",
      "name": "add-last-synced-at",
      "depends_on": "get-last-synced-at",
      "config": { "expression": "{ 'last_synced_at': resources.`get-last-synced-at`.value }" }
    },
    {
      "type": "request",
      "name": "list-pages",
      "resource": "knowledge-base/pages",
      "method": "list",
      "depends_on": "get-last-synced-at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "page_type": "page" }
    },
    {
      "type": "request",
      "name": "get-page-content",
      "resource": "knowledge-base/page-content",
      "method": "list",
      "depends_on": "list-pages",
      "run_if": "$not($exists(resources.`knowledge-base`.pages)) or resources.`knowledge-base`.pages.updated_at >= last_synced_at",
      "integrated_account_id": "{{args.integrated_account_id}}",
      "query": { "page": { "id": "{{resources.knowledge-base.pages.id}}" } },
      "recurse": {
        "if": "{{resources.knowledge-base.page-content.has_children:bool}}",
        "config": {
          "query": { "page_content_id": "{{resources.knowledge-base.page-content.id}}" }
        }
      }
    },
    {
      "type": "transform",
      "name": "drop-remote-data",
      "depends_on": "get-page-content",
      "config": {
        "expression": "resources.`knowledge-base`.`page-content`.$sift(function($v, $k) { $k != 'remote_data' })"
      }
    },
    {
      "type": "spool",
      "name": "all-blocks-of-a-page",
      "depends_on": "drop-remote-data"
    },
    {
      "type": "transform",
      "name": "page-to-document",
      "depends_on": "all-blocks-of-a-page",
      "config": {
        "expression": "( $blocks := resources.`knowledge-base`.`page-content`; $pageId := $blocks[$exists(page.id)][0].page.id; { '_id': $pageId, 'text': $reduce($sortNodes($blocks, 'id', 'parent.id'), function($acc, $v) { $acc & $v.body.content & '\\n' }, '') } )"
      }
    },
    {
      "name": "upsert-into-pinecone",
      "type": "destination",
      "destination_type": "datastore",
      "method": "upsertDocuments",
      "config": {
        "id": "{{args.pinecone_datastore_id}}",
        "config": {
          "namespace": "{{args.integrated_account_id}}",
          "documents": "{{payload.records:any}}"
        }
      },
      "resources_to_persist": ["page-to-document"]
    },
    { "name": "on-complete", "type": "event", "config": { "name": "complete" } },
    {
      "type": "update_state",
      "name": "update-last-synced-at",
      "depends_on": "on-complete",
      "config": {
        "key": "last_synced_at",
        "value_expression": "sync_job_run.status = 'completed' ? sync_job_run.started_at.toISOString()"
      }
    }
  ]
}

Trigger: a workflow with "run_if": "integration.name = 'notion'" and "cron_expression": "0 */6 * * *". Pass a start_date one year back for the first sync, as in recipe 3.

What to check:

  • "page_type": "page" leaves Notion databases out of the list. The page-content request passes only a page ID, which reads a page's blocks. A database ID there would most likely fail with sync_job_run:record_error.
  • The run_if on get-page-content has two parts for a reason. Each recurse call for child blocks runs the same run_if, and that call does not see the page. Without $not($exists(...)), every child block is skipped.
  • The spool node collects one page's blocks, nested children included, before the next transform joins them. Each page becomes one document with the page ID as _id.
  • The namespace is the customer's account ID. A search for one customer never returns another customer's pages.
  • A page deleted in Notion stays in the index. Remove it with deleteDocuments from your backend.
  • Truto's shipped Notion template, exampleSyncJobV4.json, uses the same recurse, spool and $sortNodes pattern for one page at a time.

Which V4 patterns can you reuse across recipes?

Four patterns come up again and again in V4 jobs. A Proxy API resource reaches endpoints the unified model does not cover. paginate_if stops paging early. Several destination nodes send one job's output to more than one place. A destination run_if skips empty batches.

Call an endpoint the unified model does not cover. Name a Proxy API resource without a /, such as "resource": "tickets". The records then land at resources.tickets. Each integration's definition lists its Proxy API resources and methods.

Stop paging early. paginate_if is a JSONata expression. Truto fetches the next page only while the expression is truthy. This request stops once it has read 1,000 or more records:

{
  "type": "request",
  "name": "list-recent-tickets",
  "resource": "ticketing/tickets",
  "method": "list",
  "integrated_account_id": "{{args.integrated_account_id}}",
  "paginate_if": "pagination.total_records_size < 1000"
}

Send to two places. A job can have several destination nodes. Give each one a run_if, such as "$exists(args.webhook_id)", so one job serves customers who want a webhook and customers who want a bucket.

Skip empty batches. A destination's run_if sees payload, so "$count(payload.records) > 0" skips a send with no records.

How do you test a recipe before you move a customer?

Create the job on a test environment, start one run by hand, and check the run, its logs, the destination and the watermark. Create the workflow or schedule only after one clean run. A coding agent with Truto's skills can do most of these steps for you.

  1. Create the job on a test environment with truto sync-jobs create --stdin < job.json.
  2. Start one run by hand with POST /sync-job-run, the job's sync_job_id and a test account's args.
  3. List the run with GET /sync-job-run?sync_job_id=<id>. A V4 run stores no account of its own, so a filter on integrated_account_id does not find it.
  4. Open Logs and then RapidBridge for the run. Add "debug": true to a transform to log its input and output.
  5. Check the destination: the webhook events, the files in the bucket or the rows in the table.
  6. Check the job's Run State tab. The watermark must show the run's start time.
  7. Only then create the workflow or the schedule.

A coding agent can do most of this work for you. Truto publishes skills that teach an agent the V4 fields, JSONata and the CLI. The coding agent section of the migration guide shows how to set it up.

What should you do next?

Pick the recipe closest to your busiest Pipedream workflow. Build it on a test tenant, run it for one customer, and compare the output with what Pipedream sends today. Then move customers one at a time, as the Pipedream Workflows migration guide describes.

Truto has special pricing for teams that migrate from Pipedream. Ask Truto about migration pricing and share the workflows and apps you plan to move.

FAQ

What is a RapidBridge V4 sync job?
A RapidBridge V4 sync job is a JSON graph of named nodes. Request nodes call Truto's Unified or Proxy API for one integrated account. Transform nodes reshape the data with JSONata. State nodes keep a watermark between runs. Destination nodes send the output to your webhook or to a datastore, such as S3, Postgres, BigQuery, Snowflake or Pinecone.
Do I need one sync job per customer?
No. You define the job once. Each run names the customer's account in args.integrated_account_id, so one job serves every customer. A Truto workflow or a schedule starts the runs.
How do I start a sync job when a customer connects an account?
Create a Truto workflow with the integrated_account:active trigger and one run_sync_job step. Without a cron_expression the step starts one run. With a cron_expression it creates a schedule for that account.
Can a V4 sync job write to the customer's app?
A request node accepts create and update methods, and recipe 5 posts a message to Slack or Teams. No sync job template that Truto ships writes to an app, so test every write on a sandbox account before you run it for a customer.
What can a V4 sync job not do that Pipedream could?
A V4 job has no approval step, no sleep step, no drag-and-drop builder and no arbitrary code. Logic is JSONata and {{placeholders}}. A V4 job has no generic HTTP node, so every call goes through Truto's Unified or Proxy API.

More from our Blog