Prompt Detail:
Sure! Here's a basic API for Power Automate that sends purchase order (PO) information from Priority.com to Monday.com:
First, create a new flow in Power Automate.
Set Priority.com as the trigger, and choose the "New Purchase Order" event.
Add a "Parse JSON" action to extract the necessary information from the PO.
Use the "HTTP" action to send a POST request to the Monday.com API endpoint with the extracted information.
In the request body, include the item, customer name, and quantity information.
Set the appropriate Monday.com API key and board ID in the HTTP headers.
Finally, add any necessary error handling and logging to the flow.
Here's an example of how the API could look like:
Trigger: Priority.com - New Purchase Order
Actions:
- Parse JSON:
- Content: Purchase Order JSON
- Schema: { "type": "object", "properties": { "Item": { "type": "string" }, "CustomerName": { "type": "string" }, "Quantity": { "type": "integer" } }, "required": [ "Item", "CustomerName", "Quantity" ] }
- HTTP:
- Method: POST
- URI: https://api.monday.com/v2
- Headers:
- Authorization: {{Monday.com API Key}}
- Content-Type: application/json
- Body: { "query": "mutation ($name: String!, $quantity: Int!) { create_item (board_id: {{Monday.com Board ID}}, item_name: $name, column_values: "{\"Quantity\":\"$quantity\"}") { id } }", "variables": { "name": "@{body('Parse_JSON')?['Item']}", "quantity": "@{body('Parse_JSON')?['Quantity']}" } }
That's it! This API should send the necessary PO information from Priority.com to Monday.com.