Power Automate from Microsoft Forms into Monday using HTTP

Hi all,

As there isn’t a built-in connector, I’ve spent a few weeks creating a Power Automate flow to pass Microsoft Forms data into Monday via the API.
I’ve used a lot of people’s posts and research, plus a lot of trial and error, but finally have a working version which I hope some people may find useful.

I won’t cover the Forms part of the flow, as there’s plenty of info about that, but there’s very little out there about using the HTTP connector to call the Monday API suite.
Unfortunately the HTTP connector is Premium, so you’ll need a license.

Starting with a simple one - I needed the person who submitted the form to be on a People column on the Monday board. The API needs a User ID, but all I have is an email, so I need to get all the users, then find the one I want:
image

Then a Parse JSON action with the following Schema:
{
“type”: “object”,
“properties”: {
“data”: {
“type”: “object”,
“properties”: {
“users”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“email”: {
“type”: “string”
},
“id”: {
“type”: “integer”
}
},
“required”: [
“email”,
“id”
]
}
}
}
},
“account_id”: {
“type”: “integer”
}
}
}

Next add a Filter Array using the previous Parse JSON “user”, where the “email” is equal to the form responder. Make sure you use the “tolower” function as the filter is case sensitive

This will return an array, despite only having one match, so you also need to add a “Compose” action and use the expression “first(body(‘Filter_array’))?[‘id’]” to return just the first item from the array

Creating the actual API request uses the “HTTP” premium connector
The formatting of the body ends up looking very confusing as it has lots of escaped characters:

Things to notice here:

  1. “topics” is the ID of my group. You can use Postman to do a simple boards query and return group ID’s to find the one you want.
  2. The two blank fields are variables that I’ve initialised and populated earlier in the flow.
  3. “numbers4” and “people” are two of my actual column IDs so will need changing
  4. I’m populating two people in the Monday column, hence the two “outputs” fields. These are the outputs from the “Compose” action earlier, within a “personsAndTeams” JSON array. Make sure you put “personsAnd Teams”, both plural, not “personAndTeam” singular.
  5. The syntax to encapsulate text expressions is a backslash followed by a quote, but these both need to be escaped with another backslash, hence the slightly odd “triple backslash and quote”

I then add another Parse JSON action, using the “body” of the previous HTTP action as the Content and the following Schema:
{
“type”: “object”,
“properties”: {
“data”: {
“type”: “object”,
“properties”: {
“create_item”: {
“type”: “object”,
“properties”: {
“id”: {
“type”: “string”
}
}
}
}
},
“account_id”: {
“type”: “integer”
}
}
}

That gives me the ID of the newly created project, so now I can upload a file (or do whatever)
Add another HTTP action to upload a file:

More things to note:

  1. A different URL endpoint (adding “/file”)
  2. “content-type” in the header needs to be “multipart/form-data”
  3. The body is a different format, as it’s multipart, not raw, and this time doesn’t need the triple-backslash escaping
  4. “id” is the output of the Parse JSON action which returned the newly created project
  5. “files” is the ID of the Files column
  6. “New Demand Form.docx” could easily be replaced with a variable

The variable “MainDocument” was created using the Populate a Microsft Word Template action from the “Word Online (Business)” group:
image

And then setting the output from this:
image

Hope someone finds this useful!

  • Steve

Thank you for sharing this @stevej401 !

Hi! This is a great post. And I’m looking to do something similar but I need to get the items in a board (which I’ve done with a HTTP connector) and then I need to parse the data. That’s where I’m struggling.
I’ve tried using the “Generate Schema from example” and power automate isn’t liking that. The error is Schema validation error. This is the error I get:
{
“message”: “Invalid type. Expected String but got Null.”,
“lineNumber”: 0,
“linePosition”: 0,
“path”: “data.boards[0].items[0].column_values[5].text”,
“schemaId”: “#/properties/data/properties/boards/items/properties/items/items/properties/column_values/items/properties/text”,
“errorType”: “type”,
“childErrors”:
},
{
“message”: “Invalid type. Expected String but got Null.”,
“lineNumber”: 0,
“linePosition”: 0,
“path”: “data.boards[0].items[0].column_values[6].text”,
“schemaId”: “#/properties/data/properties/boards/items/properties/items/items/properties/column_values/items/properties/text”,
“errorType”: “type”,
“childErrors”:
},
{
“message”: “Invalid type. Expected String but got Null.”,
“lineNumber”: 0,
“linePosition”: 0,
“path”: “data.boards[0].items[0].column_values[16].text”,
“schemaId”: “#/properties/data/properties/boards/items/properties/items/items/properties/column_values/items/properties/text”,
“errorType”: “type”,
“childErrors”:

And this is the schema I’m using:
{
“type”: “object”,
“properties”: {
“data”: {
“type”: “object”,
“properties”: {
“boards”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“items”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“id”: {
“type”: “string”
},
“name”: {
“type”: “string”
},
“column_values”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“id”: {
“type”: “string”
},
“text”: {
“type”: “string”
}
},
“required”: [
“id”,
“text”
]
}
}
},
“required”: [
“id”,
“name”,
“column_values”
]
}
}
},
“required”: [
“items”
]
}
}
}
},
“extensions”: {
“type”: “object”,
“properties”: {
“warnings”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“message”: {
“type”: “string”
},
“locations”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“line”: {
“type”: “integer”
},
“column”: {
“type”: “integer”
}
},
“required”: [
“line”,
“column”
]
}
},
“path”: {
“type”: “array”,
“items”: {
“type”: “string”
}
},
“extensions”: {
“type”: “object”,
“properties”: {
“code”: {
“type”: “string”
},
“typeName”: {
“type”: “string”
},
“fieldName”: {
“type”: “string”
}
}
}
},
“required”: [
“message”,
“locations”,
“path”,
“extensions”
]
}
}
}
},
“account_id”: {
“type”: “integer”
}
}
}

Any help would be GREATLY appreciated! Thank you! Mollie

1 Like

For anything that could be null I added that as a option manually in the schema, [“string”, “null”]
Never mind, got it figured out:
{
“type”: “object”,
“properties”: {
“data”: {
“type”: “object”,
“properties”: {
“boards”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“items”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“id”: {
“type”: [“string”, “null”]
},
“name”: {
“type”: [“string”, “null”]
},
“column_values”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“id”: {
“type”: [“string”, “null”]
},
“text”: {
“type”: [“string”, “null”]
}
},
“required”: [
“id”,
“text”
]
}
}
},
“required”: [
“id”,
“name”,
“column_values”
]
}
}
},
“required”: [
“items”
]
}
}
}
},
“extensions”: {
“type”: “object”,
“properties”: {
“warnings”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“message”: {
“type”: “string”
},
“locations”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“line”: {
“type”: “integer”
},
“column”: {
“type”: “integer”
}
},
“required”: [
“line”,
“column”
]
}
},
“path”: {
“type”: “array”,
“items”: {
“type”: “string”
}
},
“extensions”: {
“type”: “object”,
“properties”: {
“code”: {
“type”: “string”
},
“typeName”: {
“type”: “string”
},
“fieldName”: {
“type”: “string”
}
}
}
},
“required”: [
“message”,
“locations”,
“path”,
“extensions”
]
}
}
}
},
“account_id”: {
“type”: “integer”
}
}
}

1 Like