web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Remove quotations mark...
Power Automate
Answered

Remove quotations marks from string into http request

(0) ShareShare
ReportReport
Posted on by 28

Hello,

 

I'm trying to insert a string into a json body http request, but quotations marks stop me from creating a valid request.

 

I'm creating a string with email from an Azure AD group, with that syntax : 

 

{"email":"email1"},   >> repeated for each user in the group 

 
 

but when i'm inserting this string into my body, it turns out like this : 

"{\"email\":\"email1\"},{\"email\":\"email2\"}"
flow1.jpgflow2.jpgflow3.jpg
Obviously this won't work, how can I manage to have only what I entered in my string? no slash or quotations marks added. 
 
For informations, it's targeting an API from Adobe Sign, because his nativ connectors can't do a lot of things (like masque or group)
 
Thanks for your help
Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at
    Hi
    Let's see if I understood your flow:
    -grupMember1 is an array variable, right?
    You are iterating through another array called 'Membre du g...' by means of an Apply to each, right?
    - inside your Apply to each, you are invoking 'Append to array variable' so you append 'Membre du g..' -can you share a screenshot of its content?- to groupMember1 inside {}.
    -the API you are about to invoke expects an array of objects instead of an array of strings
    If all my assumptio s are correct, I would suggest to replace current expression from your 'Append to array' and use this function instead by clicking 'Add dynamic content' and then 'Expression'
    json()
    Once added you shall add inside the json parenthesis, the dynamic content 'Membres du g..' you are currently inserting
    Hope this helps
  • AntoineT Profile Picture
    28 on at

    Hello and thanks for the answer, i've switch Flow in english for the screenshots : 

     

    - groupMember1 is a String initialize nothing.

    image.png

     

    This string contains every email of the members of a specific AD Group which looks like this

    image.png

    (Append to a string variable)

     

    i'm then creating another variable called groupMemberOK (still a string) which is groupMember1 less the last coma (not needed in the json api), value of this groupMemberOK :

    image.png

    image.png

     

    Should I've been using array instead of a string? in that case, how do you remove the last char of an array? substring won't work I suppose

     

    The API i'm calling just require a JSON Body (Adobe Sign) ; I need my API to look like this 

     

     

     

    "memberInfos": [
     {
     "email": "perso@antoine-tal.com"
     },
     {
     "email": "anothermail@antoine-tal.com"
     }
     ],

     

     

     

     

     With what i'm currently doing, the strings turns into : 

     

    image.png

     

    I'm not sure where you suggested I tried the json() expression, however I tried to insert a dynamic content into my http request's json body with >>   json(variables('groupMemberOK')) and it indeed works but I only got the first mail, other don't appear. 

     

     

    I tried to be as clear as possible but don't hesitate if I wasn't clear enough in some parts 

     

    Thanks again !

  • AntoineT Profile Picture
    28 on at

    Hello and thanks for the answer, 

     

    I'll try to be as clear as possible but if some part are still cloudy don't hesitate.

     

    I have a string variable called groupMember1 

    image.png

     

    I'm getting with an Azure AD connectors every mail's user of a specific group AD (group test so seeing the ID doesn't matter)

     

    I then with an apply to each, insert in my variable the "setup" that I want in my http call.

     

    image.png

     

    As you can see I add a coma at the end, in case their is multiple account in the AD group. However the json body for the http request dont want a coma at the end, therefore I remove it and insert the result in a string variable called groupMemberOK

     

    image.png

     

    The content is then something like that : 

     

    image.png

     

    I then add this variable to my json body 

     

    image.png

     

    On this screen I tried to insert my variable with the expression   json(variables('groupMemberOK')) ; while it was in the good format, it only gave me the first mail and not the second.

     

    And if I insert in the body directly the string expression, it turns out like this : 

     

    image.png

     

    I just want my json body to be like this 

     

    "memberInfos": [
     {
     "email": "first@mail.com"
     },
     {
     "email": "second@mail.com"
     }
     ],

     

    Should i've been using array instead of string? if so how do you remove the last char of en array (the coma) ?

     

    Thanks again

  • efialttes Profile Picture
    14,756 on at
    Hi
    Sorry I am not in front of my laptop, I cannot send you screenshots
    In my opinion, the problem is you are building objects as if they were strings, that's why you see \\ in front of your double quotes.
    I would try this:
    - change groupMember variable type: from 'string' to 'array'. This way you will not have problems with the extra comma
    - replace 'Append to string variable' inside your Apply to each, use 'Append to Array variable' instead
    Inside 'Append to Array variable' use the following expression:
    setProperty(json('{}'),'email',<insert here the dynamic content that currently stores the email address>)

    Then after the 'apply to each' insert a dummy Compose action block, add it as input your array variable, execute the flow and inspect its content.
    You will see its content now is
    [{"email": "a@a.fr"},...
    {"email": "z@z.fr"}]
    So, you can inject your array variable as the value of property "memberInfos" in your JSON, no need to add/remove special characters
    Hope this helps
  • AntoineT Profile Picture
    28 on at

    No worries ! Again thanks for the taking the time. 

     

    I understand what you're trying to do, however how can I get the mail of the azure AD group?

     

    In the apply to each, when trying to append to the array variable, I only see body & member on the Azure AD Dynamics Content. 

     

    image.png

     

    I tried with this 2, body returns everything, and with Group Members I tried 

    setProperty(json('{}'),'email',body('Obtenir_les_membres_du_groupe')?['email'])

    (and same with mail instead of email)

     

    but it returns "email = null" 

     

    I guess there is a way to limit the body in only returning the wanted mail? 

  • efialttes Profile Picture
    14,756 on at

    @AntoineT wrote:

    No worries ! Again thanks for the taking the time. 

     

    I understand what you're trying to do, however how can I get the mail of the azure AD group?

     

    Hi again!

    I thought you were already getting email addresses...

    So next question is... Are you currently using Azure Active directory API or Microsoft Graph?

    https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-graph-api

  • AntoineT Profile Picture
    28 on at

    My bad then! I'm using the "Azure AD" connector directly integrad in flow.

     

    image.png

     

    Which allow me to later insert in a string the email I need

     

    image.png

  • efialttes Profile Picture
    14,756 on at
    Hi again
    So when you invoke Get group members, the outputs are the ones from your screenshot, and the property you want to read is 'Group Members Mail', right?
    The 'Apply to each' you are currently doing is taking as its input an array (i.e. list) of 'Group ids' you are interested in, right?
    If so, you just need to add inside the 'apply to each' the action 'Get group members' to access email address, and then 'append to array variable'
    Hope this helps
  • AntoineT Profile Picture
    28 on at

    Hello! 

     

    When I invoke group members, I indeed want to read 'Group Members Mail' but, if using Dynamic content in an empty variable, I have everything as seen here : 

     

    image.png

     

    But when I insert as an expression 

    setProperty(json('{}'),'email',<insert here>)

    I'm only getting 2 outputs, as seen here : 

    image.png

     

     
     
    The 'Apply to each' is taking as its input Group Members directly, I only have one Azure AD Group, there will never be multiple, only a random number of people in it. 
    So it takes as input the group members i'm interested in. 
     
    Can't try that since the input is already group members.
     
     
    I'm sorry I'm not sure I fully understood the answer, so I tried to be as clear as possible !
     
    Thanks for the help so far, really appreciated. 
  • Verified answer
    efialttes Profile Picture
    14,756 on at

    @AntoineT 

    Not sure we are understanding each other

    I thought you were already getting target emails, and you just have a format problem injecting thte info in your json. Actually, whare are you getting email address from the screenshots you initially shared? Not from Azure AD connector?

    Flow_antoine.jpg

     

    Now, I do not have experience working with Azure AD connector, but according to its official documentation:

    -Get group members action block response is an array of Get user response

    -Get user response includes a property called Mail and tons of other Properties

    Assuming this, if you iterate in your 'Apply to Each' through 'Get group members response', you should be able to inyect Mail related info to the array you are building by means of:

    setProperty(json('{}'),'email',item()?['Mail'])

    I haven't used this connector in my life, so if this last suggestion from my side makes the magic, it means both of us are incredibly lucky

    Hope this helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard