Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Error while sending email with another account from PowerAPps to MSFlow

(0) ShareShare
ReportReport
Posted on by 129

I have created one PowerApp form. When user clicks on a button, calling a flow and sending parameter to the flow. In flow I am getting item from SharePoint and sending an test email. 

To send email I am using different (common) account. I have added connection with another account and selected while sending email. But flow is erroring out  with below message: 

 

InvalidTemplate. Unable to process template language expressions in action 'Get_item' inputs at line '1' and column '1981': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_sharepointonline']['connectionId']' cannot be evaluated because property 'shared_sharepointonline' doesn't exist, available properties are 'shared_sharepointonline_1, shared_office365_1'. Please see https://aka.ms/logicexpressions for usage details.'.

 

I have tried different solutions but nothing worked out for me.

  • v-zhos-msft Profile Picture
    v-zhos-msft on at
    Re: Error while sending email with another account from PowerAPps to MSFlow

    Hi @MihirY ,

    I am fraid you can't edit the code in flow.

    I suggest you change the connection for a try.

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • MihirY Profile Picture
    MihirY 129 on at
    Re: Error while sending email with another account from PowerAPps to MSFlow

    Thanks for your response. But my flow is showing like wrong connection or invalid connection. Is it possible to change the code here? I am trying to edit the code but it is not allowing me edit. 

  • v-zhos-msft Profile Picture
    v-zhos-msft on at
    Re: Error while sending email with another account from PowerAPps to MSFlow

    Hi @MihirY ,

    The account you have submitted in PawerApp should correspond to the connection account in the flow.

    Here, I made a test for different connections, you can check with the code view:

    Capture1.PNGCapture2.PNGCapture3.PNGCapture4.PNG

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • MihirY Profile Picture
    MihirY 129 on at
    Re: Error while sending email with another account from PowerAPps to MSFlow

    I have deleted the connections and readded them. But still the same issue. If I submit PowerApp with one particular user account (with my name) flow is working fine. If I submit form with any other user account, flow is giving me the error. 

    Yes error is related to connection, but where to check those connections. I have tried with export and import still same issue. If I change the connection to my name then flow is working with any other user. What is the problem with that common account?

  • v-zhos-msft Profile Picture
    v-zhos-msft on at
    Re: Error while sending email with another account from PowerAPps to MSFlow

    Hi @MihirY ,

    Could you please share a screenshot of your flow's configuration?

    As the error message shown, there are some issue about the expressions in the 'Get item' action.

    There connection in the expression(['shared_sharepointonline']) is different from the connection you have selected with the 'Get item' action(shared_sharepointonline_1).

    I suggest you change the caonnection of the 'Get item' action or cahnge the expression.

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard