Hello,
I am trying to get the O365 Messages into a SharePoint List but I receive an error, and I cannot find any solution.
Can you please help me ?
Solved! Go to Solution.
Hi @Claudiu ,
Could you please provide the outputs of the ReadMessages Action?
It seems that not an array, Apply to each Action requires an array as input.
Based on the screenshots you provided, maybe you could try using the expressions like this:
outputs('ReadMessages')?['body']?['Id']
outputs('ReadMessages')?['body']?['Messages']
Best Regards,
Charlie Choi
Thank you for your response and for your time.
I am receiving now this error :
Hi @Claudiu ,
If it is convenient, could you post the outputs of the ReadMessages Action in the reply? Taking care to change the sensitive information to other values.
Best Regards,
Charlie Choi
I can show you the output from the custom connector that I made :
The output is the same but raw data.
Hi @Claudiu ,
Try to use the following expressions:
outputs('ReadMessages')?['body/value']?['Id']
outputs('ReadMessages')?['body/value']?['Messages']
or
outputs('ReadMessages')?['Body/value']?['Id']
outputs('ReadMessages')?['Body/value']?['Messages']
Best Regards,
Charlie Choi
Hi @Claudiu ,
You can select the dynamic content 'Body' , so can you select the dynamic content 'value' ?
If so, you could try to use value as the input to the 'Apply to each' Action.
If not, you could try to use the following expression:
outputs('ReadMessages')?['Body/value']
item()?['id']
In addition, you could add a Compose Action to check if the outputs is correct.
Best Regards,
Charlie Choi
I really appreciate this help.
Hi @Claudiu ,
Could you please provide your expressions? The function 'item()' must not have any parameters.
item()?['id'] √
item('id') ×
Best Regards,
Charlie Choi
For the Apply to each i use : outputs('ReadMessages')?['Body/value']
For Compose i have item('ReadMessages')?['Body/value']
And for Condition i use item()?['id']
Yes , you are right ,thank you , now is working.
But if i am trying now to add a CREATE ITEM in SharePoint list , i cannot find any Dynamic Content for exemple like ID or StartDate
Hi @Claudiu ,
You could get their values by writing expressions as before:
item()?['FieldName']
item()?['id']
item()?['startDateTime']
Best Regards,
Charlie Choi
Thank you for your information and your time @v-yujincui-msft . The issue is solved.
@v-yujincui-msft one more question, I am sorry.
I am trying to get also the content from the body using the same format item()?['content'] but in the SharePoint list is not added.
Hi @Claudiu ,
Try to use the following formula:
item()?['body']?['content']
Best Regards,
Charlie Choi
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
127 | |
54 | |
38 | |
24 | |
21 |