Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Passing data from Form to PA flow to Automation Account fails

(0) ShareShare
ReportReport
Posted on by 2
Hi all,

I have the following, rather simple use case:

1. A user fills out a form with one string field, providing a domain name.
2. When the form is submitted, a Power Automate triggers an Automation Account runbook, passing the provided value as a parameter (which takes a string parameter).
3. The runbook adds the specfied domain to Teams allowed domains (runbook itself works fine).

I am unable to get the value from the flow to get passed to the AA. I have tried various ways. I started with this:

 
This won't even be saved:



So, I tried adding two intermediate steps before the Create job step:


This gets saved, but fails when run, with the following error on the Create job step:



Okay, Parse JSON, then. I generate a schema based on the response of the Get reponse details step, and tried several different variations, such as:


In all cases, it will either fail with the same error as above (cannot be converted to Object) when saving, or will be saved, but will run and say that the JSON input is invalid.

What am I doing wrong? I'm getting a string, and trying to pass a string to a runbook that expects a string, so what's the issue?

 
  • Suggested answer
    MH-21011434-0 Profile Picture
    MH-21011434-0 2 on at
    Passing data from Form to PA flow to Automation Account fails
    Thanks, but that wasn't it.
     
    What it actually was: not anything to do with the flow itself. Instead, the problem was that my AA script had a comment section at the very top of the script, and not the parameter section, and for some reason, this caused the flow to not recognize the variable name or type. When I removed the comments and made the param section come first, the flow recognized the variable (the name of my variable appeared after 'Runbook Parameter') and I was able to make it work with the first, simplest way (three steps).
  • creativeopinion Profile Picture
    creativeopinion 10,064 on at
    Passing data from Form to PA flow to Automation Account fails
    @MH-21011434-0 I don't have any experience with the Runbook Create Job connector. I'm assuming there is a Get Item Runbook connector. If so, can you share a screenshot of the output of an item returned from that connector? 
     
    This will help you to ensure the format you are trying to pass for your value is what is expected by the connector. 
     
    In the meantime, you may be interested in the YT Tutorial linked below. Although this tutorial specifically covers how to get your MS Form date into SP, the concepts covered may be useful in your flow.
     
     
    In this Microsoft Power Automate tutorial, I’ll show you how to get your Microsoft Form responses into SharePoint. I’ll cover how to build a Microsoft form with conditional fields by using branching. You’ll learn how to format your multiple choice responses for a SharePoint multi-choice column as well as converting it to text. I’ll also show you how to take a text response and convert it to a number with a switch action and with an expression. 
    After adding the response to SharePoint, we’ll send the user an email confirmation with all the details of their form submission.
    At the end of the video I’ll show you a few tips and tricks on working with a SharePoint list.
     
    IN THIS VIDEO:
    ✓ How to get a Microsoft Form Response into SharePoint
    ✓ How to get a Microsoft Form ID
    ✓ How to get a Microsoft Form response
    ✓ How to Build a Microsoft Form with Conditional Fields
    ✓ How to used Branching in Microsoft Forms
    ✓ How to format Microsoft Form multiple choice responses for a SharePoint multi-choice column
    ✓ How to parse a Microsoft Form multiple choice response as string of text
    ✓ How to convert a text response to a number
    ✓ How to use the Switch action
    ✓ How to create a custom email confirmation for a Microsoft Form submission
    ✓ How to Create a Custom View in a SharePoint list
    ✓ How to use the Compose Action
    ✓ How to write Power Automate Expressions
     
     
     
    Hope this helps!
    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard