Create List Item
Definition
The "Create List Item" action allows a user to programmatically add a new entry to a specified list within a SharePoint site. By connecting to a specific site and list, this action dynamically generates input fields corresponding to the list's columns, enabling the user to populate the new item with static or dynamic data from previous steps in a flow.
Key capabilities:
- Connect to any SharePoint site and list within your environment.
- Dynamically populate columns of a new list item with data.
- Retrieve unique identifiers (ID, GUID) for the newly created item for use in subsequent actions.
This action is fundamental for automating data entry processes, allowing seamless integration between various applications and SharePoint lists without manual intervention.
Inputs
- Connection This field establishes the authenticated connection to your SharePoint environment, authorizing zenphi to interact with your sites and lists.
- Site ID The Site ID is a unique identifier for a SharePoint site, which can include team sites, communication sites, or Microsoft 365 Group sites. You must provide the specific ID of the site containing the target list.
- List ID This is the unique identifier for the list within the selected SharePoint site where the new item will be created. You can either enter the List ID directly or select the desired list from the drop-down menu that appears after a site is chosen.
- Columns to Fill This configuration allows you to select which columns of the SharePoint list you want to populate for the new item. Once selected, each column will appear as a separate input field in the action, ready to be filled with data. Note that certain field types like Image, Location, and Metadata (Multiple Values) are not supported. If you modify the columns in your SharePoint list, you must use the reload button in the action to reflect those changes.
Outputs
- Site ID The unique identifier of the SharePoint site where the item was created.
- List ID The unique identifier of the list where the new item was added.
- ID The unique integer ID assigned to the newly created list item. This is often used to reference the item in subsequent actions like "Update Item" or "Delete Item".
- GUID The globally unique identifier (GUID) for the list item, providing a permanent and unique reference.
- Craete Date/Time The exact date and time when the new list item was created.
- Last Modified Date/Time The date and time the item was last modified. For a newly created item, this will be the same as the creation time.
Example Use Cases
- Log Form Submissions Automatically create a new SharePoint list item every time a user submits a response through a connected form, such as Google Forms or a zenphi Form.
- Track Approval Requests Generate a new list item to serve as a centralized record for every new request, such as for leave, expenses, or IT support, initiating a tracking and approval workflow.
- Archive Workflow Outcomes Store the final results, decisions, or summary data from a completed workflow as a new item in a SharePoint list for auditing and reporting purposes.
- Create Task Lists from Emails Parse incoming emails and automatically create corresponding task items in a SharePoint list, assigning details like sender, subject, and due date to the appropriate columns.
Example
Scenario: An IT department uses a zenphi Form for new software license requests. To manage and track these requests efficiently, they need to automatically log each submission into a "Software Requests" SharePoint list. This list serves as the central dashboard for the IT team to review, approve, and update the status of each request.
Steps to Implement:
- Set the Trigger: Begin the flow with a zenphi Form trigger, configured to start whenever a "New Software Request Form" is submitted. This trigger will provide the employee's name, requested software, and justification as outputs.
- Configure the "Create List Item" Action: Add the SharePoint "Create List Item" action to the flow.
- Connection: Select your established SharePoint connection.
- Site ID: Choose the "IT Department" SharePoint site from the dropdown menu.
- List ID: Select the "Software Requests" list.
- Columns to Fill: Map the data from the form trigger to the corresponding list columns using the token picker.
Title
: Use the "Requested Software" token from the form.RequesterName
: Use the "Employee Name" token.Justification
: Use the "Justification" token.Status
: Set a static value of "New Request".
- Use the Output: In subsequent steps, use the
ID
output from this action to update the request's status. For example, after an approval step, use the "Update Item" action and reference thisID
to change theStatus
column to "Approved".
Outcome: This automation completely eliminates the need for manual data entry, ensuring that every software request is instantly and accurately logged in the SharePoint list. The IT team gains a real-time, centralized view of all incoming requests, which streamlines their review process, reduces the risk of human error, and creates a reliable audit trail for every request.
Best Practices
- Validate Input Data Before executing the "Create List Item" action, use conditional logic or data formatting actions to ensure the data you are passing to SharePoint columns is in the correct format (e.g., dates, numbers, email addresses). This prevents the flow from failing due to data type mismatches.
- Utilize the Output ID for Subsequent Actions Always store and use the
ID
output from this action when you need to reference the newly created item later in the flow. Actions like "Update List Item," "Get List Item," or "Delete Item" rely on this unique ID to target the correct entry. - Refresh List Schema After Changes If you add, delete, or modify columns in your SharePoint list, remember to click the reload button within the "Create List Item" action's configuration. This ensures the action's input fields accurately reflect the current structure of your list.
- Handle Required Fields Ensure that all columns marked as "Required" in your SharePoint list are populated with data in the action. Leaving a required field empty will cause the action to fail and stop the workflow.
Updated about 2 hours ago