Orchestration
...
Record Actions
Create Record
13 min
the create record native action creates a new record in a selected application from the playbook builder the action maps data to application fields and returns the tracking id of the created record overview the create record action enables you to programmatically create records in swimlane applications from within playbooks this is useful for automating record creation based on events, data from other systems, or calculated values from upstream actions key benefits native action integrated directly into the playbook builder for streamlined workflow creation flexible field mapping map data from upstream actions, playbook inputs, or expressions to application fields record restrictions optionally restrict record access to specific users or groups tracking id output returns the tracking id of the created record for use in downstream actions at most once execution ensures the record is created exactly once, even if the playbook is retried inputs the create record action requires the following inputs required inputs application select an application by either application id the unique identifier of the application application name the name of the application note you must provide either applicationid or applicationname , but not necessarily both fields a dictionary/object mapping field keys to their values each field value can be a static value a reference to a playbook property from upstream actions a reference to playbook inputs an expression that evaluates to a value optional inputs restrictions users and/or groups to restrict the record to users array of user ids or usernames groups array of group ids or group names configuring the create record action step 1 select application from the inputs tab, select an application choose from the dropdown list of available applications, or use an expression to reference an application id or name dynamically step 2 add fields click add fields to open the field selection dialog from the existing application fields, click on the desired fields to add to the record you can select multiple fields click dismiss to close the window and return to the inputs tab step 3 map field values after adding fields, map values to each field for each field, click the + icon to set its value choose from playbook property select a property from upstream actions or playbook inputs expression write an expression to calculate the value dynamically static value enter a static value directly example to map a value from an upstream http request action click the + icon next to a field select playbook property navigate to $actions httprequestname result body fieldname step 4 configure restrictions (optional) if you need to restrict record access expand the restrictions section add users enter user ids or usernames (can be static or from expressions) add groups enter group ids or group names (can be static or from expressions) note restrictions determine who can view and access the created record if not specified, the record follows the application's default access rules step 5 apply changes click apply to save your configuration outputs the create record action provides the following outputs success output when the record is created successfully, the action returns result tracking id the tracking id (trackingfull) of the newly created record this can be used in downstream actions to reference the record example access the tracking id in downstream actions $actions createrecordname result\['tracking id'] error output if the record creation fails, the action returns error error information containing details about why the record creation failed common error scenarios application not found invalid field values required fields missing permission errors validation errors use cases example 1 create record from event data scenario create a security incident record when a security event is received configure an event trigger to receive security events add a create record action select the "security incidents" application map event data to record fields severity → $event data severity description → $event data description source ip → $event data sourceip use the tracking id in downstream actions to update or reference the record example 2 create record with restrictions scenario create a sensitive record restricted to a specific security team add a create record action select the application and configure fields configure restrictions groups \["security team"] users \["admin\@example com"] the created record will only be accessible to the specified users and groups example 3 create record from calculated values scenario create a record with calculated risk scores add a script action to calculate risk scores add a create record action map calculated values risk score → $actions calculaterisk result score risk level → expression $actions calculaterisk result score > 80 ? "high" "medium" best practices validate required fields ensure all required fields in the application are mapped before creating records handle errors use on failure paths to handle record creation errors gracefully use tracking id store or use the tracking id from the result for downstream operations like updating or referencing the record test field mapping test your field mappings with sample data to ensure values are correctly formatted and mapped consider restrictions use restrictions when creating sensitive records that should only be accessible to specific users or groups use expressions for dynamic values leverage expressions to calculate or transform values before creating records validate application selection ensure the application id or name is correctly specified, especially when using dynamic references troubleshooting record not created verify the application id or name is correct check that all required fields are mapped review error output for specific validation messages invalid field values ensure field values match the expected data types (string, number, date, etc ) check that reference field values exist in the referenced application permission errors verify the playbook has permission to create records in the selected application check that the user running the playbook has appropriate access tracking id not available ensure the action completed successfully access the tracking id using $actions actionname result\['tracking id'] syntax restrictions not applied verify user and group ids/names are correct ensure the specified users and groups exist in the system