I am trying to extract all my email information such as ID, receivedDatetime, Internetmessageid, from, to, attachment, CC, BBC etc in a SQL Table. I created below flow using Logic app
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"triggers": {
"Recurrence": {
"type": "Recurrence",
"recurrence": {
"interval": 1,
"frequency": "Day"
}
}
},
"actions": {
"Get_emails_(V3)": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['office365-1']['connectionId']"
}
},
"method": "get",
"path": "/v3/Mail",
"queries": {
"importance": "Any",
"fetchOnlyWithAttachment": false,
"folderPath": "Id::AAMkADU1NzM2NmJiLWUzOGItNDlmZS1iNjc3LWFkYzIzYmMzY2M4NgAuAAAAAAA8vBvBB693S5_H10o_0OuyAQD3AekO3P8LQpKHquyOHAMyAAAAAAEMAAA=",
"fetchOnlyUnread": false,
"fetchOnlyFlagged": false,
"includeAttachments": false,
"top": 25
}
},
"runAfter": {},
"metadata": {
"Id::AAMkADU1NzM2NmJiLWUzOGItNDlmZS1iNjc3LWFkYzIzYmMzY2M4NgAuAAAAAAA8vBvBB693S5_H10o_0OuyAQD3AekO3P8LQpKHquyOHAMyAAAAAAEMAAA=": "Inbox"
}
},
"For_each": {
"type": "Foreach",
"foreach": "@body('Get_emails_(V3)')?['value']",
"actions": {
"Insert_row_(V2)": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['sql']['connectionId']"
}
},
"method": "post",
"body": {
"ReceivedDateTime": "",
"HasAttachments": "",
"InternetMessageID": ""
},
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('****'))},@{encodeURIComponent(encodeURIComponent('***'))}/tables/@{encodeURIComponent(encodeURIComponent('[POC].[OutlookEmailData]'))}/items"
}
}
},
"runAfter": {
"Get_emails_(V3)": [
"Succeeded"
]
}
}
},
"outputs": {},
"parameters": {
"$connections": {
"type": "Object",
"defaultValue": {}
}
}
},
"parameters": {
"$connections": {
"value": {
"office365-1": {
"id": "***",
"connectionId": "**",
"connectionName": "office365-1"
},
"sql": {
"id": "**",
"connectionId": "***",
"connectionName": "sql-6",
"connectionProperties": {
"authentication": {
"type": "ManagedServiceIdentity",
"identity": "
}
}
}
}
}
}
}
Using GetMail(V3) action, i can only extract max of 25 records as it is the maximum limit. I have more than 1000 mails. How can i extract all of them. Can someone help me on this.


