营销与写作

writing-handlebars

celigo/ai

Write Handlebars template expressions for Celigo integrations -- dynamic values in mappings, HTTP bodies, SQL queries, URIs, and filters. Use when building any resource configuration that needs computed, conditional, or formatted field values.

  • 3151 次安装
  • 4 星标
  • 收录于

安装命令

npx skills add https://github.com/celigo/ai --skill writing-handlebars

SKILL.md

Writing Handlebars Expressions

Handlebars is Celigo's template language for embedding dynamic values into resource configurations. Any string field that the platform evaluates at runtime can contain Handlebars expressions.

Concerns when writing Handlebars:

  • Context -- where the expression runs determines what data is available and how output is treated
  • Braces -- double {{ }} vs triple {{{ }}} controls output escaping
  • Field access -- record. prefix (AFE 2.0) outside a few bare-field contexts (Key Syntax), @root for job/settings/connection, bracket notation for special characters
  • Helpers -- 80 custom helpers for math, string manipulation, dates, encoding, regex, lookup caches, and more
  • Block helpers -- #each, #if, #compare, #with for iteration and conditional logic
  • Date/time -- moment.js format tokens with timezone support

Used across exports, imports, mappings, output filters, and APIs.

Copy field paths from the data, never from the request. Before writing an expression, read a record the step actually receives -- the import's sampleData, the source export's mockOutput or a recent run's records, or a failing record's retry data -- and take each path from it. The field the user names, or the destination field being filled, isn't evidence of the source's name (phone may arrive as phoneNumber), and a wrong path renders empty with no error (step 2). An import holds a record of its own only in sampleData; when it has none, read the flow that uses it (the import's dependencies name it) and that flow's source export's mockOutput or a recent run's records. When you report the change, say which record each path came from.