ContentRunner User Upsert (Stage) icon

ContentRunner User Upsert (Stage)

Insert or update a user in n8n_content_runner by tg_chat_id (from Telegram parsed: from_id, chat_id)

ContentRunner User Upsert (Stage)

AI-generated

Summary

Upserts Telegram user data in PostgreSQL, optionally notifying Customer.io, returning inserted/updated rows.

Inputs

  • tgChatId (required) — Unique Telegram chat ID (use from_id or chat_id for private chats)
  • tgUsername — Telegram username (@handle)
  • firstName — User's first name
  • lastName — User's last name
  • languageCode — User language code (e.g., en, ru)
  • sharedContact — Phone number from a shared contact

Output shape

Array of result objects, each containing a json field with the inserted/updated database row

If an error occurs and continueOnFail is enabled, the error message is returned in json; otherwise errors propagate and halt the workflow.

Examples

Example 1: Single user upsert

tgChatId=12345; firstName=John; lastName=Doe

Example 2: Batch upsert with optional fields

tgChatId=67890; tgUsername=john_doe; sharedContact=5551234567

Example 3: Error handling with continueOnFail

tgChatId=invalid; continueOnFail=true

Links

Discussion