When creating new order items in Monday.com, it is essential to route incoming data to the correct column types to keep your boards organized. This guide covers how to configure detailed field mappings for your orders and how to use a custom script to clear photo columns, ensuring new items start with a clean slate.
flowchart TD
A[Incoming Order Data] --> B[Map Fields to Monday Columns]
B --> C[Create Monday Item]
C --> D[Run Custom Python Script]
D --> E[Clear Photo Column]Mapping Order Fields
Monday.com uses specific column types (like text, color, location, and numeric) that require data to be formatted in a certain way. When passing order information from your intake forms or previous automation steps, ensure your variables match the expected format for each column.
Common Column Mappings
Here are the standard column types you will use when mapping new order data, along with what they expect to receive:
| Monday Column Type | Common Order Fields | Expected Format |
|---|---|---|
Text (text) | Order ID, Client Name, Street, City, State, Zip | Standard plain text strings. |
Long Text (long-text) | General Notes, Special Instructions | Text strings (supports line breaks). |
Color / Status (color) | Deal Stage, Rush, Property Type, Occupancy | Exact text matching the status label (e.g., "Submitted", "Client"). |
Location (location) | Property Address | Requires three distinct fields: lat, lng, and address. |
Numeric (numeric) | Subtotal, Square Footage | Numbers only (no currency symbols). |
Email (email) | Client Email | Requires both emailAddress and emailToDisplay. |
Date (date) | Order Date, Availability Dates | Standard date format (YYYY-MM-DD). |
Mapping Locations and Emails
Complex columns like location and email require multiple data points. For example, when mapping an address, you must provide the latitude (lat), longitude (lng), and the full text address (address) to populate the map correctly.
Clearing Photo Columns During Creation
When automating order creation (especially if duplicating existing templates or items), file and photo columns might carry over unwanted data. You can use a custom Python script via a "Code" step in your automation tool (like Zapier) to clear specific file columns automatically.
This script uses the Monday.com GraphQL API to pass an empty value ("{}") to the target column, effectively clearing it.
How to set up the script
- 1
Add a Code Step
Add a "Run Python" code step immediately after your "Create Item" step in your automation workflow.
- 2
Configure Input Variables
Map the following input variables in your code step so the script knows which item to update:
item_id: The ID of the newly created Monday item.board_id: The ID of your Monday board.column_id: The specific ID of the file/photo column you want to clear (e.g.,file_mm1aaxzg).api_token: Your Monday.com API token.
- 3
Paste the Python Code
Copy and paste the following script into the code block:
import requests import json # Input variables from your automation tool item_id = input_data['item_id'] board_id = input_data['board_id'] column_id = input_data['column_id'] api_token = input_data['api_token'] # Monday.com API endpoint url = "https://api.monday.com/v2" # Headers headers = { "Authorization": api_token, "Content-Type": "application/json" } # GraphQL mutation to clear the photo column query = ''' mutation { change_column_value ( board_id: %s, item_id: %s, column_id: "%s", value: "{}" ) { id } } ''' % (board_id, item_id, column_id) # Make the request payload = {"query": query} response = requests.post(url, headers=headers, json=payload) # Return the response for logging output = { 'status': response.status_code, 'response': response.json() }
Keep your API Token secure
Never hardcode your Monday.com API token directly into the Python script. Always pass it in securely via the input_data variables from your automation platform's secure connection vault.
Why does the script use an empty JSON object?
In Monday.com's GraphQL API, the change_column_value mutation expects a JSON-formatted string for the value argument. Passing an empty JSON object ("{}") instructs Monday.com to clear any existing data in that specific column, which is the standard method for emptying file and photo columns.