Summary
AI automations are automations whose action is generate_with_ai: a prompt plus the output fields it fills. Keeping prompts in git and reviewing prompt changes through terraform plan is a natural fit. The API covers the full lifecycle: createAutomation with the generate_with_ai action, updateAutomation, deleteAutomation, and validateAiAutomationPrompt as a preflight.
Proposed schema
id (computed)
pipe_id (required, RequiresReplace)
name (required)
prompt (required)
field_ids (required, list: the output fields the AI fills)
event_id (optional: trigger; defaults to the API default when unset)
active (optional bool)
Notes
pipefy_automation can already create these generically through action_params; the dedicated resource adds typed attributes and prompt validation.
- Call
validateAiAutomationPrompt before create and update and surface its findings as diagnostics (it checks prompt field references, output field ids, event validity, AI enablement on the pipe, and credit budget).
Read filters on action_id = generate_with_ai; an id pointing at a regular automation should be a clear error, not silent drift.
Summary
AI automations are automations whose action is
generate_with_ai: a prompt plus the output fields it fills. Keeping prompts in git and reviewing prompt changes throughterraform planis a natural fit. The API covers the full lifecycle:createAutomationwith thegenerate_with_aiaction,updateAutomation,deleteAutomation, andvalidateAiAutomationPromptas a preflight.Proposed schema
id(computed)pipe_id(required, RequiresReplace)name(required)prompt(required)field_ids(required, list: the output fields the AI fills)event_id(optional: trigger; defaults to the API default when unset)active(optional bool)Notes
pipefy_automationcan already create these generically throughaction_params; the dedicated resource adds typed attributes and prompt validation.validateAiAutomationPromptbefore create and update and surface its findings as diagnostics (it checks prompt field references, output field ids, event validity, AI enablement on the pipe, and credit budget).Readfilters onaction_id = generate_with_ai; an id pointing at a regular automation should be a clear error, not silent drift.