-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger an Action from a Website with CustomEvent and/or general Events #382
Comments
That's a good idea.
To pass data to the global data or variable of the workflow, I guess the best way is by using the new CustomEvent('automa-start-workflow', {
detail: {
id: 'nbf6-qlwD-JCVptpnf9EF',
data: {
globalData: 'Example keyword' // Pass it to the workflow global data
variables: {
variableName: 'Example to keyword'
} // Pass it to the workflow variables
}
}
})) |
@Kholid060 Wow it's already implemented that was quick! Thank you very much :) I have yet to test it, but I think we can close this issue now. |
You're welcome, but to start to execute a workflow use the |
Thank you for the reminder. Once I've tested it through I let you know if there are any issues :) |
Can your tell me the name of chrome plugin , i want to use it, too |
Hi @ whwh656, sorry its for private use only. But I can share my workflow in the public library later, if that helps. |
Thank you, your share workflow is also appappreciate |
Hey @whwh656, I build a small example here: https://www.automa.site/workflow/4Qjh_xUtW7Ow5WdB1YrF6 I've put the instruction on how to do use it in the description. |
|
thanks |
Hey @whwh656, you would need it if you want to trigger a Workflow from any other source than the plugin itself. Usually you start a Workflow by clicking on it, or visiting a website or at a certain time or a keyboard shortcut. However In my App I need to trigger a Workflow from my own Website via a Button. This button does things for my own website, however I want to execute a workflow directly after this, without triggering it via any other method. Also this allows me to pass data to the Workflow from my app. |
Can you help me make a video tutorial? |
Is your feature request related to a problem? Please describe.
I want to use the automation from my own website to automate certain actions after I'm done using the website. So e.g.: It would be nice to start a search to an internal tool directly from my website when clicking a button with the related keyword, instead of copying it and then starting my actions. Especially since I have a lot of actions available. I currently have a Chrome-Plugin that does exactly this, however it would be more convenient to also use automa for this tasks.
Describe the solution you'd like
In my plugin I use the chrome api
chrome.runtime.onMessage.addListener
to listen for events which I throw through thenew CustomEvent
(I think the plugin does already this with a different kind of website/plugin interaction). It would be nice to have an Event like this:Which would start the workflow based on the id. I'm not sure what the best way would be to pass the data (maybe variable or global data).
Would this fit?
Alternatively what also would work is listening to all Button Browser events and have a certain trigger. For example if I were to post a comment on a website I would like to paste that comment also into a Google Docs Table. I could listen whenever a certain button is pressed a trigger a workflow.
This use-case is a bit broader since it also covers site that the workflow creator possible has no control over, however it would be a bit harder to pass data along, as this would first has to be scraped.
The text was updated successfully, but these errors were encountered: